[Live-devel] Program flow question

Ross Finlayson finlayson at live555.com
Thu May 1 17:33:26 PDT 2008


>I imagine it is because there is no delay function in my code. At 
>the moment the 'fTimePerFrame' is set in the constructor for 
>ElphelJPEGDeviceSource but not used anywhere.

Yes, because the original code read from a live source (a camera), it 
was not necessary to set the "fDurationInMicroseconds" variable in 
your "doGetNextFrame()" function.  (By not setting this variable, it 
remains at its default value of 0.)  However, because you are now 
reading from a pre-recorded file - rather than from a live source - 
you must now set that variable.

You should add the following line to your 
"ElphelJPEGDeviceSource::deliverFrameToClient()" function, sometime 
before the "envir().taskScheduler().scheduleDelayedTask()" call:

	fDurationInMicroseconds = fTimePerFrame;

>Within the doEventLoop() what is telling the process to only call 
>doGetNextFrame() regularly (5 times per second say) rather than 
>continuously?

The "fDurationInMicroseconds" variable (which is ultimately used by 
"MultiFramedRTPSink", when rescheduling the next outgoing RTP packet 
after sending one).
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20080501/d7f42b49/attachment.html 


More information about the live-devel mailing list