How to handle EOS from an appsrc to ensure all frames are played out before pipeline closes?

Subodh Chiwate subodh.chiwate at ufomoviez.com
Sun Mar 22 22:14:16 PDT 2015


Thanks Jan.
Like Sébastien,  even I choose to emit the end-of-stream signal. Will try the gst_app_src_end_of_stream() and check if it makes any difference.
But is there any way to confirm the sink too has displayed all the data in this case.
The visual test seems too inaccurate to verify the behavior.
Else, should I just return FALSE from need data and wait for the sink to raise EOS on the bus ? Not sure if it will imply the same thing as EOS for the rest of the elements.

On 03/23/2015 12:34 AM, Sébastien FENET wrote:
Thanks, Jan, for the tip.

As far as I am concerned, I use the Python API. In this API, there is no "gst_app_src_end_of_stream". Instead I use emit("end-of-stream"). But according to the documentation, it has the same effect :

"When the application is finished pushing data into appsrc, it should call gst_app_src_end_of_stream()<http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html#gst-app-src-end-of-stream> or emit the end-of-stream action signal."

I may be wrong but I made some testing a while ago and I had the impression that it was rather the audiosink that emits the EOS signal on the bus before draining its queue.

________________________________
De : Jan Alexander Steffens <jan.steffens at gmail.com><mailto:jan.steffens at gmail.com>
À : Sébastien FENET <sebastien.fenet at yahoo.fr><mailto:sebastien.fenet at yahoo.fr>; Subodh Chiwate <subodh.chiwate at ufomoviez.com><mailto:subodh.chiwate at ufomoviez.com>
Cc : Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org><mailto:gstreamer-devel at lists.freedesktop.org>
Envoyé le : Samedi 21 mars 2015 10h31
Objet : Re: How to handle EOS from an appsrc to ensure all frames are played out before pipeline closes?

On Fri, Mar 20, 2015 at 7:57 AM, Subodh Chiwate
<subodh.chiwate at ufomoviez.com<mailto:subodh.chiwate at ufomoviez.com>> wrote:
> I raise an EOS event from the appsrc
> "need-data" callback when I run out of data.

On Fri, Mar 20, 2015 at 8:59 AM, Sébastien FENET
<sebastien.fenet at yahoo.fr<mailto:sebastien.fenet at yahoo.fr>> wrote:
> I have the same issue. Same kind of pipeline, I send the EOS signal to
> appsrc when I run out of data. I listen to the pipeline's bus to get the EOS
> back when it has gone through all elements. And it appears I get the EOS
> signal on the bus too early (the last bits of data are not played).

How are you sending the EOS? You should use gst_app_src_end_of_stream,
not gst_element_send_event or similar.
The latter can send the EOS event before appsrc has completely drained
its internal queue.



_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
Regards,
Subodh

-- **************** CAUTION - Disclaimer ***************** This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. UFOMoviez India Ltd. has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. UFOMoviez India Ltd. reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the UFOMoviez India Ltd.'s e-mail system. ***************** End of Disclaimer *******************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150323/3aefe3ed/attachment.html>


More information about the gstreamer-devel mailing list