[Live-devel] attempting to read more than once

Ross Finlayson finlayson at live.com
Tue Aug 9 20:30:10 PDT 2005


>doGetNextFrame() doesn't have a call to the afterGetting() - but 
>deliverFrame() does. And it's being called after I fill in each 
>frame as required.

So apparently your "deliverFrame()" is getting called more than once 
after a single call to "doGetNextFrame()".  That shouldn't 
happen.  Note the call to
         isCurrentlyAwaitingData()
in "DeviceSource::deliverFrame()".  That's supposed to prevent this 
from happening.

>I currently allocate the memory for the framedSource->fTo

No no!  You don't 'allocate memory' for "fTo".  "fTo" is just an 
address (supplied by the downstream object) to which you *copy* 
incoming data (e.g., using "memmove()").

Maybe you meant to say 'allocate memory for the incoming data which 
you later copy to "fTo"'.

>Also, I'm a little fuzzy about how to fill in the fPresentationTime 
>and fDuration variables. Currently, I use the desired framerate of 
>my video source (for example, at 7.5fps I assume duration is 133333 
>microseconds. Is that reasonable?

Yes, probably.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list