<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi expert:<div>I try to use appsrc-->videoencode-->appsink, but got the following error. while if I use videotestsrc-->videoencode-->appsink, there is no such error. I don't know where is the mistake:</div><div>“</div><div>0:00:00.159532875 30661      0xabcff20 FIXME                default gstutils.c:3963:gst_pad_create_stream_id_internal:<source:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id</div><div>0:00:00.160083500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support</div><div>(cb_need_data, 126)#######################</div><div>(readTestData, 91)</div><div>(readTestData, 102)target frame num: 0, read_ret: 460800</div><div>0:00:00.161770500 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support</div><div>0:00:00.161995625 30661      0xabcff20 WARN           basetransform gstbasetransform.c:1355:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 in anything we support</div><div>(free_data, 111)</div><div>0:00:00.162342000 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: Internal data stream error.</div><div>0:00:00.162377125 30661      0xabcff20 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<source> error: streaming stopped, reason not-negotiated (-4)</div><div>(bus_call, 75)Error: Internal data stream error.</div><div>”</div><div><br></div><div>my code piece is as following, and the complete source file as attachment,</div><div>"</div><div>  // video source</div><div>  g_object_set (G_OBJECT (videosrc), "num-buffers", 50, NULL);</div><div>  GstCaps *capsSource = gst_caps_new_simple("video/x-raw", "format", G_TYPE_STRING,"NV12",</div><div>                  "width", G_TYPE_INT, g_video_width,</div><div>                  "height", G_TYPE_INT, g_video_height,</div><div>                  "framerate", GST_TYPE_FRACTION, 25, 1,</div><div>                  NULL);</div><div>  if (!strcmp(g_src_name, "videotestsrc")) {</div><div>      DEBUG("uses videotestsrc");</div><div>  } else if (!strcmp(g_src_name, "appsrc")) {</div><div>    g_signal_connect (videosrc, "need-data", G_CALLBACK (cb_need_data), NULL);</div><div>    g_object_set(G_OBJECT (videosrc), "caps", capsSource, NULL);</div><div>  } else {</div><div>    ERROR("Not considered yet");</div><div>  }</div><div>  ret = gst_element_link_filtered(videosrc, videoencode, capsSource);</div><div>  gst_caps_unref(capsSource);</div><div>  capsSource = NULL;</div><div>  if (ret != TRUE) {</div><div>      WARN("fail to link elements");</div><div>      return -1;</div><div>  }"</div></div></div></div></div>