[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE
Ross Finlayson
finlayson at live555.com
Thu Jun 25 21:10:30 CEST 2015
> Le 2015-06-25 17:56, Ross Finlayson a écrit :
>> Once again, folks: The best way to use the LIVE555 library is to have
>> *exactly one* thread that calls LIVE555 functions. This thread (after
>> some initialization to set up timer tasks using
>> “scheduleDelayedTask()”) would call “doEventLoop()”, without a
>> 'watch variable' parameter. In other words, this thread would do
>> nothing but run within “doEventLoop()”, and would not block.
>
> Now that's contradictory. If it calls doEventLoop(), it blocks in doing so.
Well, yes, strictly-speaking “doEventLoop()” does ‘block' when it calls “select()” - but this is only until the next (I/O or timer-based) event occurs. What I meant, of course, is that it continues to handle events. One thing that I should mention (because it relates to your next question) is that the LIVE555 task scheduler contains a 10ms ‘tick’ that ensures that ensures that it returns from “select()” at least every 10ms if there are no other (e.g., I/O) events.
> And so the other threads need to tell the live555 thread to do something. Except they cannot because the live555 is sleeping inside the live555 event loop…
No, it’s not ‘sleeping’ - at least not for very long (*at most* 10ms inside “select()", and that time’s configurable). It will continue to handle events that are signaled by other threads.
You make it sound like VLC is the first and only application to ever use the "LIVE555 Streaming Media” code, and that nobody else has ever thought about these issues. On the contrary: many other applications are using this code - most of them in the way that I described.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150625/11826bad/attachment.html>
More information about the vlc-devel
mailing list