[Live-devel] DeviceSource "not so clean" fix

Ross Finlayson finlayson at live.com
Mon May 24 08:38:11 PDT 2004


>         fMaxSize = fPreferredFrameSize;

Once again, this is wrong.  "fMaxSize" (just like "fTo") is an input 
parameter (which was set in the original call to "getNextFrame()").  It's 
not something that you set yourself (in "doGetNextFrame()").

Once again, to summarize: In your "doGetNextFrame()" member function 
implementation, you
- *read* (but don't set) "fTo" and "fMaxSize"
- *set* "fFrameSize" and "fPresentationTime"
- *optionally set* (if you know the values) "fNumTruncatedBytes" and 
"fDurationInMicroseconds".

>         // Strange! I cannot use the pointer method.

There's nothing 'strange' here.  Remember, You Have Complete Source 
Code.  If you read it (in particular, "FramedSource::getNextFrame()"), 
you'll see what's going on.


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



More information about the live-devel mailing list