How to send EOS in pipeline?

classic Classic list List threaded Threaded
2 messages Options
dlw
Reply | Threaded
Open this post in threaded view
|

How to send EOS in pipeline?

dlw
I have the following pipeline:

intervideosrc->queue->videoconvert->omxh264enc->mp4mux->filesink

I want to stop the pipeline, remove the elements. Later, on command, I will
add the elements back in and restart the pipeline.

My plan is the following:
1. Send an EOS through the pipeline
2. Detect EOS on the filesink (probe_event)
3. Set all elements to NULL
4. Remove elements from pipeline.

*How do I send the EOS?  *I've tried
-gst_element_send_event(GST_ELEMENT(pipeline), gst_event_new_eos());
-gst_element_send_event(GST_ELEMENT(intervideosrc), gst_event_new_eos());
-gst_element_send_event(GST_ELEMENT(omxh264enc), gst_event_new_eos());

In addition to sending gst_event_new_flush_start().

I can't simply set the pipeline to GST_STATE_NULL because the omxh264enc
prevents this (I've made a simplified pipeline with just
queue->videoconvert->faksink and this has no problem changing to
GST_STATE_NULL. How do I get the encoder and muxer to wrap it up and let me
stop/restart the pipeline?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
dlw
Reply | Threaded
Open this post in threaded view
|

Re: How to send EOS in pipeline?

dlw
ok, so it turns out that the EOS message does not get posted to the message
bus for some reason.  But it does reach the filesink if I add a probe and
send the EOS event to intervideosrc-

GstPad* sink_pad = gst_element_get_static_pad(filesink, "sink");
gst_pad_add_probe(sink_pad, GstPadProbeType(GST_PAD_PROBE_TYPE_BLOCK |
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM), cb_event_eos, pipeline, NULL)



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel