Asynchronous state change

Carlos Rafael Giani dv at pseudoterminal.org
Thu Feb 19 03:08:09 PST 2015


Note that it is generally not recommended to do this, since it may 
really block infinitely if you aren't careful. Instead, one should use 
the bus to handle statechange messages.

On 2015-02-19 12:00, Sérgio Agostinho wrote:
> You can also use gst_element_get_state (in conjunction with a previous 
> gst_element_set_state) with an infinite timeout to have your execution 
> blocked until the desired state has been reached.
>
> For more info see:
> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-get-state
>
> Cheers
> Sérgio
>
> 2015-02-19 11:53 GMT+01:00 Luis de Bethencourt <luis at debethencourt.com 
> <mailto:luis at debethencourt.com>>:
>
>     Better link to the example:
>     http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+3%3A+Dynamic+pipelines
>
>     In this one you can see the index on the left listing the other
>     tutorials leading to this.
>
>     Luis
>
>     On 19 February 2015 at 10:51, Luis de Bethencourt
>     <luis at debethencourt.com <mailto:luis at debethencourt.com>> wrote:
>
>         Hello Alicia,
>
>         You can listen for messages in the pipeline's bus, and wait
>         for the message "GST_MESSAGE_STATE_CHANGED".
>
>         There is an example using it here:
>         http://docs.gstreamer.com/plugins/viewsource/viewpagesrc.action?pageId=327798
>
>         And some relevant reading material:
>         http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPipeline.html
>         http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-statemanage-states.html
>         http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstMessage.html
>
>         Hope that helps :)
>         Luis
>
>
>         On 19 February 2015 at 10:40, Alicia Romero
>         <alromor84 at gmail.com <mailto:alromor84 at gmail.com>> wrote:
>
>             Hi List,
>             I want to change the state of a pipeline and wait till the
>             pipeline has the wanted state.
>             Is there a way to know when the pipeline has change to the
>             state we set before?
>
>             Thank!!
>
>             _______________________________________________
>             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
>
>
>
>
>     _______________________________________________
>     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
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150219/c8f7b353/attachment.html>


More information about the gstreamer-devel mailing list