Making mmssrc asynchronous

Wim Taymans wim.taymans at gmail.com
Mon Apr 4 02:23:10 PDT 2011


On 04/04/2011 11:19 AM, Johan Thelin wrote:
> Hello all,
>
> I'm facing an issue with the non-asynchronous mmssrc and need to
> resolve it (at least for the connection phase). My basic plan is to:
>
> 1. Split the connection phase of libmms into two parts -
> attempt_connect and is_connected, where the first initialises the
> connection attempt and the second can be polled to monitor the state
> of the socket. There must also be a way to cancel a connection attempt
> here, to allow for changing the URL during a connection attempt.
>
> 2. Update mmsrc to this. Basically, manage state transitions manually,
> responding ASYNC to the READY_TO_PAUSED transition and then start a
> polling timer that waits for is_connected to return true.
ASYNC state changes are only for sinks so you can't use them for
this purpose. It's also totally not needed to return ASYNC.

You might want to take a look at how the async connections are done
in rtspsrc here: 
http://cgit.freedesktop.org/~wtay/gst-plugins-good/log/?h=progress

It uses the progress messages to inform the app of the async progress.
Also check out the design docs for the progress messages.

Wim

> Does this seem like a good way to go about this? What is the "correct"
> way to handle polling in a gstreamer source? etc. Any input is most
> welcome.
>
> Best regards,
>



More information about the gstreamer-devel mailing list