<div dir="ltr">Thank You Thiago.<div><br></div><div>Actually the flag indicates that the h264 stream has video_full_range_flag set in it.</div><div><br></div><div>So my approach is, if <b>gstomxvideodec</b> detects <font color="#0b5394"><b>video_full_range_flag</b></font> is set in <font color="#134f5c"><b>sps</b></font> of a h264 stream. I'd like <b>v4l2sink</b> could be informed. So that I can pass some arguments through <font color="#134f5c"><b>v4l2_ioctl.</b></font></div><div><font color="#000000">Of course, I also did some development in <b>gstomxvideodec</b> to parse <b>sps</b>.</font></div><div><font color="#134f5c"><b><br></b></font></div><div><font color="#000000">Thanks for your time</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-05 21:52 GMT+08:00 Thiago Sousa Santos <span dir="ltr"><<a href="mailto:thiagossantos@gmail.com" target="_blank">thiagossantos@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Sep 5, 2016 at 10:31 AM, alan wang <span dir="ltr"><<a href="mailto:alan.3976@gmail.com" target="_blank">alan.3976@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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_fra<wbr>me-->[certain flag detected]--->notify--->gstv4l2<wbr>sink.c</div></div></blockquote><div><br></div></span><div>It depends on the kind of information you want to pass onwards. Usually, you have 3 choices:<br><br></div><div>1) If it is a format change: use a caps event<br></div><div>2) If it is some event in the middle of the stream (like a metadata change) you can use a custom GstEvent to notify downstream.<br></div><div>3) If is a flag that indicates some particular information for a frame, you can attach a buffer meta to a GstBuffer.<br></div><div><br></div><div>If you provide more details on what this flag is and how it is used we could try to guide you better on how to do it.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><div dir="ltr"><div><br></div><div>Below is what I've done in <font color="#3d85c6">gstomxvideodec.c:gst_omx_video<wbr>_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(de<wbr>coder),</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<wbr>_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_loo<wbr>p:<qtdemux0> error: streaming stopped, reason error</font></div><div><font color="#ff0000">ERROR: from element /GstPipeline:pipeline0/GstDeco<wbr>deBin:decodebin0/GstQTDemux:<wbr>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><span><font color="#888888"><div style="color:rgb(0,0,0)"><br></div><div style="color:rgb(0,0,0)">Alan</div><div><br></div></font></span></div>
<br></span>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesk<wbr>top.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-dev<wbr>el</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature">Thiago Sousa Santos</div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div>