[Live-devel] Question about DeviceSource

Ross Finlayson finlayson at live.com
Mon May 24 04:00:45 PDT 2004


>void DeviceSource::doGetNextFrame() {
[...]
>         fTo = (unsigned char*) fReadBuffer;

This is wrong.  "fTo" is an *in* parameter (it was set to the value of the 
"to" parameter to the original call to "getNextFrame()" - see 
"FramedSource.cpp").  It is not a value that you set yourself.

When your new data is available, you should *copy* the new data to the 
location pointed to by "fTo" (but making sure that you don't copy any more 
than "fMaxSize" bytes).  But the "fTo" pointer itself you should leave alone.

You should review "DeviceSource.cpp", and the many other classes that 
implement "doGetNextFrame()".


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



More information about the live-devel mailing list