gst_element_set_state hangs
Johan Thelin
johan.thelin at pelagicore.com
Wed Apr 13 04:25:45 PDT 2011
libmms tries to contact the server blocking, and it waits for a header
(still blocking). I posted a patch that fixes the
hack-on-initial-contact-issue last week, but I have not had the time
to take out all the blocking parts of the mms src element.
Johan Thelin
On 13 April 2011 12:40, Julien Moutte <julien at fluendo.com> wrote:
> 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
>>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
--
Johan Thelin M.Sc.E.E.
Senior Software Developer
Pelagicore AB
Ekelundsgatan 4, 6tr, SE-411 18 Gothenburg, Sweden
Mobile: +46 (0)700 900 250
Skype: jothpelagicore
E-Mail: johan.thelin at pelagicore.com
More information about the gstreamer-devel
mailing list