gstreamer appsrc "gst_app_src_push_buffer" successfully but no video show in xvimagesink, but TX2 can be displayed normally

// send data buffer to appsrc
    source_t = gst_bin_get_by_name(GST_BIN(sData.sinkPipeline), "testsourceappsrc");

    ret = gst_app_src_push_buffer(GST_APP_SRC(source_t), app_buffer);

    gst_object_unref(source_t);

    if(ret != GST_FLOW_OK)
    {
        g_print("some error...\n");
    }

I can confirm that “app_buffer” has data, because I can show it normally with OpenCV.

// create sink pipeline (appsrc)
    const gchar *videocaps = "video/x-raw, format=(string)I420, width=640, height=480";
    string = g_strdup_printf("appsrc name=testsourceappsrc caps=\"%s\" ! videoconvert ! xvimagesink", videocaps);

    sData.sinkPipeline = gst_parse_launch(string, NULL);
    g_free(string);

    if(sData.sinkPipeline == NULL)
    {
        g_print("bad sink pipeline...\n");
        return -1;
    }

The same code, it works fine on TX2, but it can’t be displayed on TK1.

please give me a lot of advice, thank you very much!!

Hi,
For openCv + gstreamer, you shall need openCV to be above 3.0.0. Sugget you use TX1 or TX2:


https://elinux.org/Jetson_TX2#Computer_Vision

hi DaneLLL,
thank you for your reply!
I want to send “app_buffer” form appsink to appsrc, finally thrown to “xvimagesink” display.

Opencv function has been removed.

string = g_strdup_printf("appsrc name=testsourceappsrc caps=\"%s\" ! videoconvert ! xvimagesink", videocaps);

I am wondering why the above code cannot work on TK1, but it works fine on TX2?

Hi,
The gstreamer revision of TK1 is older.

ubuntu@tegra-ubuntu:~$ gst-inspect-1.0 --version
gst-inspect-1.0 version 1.2.4
GStreamer 1.2.4

Your pipeline is a pure gstreamer pipeline. It is possibly because the revision does not run the case well.