[vlc-devel] [PATCH] Handle GET_PARAMETER keepalive responses during PAUSE
finlayson at live555.com
Wed Jun 24 23:21:42 CEST 2015
> 2) The variable is read/write for the thread calling doEventLoop() and not
> accessed by any other thread (at least while doEventLoop() executes). This is
> what I meant: the variable can only be set from a callback in the event loop.
No, the intent is allow the ‘watch variable’ to be set (to a non-zero value) by an external thread. (If you do this, but are still concerned, then you may wish to declare the variable “volatile”.) But this is a moot point in view of the following:
> As far as I can tell, the VLC plugin only sets the "watch variable" from
> within callbacks of the event loop, not from any other thread.
OK, then in that case, no problem. But then the code is probably unnecessarily complicated, and might not need ‘watch variables’ at all. Rather than having the code call “doEventLoop()” multiple times (with a ‘watch variable’ each time), it would be simpler to restructure the “live555.cpp” code so that it calls “doEventLoop()” just once (with no ‘watch variable’), and have everything executed within ‘event loop callbacks’.
But anyway, the point of my original message was to remind people that LIVE555 functions need to be called from the LIVE555 event loop thread only. If “live555.cpp” is already abiding by this, than that’s good - but it sounds like that code should still be cleaned up (‘refactored’) at some point in the future.
Live Networks, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel