// 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!!