[Live-devel] Implementing FramedSource

Ross Finlayson finlayson at live555.com
Fri Apr 4 14:17:38 PDT 2008


>I'm trying to implement a FramedSource which will get next frames from
>a Queue. From my digging so far, "doGetNextFrame()" should be blocking
>until the next frame is available

No, it should *not* be blocking until the next frame is available, 
because if you block, you'll be starving out any other events that 
need to be handled.  Instead, if no frame is immediately available, 
"doGetNextFrame()" should return.  Later, when a frame becomes 
available, this will be triggered as an event that can get handled 
within the event loop.

You can use the "watchVariable" parameter to "doEventLoop()" for this 
purpose (e.g., have your separate queue-filling thread set the 
'watchVariable' when a new frame becomes available.  (See the FAQ for 
more information.)
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list