<div dir="ltr"><div dir="ltr">here are more logs; i don't know where is the root failure<div><br></div><div><div>0:00:00.318770000 11242 0x541e720 DEBUG GST_PADS gstpad.c:5182:store_sticky_event:<source:src> notify caps</div><div>0:00:00.318857000 11242 0x541e720 DEBUG GST_PADS gstpad.c:3937:check_sticky:<source:src> pushing all sticky events</div><div>0:00:00.318911875 11242 0x541e720 DEBUG GST_PADS gstpad.c:3867:push_sticky:<source:src> event stream-start was already received</div><div>0:00:00.318975875 11242 0x541e720 DEBUG GST_EVENT gstpad.c:5638:gst_pad_send_event_unchecked:<capsfilter0:sink> have event type caps event: 0x5534160, time 99:99:99.999999999, seq-num 25, GstEventCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)25/1";</div><div>0:00:00.319158500 11242 0x541e720 DEBUG GST_CAPS gstutils.c:3123:gst_pad_query_accept_caps:<capsfilter0:sink> accept caps of video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.319263250 11242 0x541e720 DEBUG query gstquery.c:675:gst_query_new_custom: creating new query 0xffffa0006140 accept-caps</div><div>0:00:00.319330125 11242 0x541e720 DEBUG GST_PADS gstpad.c:4006:gst_pad_query:<capsfilter0:sink> doing query 0xffffa0006140 (accept-caps)</div><div>0:00:00.319425000 11242 0x541e720 DEBUG capsfilter gstcapsfilter.c:341:gst_capsfilter_accept_caps:<capsfilter0> can intersect: 1</div><div>0:00:00.319497125 11242 0x541e720 DEBUG GST_PADS gstpad.c:4029:gst_pad_query:<capsfilter0:sink> sent query 0xffffa0006140 (accept-caps), result 1</div><div>0:00:00.319567375 11242 0x541e720 DEBUG default gstutils.c:3128:gst_pad_query_accept_caps:<capsfilter0:sink> query returned 1</div><div>0:00:00.319643000 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1297:gst_base_transform_setcaps:<capsfilter0:sink> have new caps 0x5530d40 video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.319767750 11242 0x541e720 DEBUG basetransform gstbasetransform.c:462:gst_base_transform_transform_caps:<capsfilter0> transform caps (direction = 2)</div><div>0:00:00.319854000 11242 0x541e720 DEBUG capsfilter gstcapsfilter.c:296:gst_capsfilter_transform_caps:<capsfilter0> input: video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320020375 11242 0x541e720 DEBUG capsfilter gstcapsfilter.c:297:gst_capsfilter_transform_caps:<capsfilter0> filter: (NULL)</div><div>0:00:00.320073625 11242 0x541e720 DEBUG capsfilter gstcapsfilter.c:299:gst_capsfilter_transform_caps:<capsfilter0> caps filter: video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320173250 11242 0x541e720 DEBUG capsfilter gstcapsfilter.c:300:gst_capsfilter_transform_caps:<capsfilter0> intersect: video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320273875 11242 0x541e720 DEBUG basetransform gstbasetransform.c:489:gst_base_transform_transform_caps:<capsfilter0> to: video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320416250 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1083:gst_base_transform_find_transform:<capsfilter0> intersecting against padtemplate ANY</div><div>0:00:00.320468750 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1158:gst_base_transform_find_transform: have fixed caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320576250 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1165:gst_base_transform_find_transform:<capsfilter0> calling fixate_caps for video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 using caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1 on pad capsfilter0:src</div><div>0:00:00.320740500 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1032:gst_base_transform_default_fixate_caps:<capsfilter0> fixated to video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320845375 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1171:gst_base_transform_find_transform:<capsfilter0> after fixating video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.320956250 11242 0x541e720 DEBUG GST_CAPS gstutils.c:3123:gst_pad_query_accept_caps:<encode:sink> accept caps of video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.321053375 11242 0x541e720 DEBUG query gstquery.c:675:gst_query_new_custom: creating new query 0xffffa00061e0 accept-caps</div><div>0:00:00.321119875 11242 0x541e720 DEBUG GST_PADS gstpad.c:4006:gst_pad_query:<encode:sink> doing query 0xffffa00061e0 (accept-caps)</div><div>0:00:00.321180750 11242 0x541e720 DEBUG videoencoder gstvideoencoder.c:894:gst_video_encoder_sink_query:<encode> received query 40963, accept-caps</div><div>0:00:00.321246000 11242 0x541e720 DEBUG GST_PADS gstpad.c:3129:gst_pad_query_accept_caps_default:<encode:sink> query accept-caps accept-caps query: 0xffffa00061e0, GstQueryAcceptCaps, caps=(GstCaps)"video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ framerate\=\(fraction\)25/1", result=(boolean)false;</div><div>0:00:00.321397250 11242 0x541e720 DEBUG GST_PERFORMANCE gstpad.c:3147:gst_pad_query_accept_caps_default:<encode:sink> fallback ACCEPT_CAPS query, consider implementing a specialized version</div><div>0:00:00.321452125 11242 0x541e720 DEBUG GST_CAPS gstutils.c:3040:gst_pad_query_caps:<encode:sink> get pad caps with filter video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.321548000 11242 0x541e720 DEBUG query gstquery.c:675:gst_query_new_custom: creating new query 0xffffa0006230 caps</div><div>0:00:00.321610875 11242 0x541e720 DEBUG GST_PADS gstpad.c:4006:gst_pad_query:<encode:sink> doing query 0xffffa0006230 (caps)</div><div>0:00:00.321669125 11242 0x541e720 DEBUG videoencoder gstvideoencoder.c:894:gst_video_encoder_sink_query:<encode> received query 43523, caps</div><div>0:00:00.321847875 11242 0x541e720 DEBUG v4l2videoenc gstv4l2videoenc.c:942:gst_v4l2_video_enc_sink_query:<encode> Returning sink caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1, interlace- mode=(string)progressive, colorimetry=(string){ bt709 }</div><div>0:00:00.321972375 11242 0x541e720 DEBUG GST_PADS gstpad.c:4029:gst_pad_query:<encode:sink> sent query 0xffffa0006230 (caps), result 1</div><div>0:00:00.322041250 11242 0x541e720 DEBUG GST_CAPS gstutils.c:3047:gst_pad_query_caps:<encode:sink> query returned video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string){ bt709 }</div><div>0:00:00.322187500 11242 0x541e720 DEBUG GST_PADS gstpad.c:3160:gst_pad_query_accept_caps_default:<encode:sink> allowed caps subset video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1, interlace- mode=(string)progressive, colorimetry=(string){ bt709 }, caps video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.322348250 11242 0x541e720 DEBUG GST_PADS gstpad.c:3438:gst_pad_query_default:<encode:sink> not forwarding 0xffffa00061e0 (accept-caps) query</div><div>0:00:00.322416250 11242 0x541e720 DEBUG GST_PADS gstpad.c:4029:gst_pad_query:<encode:sink> sent query 0xffffa00061e0 (accept-caps), result 1</div><div>0:00:00.322481125 11242 0x541e720 DEBUG default gstutils.c:3128:gst_pad_query_accept_caps:<encode:sink> query returned 0</div><div>0:00:00.322539250 11242 0x541e720 DEBUG basetransform gstbasetransform.c:1212:gst_base_transform_find_transform:<capsfilter0> FAILED to get peer of <capsfilter0:src> to accept video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)25/1</div><div>0:00:00.322666875 11242 0x541e720 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.322776125 11242 0x541e720 DEBUG GST_PADS gstpad.c:5712:gst_pad_send_event_unchecked:<capsfilter0:sink> sent event, ret not-negotiated</div><div>0:00:00.322837000 11242 0x541e720 DEBUG GST_PADS gstpad.c:3916:push_sticky:<source:src> result not-negotiated, mark pending events</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Halley Zhao <<a href="mailto:aihua.halley.zhao@gmail.com">aihua.halley.zhao@gmail.com</a>> 于2019年4月30日周二 下午3:16写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">i can see <i style="color:rgb(0,0,0);font-family:"PingFang SC";font-size:medium">Vinod Kesti's </i>reply at :<a href="https://lists.freedesktop.org/archives/gstreamer-devel/2019-April/date.html" target="_blank">https://lists.freedesktop.org/archives/gstreamer-devel/2019-April/date.html</a>; but i can't receive the mail in my box. it is strange.<div><br></div><div>according to Kesti's reply:</div><div>I use v4l2h264enc on nxp imx8 board, I don't think the reason is that v4l2h264enc doesn't support nv12 format. because if i use videotestsrc instead, the program runs ok.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Halley Zhao <<a href="mailto:aihua.halley.zhao@gmail.com" target="_blank">aihua.halley.zhao@gmail.com</a>> 于2019年4月30日周二 下午2:24写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div id="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-:24a" class="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-ii gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-gt" style="font-size:14px;direction:ltr;margin:8px 0px 0px;padding:0px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><div id="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-:249" class="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-a3s gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><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. "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>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><div class="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-yj6qo"></div><div class="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-adL"></div></div></div><div class="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-hq gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-gt gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-a10" id="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-:252" style="margin:15px 0px;clear:both;font-size:14px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><br class="gmail-m_7520927034935845578gmail-m_-1148427201849366711gmail-Apple-interchange-newline"></div></div>
</blockquote></div>
</blockquote></div>