[Live-devel] Behavior of DeviceSource::doGetNextFrame() when no data available

David Arnold darnold at futurec.net
Thu Aug 10 07:17:28 PDT 2006


What should a DeviceSource, such as a frame grabber, do in doGetNextFrame()
when it determines there is no frame available?  I find no answer in the
FAQ.  The comment in DeviceSource.cpp reads:

// This must be done in a non-blocking fashion - i.e., so that we
// return immediately from this function even if no data is
// currently available.
//

The problem is if I just return, as in:

doGetNextFrame()
{
	if (grabNextFrame() == NO_FRAME_AVAILABLE)
		return;
}

The task scheduler seems to stop.  It appears as though I must invoke
afterGetting(this).  If I must invoke afterGetting() what to I set all the
expected output parameters to (such as fFrameSize, etc) to.

This also raises questions about timing.  doGetNextFrame() runs because the
interval fired.  How do I keep presentation times for the next interval
correct?

In the past, my call to grabNextFrame() blocked in the case where no frame
was available.  When I added an audio stream to the video the blocking call
seems to cause all kinds of timing problems and eventually, VLC and
QuickTime fail to play the stream.

Thank you,

Dave Arnold
Future Concepts

The information contained in this electronic mail transmission is intended only for the use of the individual or entity named above and is privileged and confidential. If you are not the intended recipient, please do not read, copy, use or disclose this communication to others. Any dissemination, distribution or copying of this communication other than to the person or entity named above is strictly prohibited. If you have received this communication in error, please immediately delete it from your system.




More information about the live-devel mailing list