What's it the right way to communicate between elements (gstomxvideodec and gstv4l2sink)

alan wang alan.3976 at gmail.com
Mon Sep 5 13:31:10 UTC 2016


Hello

I have a requirement that when dealing with h264 stream If some flag is
detected in the stream. The v4l2sink should be noticed.

The work flow is like:
gstomxvideodec.c--->handle_frame-->[certain flag
detected]--->notify--->gstv4l2sink.c

Below is what I've done in gstomxvideodec.c:gst_omx_video_dec_handle_frame


    caps =
        gst_caps_new_full (gst_structure_new ("flag",
        "flag", G_TYPE_INT, 1, NULL), NULL);

    if (!gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD(decoder),
                gst_event_new_caps (caps))) {
      return GST_FLOW_ERROR;
    }

I was hoping, above code would invoke gstv4l2sink.c:gst_v4l2sink_set_caps. Then
I can extract the caps and do I have to do.

But all I got is error message says:

(gst-launch-1.0:7180): GStreamer-WARNING **: pad
omxh264dec-omxh264dec0:sink pushing caps event in wrong direction
0:00:01.210275279  7180 0xb5c01920 WARN                 qtdemux
qtdemux.c:5307:gst_qtdemux_loop:<qtdemux0> error: streaming stopped, reason
error
ERROR: from element
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstQTDemux:qtdemux0:
GStreamer encountered a general stream error.


It seems that, the event caps is sent to qtdemux not to v4l2sink as I
expected.

So what is the right way to communicate between gstomxvidedec and v4l2sink ?

Thank You for your time.

Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160905/ff5da35f/attachment.html>


More information about the gstreamer-devel mailing list