[Live-devel] Obtaining frames

Ross Finlayson finlayson at live555.com
Wed Sep 3 14:45:11 PDT 2008

>  > You then call "doEventLoop()" to enter the event loop.  You do *not*
>>  return from this function (except to exit the application).  I.e.,
>>  all processing of incoming data happens within the event loop.
>I know it ... but I can create and call this function in one thread, that will
>be blocked and do calls in from another thread.

No you can't!  Please read the FAQ.  The event loop, and all event 
handlers, must be run within a single thread.

>The main doubt about it is if I can do it and call the
>without problems, or should I stop the event loop, and after call the
>getnextframe and after reengage the loop? or,

No.  You don't stop the event loop.  The call to "getNextFrame()" is 
done within your sink object's (i.e., of the "FramedSink" subclass 
that you will write, to do decoding/rendering) "continuePlaying()" 
virtual function.  This all happens within the event loop.

>should I to derive the taskScheduler class and re implement the doEventLoop,

If your GUI also works using an event loop, then you might wish to 
write your own subclass of "taskScheduler" so that the event loop 
handles both incoming network packets (as it does now), and GUI 
events.  (That's not mandatory, though.)

Ross Finlayson
Live Networks, Inc.

More information about the live-devel mailing list