[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE
Paul Clark
paul at packetship.com
Thu Jun 25 17:29:45 CEST 2015
On 25/06/15 15:56, Ross Finlayson wrote:
> 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. Your other threads
> (i.e., the rest of your application) can continue to do whatever they
> want - except call LIVE555 functions.
>
> This is the way that the LIVE555 library is intended to be used, and
> it’s how almost everyone else has been using it. Unfortunately,
> however, you have chosen a different model - in which you make
> ‘temporary' calls into the LIVE555 library. This complicates your
> code, because (1) you need to ensure that no more than one thread of
> control at a time is calling LIVE555 functions, and (2) because you
> need to use a ‘watch variable’ in each of your calls to
> “doEventLoop()”, to ensure that the calls are temporary.
I think "chosen" may be over-stating it, at least in my case :-) I'm
just trying to fix a bug, although admittedly after many years of such
fixes it all gets messy and needs refactoring.
> That’s why your “live555.cpp” code is so complex. I urge you to
> (sometime in the future) restructure this code - as noted above - to
> use a single thread that does nothing but run inside “doEventLoop()”.
> This would simplify it considerably.
Well, that's possible for a rainy day project... Is it allowed for
application threads to call sendXxx() methods, or (as your FAQ suggests)
does everything have to go through a triggered event, in which the
handler (which presumably we have to write?) calls sendXxx() in the
doEventLoop() thread? If the latter that adds a shedload of complexity
- there are 7 different sendXxx() calls in 20-odd places, and we would
only have a (void *) to pass parameters with...
Best regards
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150625/6b8dd397/attachment.html>
More information about the vlc-devel
mailing list