Hello All,
Can someone please let me know what is the right way (or the set of APIs) to call for a greaceful shutwon of a gst-launch pipeline? For instance, if there is an error in my own lib if a variable does not have correct value, I want to stop the execution. Thanks in advance. -S ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
If you are using a simple command line pipeline then there is no need to take care of it , because gst-launch application will take care of it .
If you are writing your own plugin and using it in gst-launch command then in _change_state function of your plugin release all the resources when state goes form paused->ready , and take care of error propagation in your library and plugin .
On Thu, Mar 4, 2010 at 4:18 PM, Sitanshu Nanavati <[hidden email]> wrote: Hello All, -- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Sin-2
On Thu, 2010-03-04 at 16:18 +0530, Sitanshu Nanavati wrote:
Hi, > Can someone please let me know what is the right way (or the set of > APIs) to call for a greaceful shutwon of a gst-launch pipeline? For > instance, if there is an error in my own lib if a variable does not > have correct value, I want to stop the execution. It depends what you mean by 'graceful'. If you just want to make it stop in an orderly fashion as soon as possible, a gst_element_set_state (pipeline, GST_STATE_NULL); should be enough. If you are creating content, e.g. recording audio or video and writing it to file and you want to make sure that files are all properly finalised (headers written etc.), then you should do something like this: gst_element_send_event (pipeline, gst_event_new_eos ()); /* wait for EOS message on the pipeline bus */ msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS | GST_MESSAGE_ERROR, GST_CLOCK_TIME_NONE); /* should check if we got an error message here or an eos */ gst_element_set_state (pipeline, GST_STATE_NULL); which is more or less what gst-launch is doing if you pass the -e option. Cheers -Tim ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |