gst_element_set_state hangs
Julien Moutte
julien at fluendo.com
Wed Apr 13 03:40:19 PDT 2011
Depending on the element in the pipeline which will handle the URI you are
trying to play, the state change call can be blocking on network access.
For example libneon HTTP source will change state in a synchronous way and
block the _set_state function whereas libsoup will do this asynchronously.
I guess the same happens to you here, the mms src element is probably doing
stuff synchronously in the state change function and blocks your
application's main thread.
You can either call the set_state function in a deferred thread or try to
improve the element so that the state change is not blocking so much.
Hope this helps,
Best regards,
Julien Moutte
CTO
Fluendo
San Francisco, USA & Barcelona, SPAIN
Tel BCN. +34 933 175 153
Tel USA. +1 415 773 5353
www.fluendo.com & www.moovida.com
P *Please consider the environment before printing this e-mail.*
On Wed, Apr 13, 2011 at 11:41 AM, Jianchun Zhou <jianchun.zhou at gmail.com>wrote:
> hi, guys:
>
> A problem has been troubling me a lot for quite a period of time.
>
> when I use gstreamer to play an online radio stream, it blocks on gst_element_set_state(play,
> GST_STATE_PLAYING);
> the application hangs and has no response. my system is Ubuntu 10.10 LTS.
>
> the attached is my source code, the url mms://live.cbg.cn/yinyue is the
> one blocks, and the other one can play.
>
> anybody can shed some light for me, how can I return from the setting state
> operation immediately?
>
> thanks in advance.
>
>
> --
> Best Regards
>
> _______________________________________________
> 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/20110413/74697f89/attachment.htm>
More information about the gstreamer-devel
mailing list