<div dir="ltr">Hello<div><br></div><div>I have a requirement that when dealing with h264 stream If some flag is detected in the stream. The v4l2sink should be noticed.</div><div><br></div><div>The work flow is like:</div><div>gstomxvideodec.c--->handle_frame-->[certain flag detected]--->notify--->gstv4l2sink.c</div><div><br></div><div>Below is what I've done in <font color="#3d85c6">gstomxvideodec.c:gst_omx_video_dec_handle_frame</font></div><div><br></div><div><br></div><div><div><font color="#0b5394">    caps =</font></div><div><font color="#0b5394">        gst_caps_new_full (gst_structure_new ("flag",</font></div><div><font color="#0b5394">        "flag", G_TYPE_INT, 1, NULL), NULL);</font></div><div><font color="#0b5394"><br></font></div><div><span style="color:rgb(11,83,148)">    if (!gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD(decoder),</span><br></div><div><font color="#0b5394">                gst_event_new_caps (caps))) {</font></div><div><font color="#0b5394">      return GST_FLOW_ERROR;</font></div><div><font color="#0b5394">    }</font></div></div><div><font color="#0b5394"><br></font></div><div><font color="#000000">I was hoping, above code would invoke </font><font color="#0b5394">gstv4l2sink.c:gst_v4l2sink_set_caps. </font><font color="#000000">Then I can extract the caps and do I have to do.</font></div><div><font color="#000000"><br></font></div><div><font color="#000000">But all I got is error message says: </font></div><div><font color="#000000"><br></font></div><div><div><font color="#ff0000">(gst-launch-1.0:7180): GStreamer-WARNING **: pad omxh264dec-omxh264dec0:sink pushing caps event in wrong direction</font></div><div><font color="#ff0000">0:00:01.210275279  7180 0xb5c01920 WARN                 qtdemux qtdemux.c:5307:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason error</font></div><div><font color="#ff0000">ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0: GStreamer encountered a general stream error.</font></div><div style="color:rgb(0,0,0)"><br></div></div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">It seems that, the event caps is sent to qtdemux not to v4l2sink as I expected.</div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">So what is the right way to communicate between gstomxvidedec and v4l2sink ?</div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">Thank You for your time.</div><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">Alan</div><div><br></div></div>