<br><br><div class="gmail_quote">On Thu, Nov 18, 2010 at 3:40 PM, Tiago Katcipis <span dir="ltr"><<a href="mailto:katcipis@inf.ufsc.br">katcipis@inf.ufsc.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="im">2010/11/18 Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian.droege@collabora.co.uk" target="_blank">sebastian.droege@collabora.co.uk</a>></span><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>On Thu, 2010-11-18 at 13:00 -0200, Tiago Katcipis wrote:<div><div></div><div class="h5"><br>
><br>
><br>
> That's all possible but the problem with that is, that a) the<br>
> state<br>
> change from NULL->READY happens synchronous in GStreamer and<br>
> that b)<br>
> basesrc wants to know the file size in READY already,<br>
> otherwise it will<br>
> never activate random access mode.<br>
><br>
><br>
> Well if it must be synchronous running the main loop on another Thread<br>
> does not to seem to be an option. What is done on gst_bus_poll seems<br>
> to fit here:<br>
><br>
> 1 - the caller on the set_state will get blocked on the call<br>
> 2 - inside the call we mount the file and do all the stuff async using<br>
> the main_loop_run to block the caller<br>
> 3 - after everything is done we get out of the run call and give to<br>
> the basesrc the file size<br>
><br>
> this way we can use the async GIO API, mount the file for the user<br>
> giving a "sync" operation to the set_state caller. But this approach<br>
> is pretty simple, if you guys still not implemented it... it is<br>
> because it has something pretty bad on it... it is because the same<br>
> problem that can happen on gst_bus_poll?<br>
<br>
</div></div></div><div><div></div><div class="h5">That would work in theory but the problem here is, that GStreamer does<br>
not require any running GLib main loop on the main context by policy.<br>
<br></div></div></blockquote><div><div class="im"><br>does not require, but if we create it? the user does not need to know
that a main loop has been created, and if the mainloop on the main
context already exists...we use it.<br>
<br>but i agree that it is ugly and your suggestion seems to be better...make the transition of states async:<br><a href="https://bugzilla.gnome.org/show_bug.cgi?id=586939" target="_blank">https://bugzilla.gnome.org/show_bug.cgi?id=586939</a><br>
<br>so my question now is... is there any planning on doing this?
because if it is not going to be done, even if it is not beautiful (like
gst_bus_poll) it seems to be better to let the user "ask" the plugin to
mount everything to him instead of having to catch a message
"not-mounted" and them having to mount (asynchronously...a pain in the
ass) and them setting the pipeline to play again.<br>
<br></div><br></div></div></blockquote><div><br>Is anything going to be done about this on gstreamer 0.11/1.0 ? <br>like async changes, that would make possible to write a better giosrc plugin.<br><br>Here at my job we work a lot with network sources, on the past we used gnomevfssrc and now we are using giosrc, but its usage is ugly (gnomevfssrc is deprecated but was more easy to use), <br>
<br>I'm really interested on helping to make it better, but there is no use on writing a solution that wont be accepted on gstreamer.<br> <br>another problem related to async state changes is setting a pipeline that is using giosrc with a network source (tested with ssh) to NULL when the connection is down, the sync call to set_state to NULL blocks the application...for a long long time.<br>
<br>eg:<br>- im playing ssh://myfile<br>- ops, connection is down...stopped playback<br>- i call set_state(NULL) - (if i call a seek i will block too)<br>- i got blocked for a long long time (this made our server to freeze completely)<br>
<br>it seems that having async set_state calls would be a good idea when working with network sources. There is no good way to now if everything is fine before calling a set_state that can block for a long time (there is no feedback about the status of the connection).<br>
<br>i would like to help making giosrc better, but on the 0.11/1.0 plan i didn't see anything about it.<br><br>sorry for the bad english.<br><br>best regards,<br>Katcipis<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote"><div><br>best regards,<br>Katcipis<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
------------------------------------------------------------------------------<div class="im"><br>
Beautiful is writing same markup. Internet Explorer 9 supports<br>
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.<br>
Spend less time writing and rewriting code and more time creating great<br>
experiences on the web. Be a part of the beta today<br>
<a href="http://p.sf.net/sfu/msIE9-sfdev2dev" target="_blank">http://p.sf.net/sfu/msIE9-sfdev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></div></blockquote></div><div><div></div><div class="h5"><br><br clear="all"><br>-- <br><a href="http://www.getgnulinux.org/windows" target="_blank">http://www.getgnulinux.org/windows</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.getgnulinux.org/windows">http://www.getgnulinux.org/windows</a><br>