[Live-devel] doGetNextFrame()

Ross Finlayson finlayson at live555.com
Fri Jun 8 11:47:09 PDT 2007


>How can I get more data from the Source without a call to 
>afterGetting(this) before (I get "attempting to read more than once" 
>messages)? I can't call afterGetting before an encoded frame is 
>ready but there can't be an encoded frame if the decoder doesn't 
>have enough data (you remember that chicken-or-the-egg-problem ;)).
>
>What I need is to know how I can read multiple packets from the 
>source before delivering one big packet to the client. Which 
>functions do I have to call??

To get data from a source object, always call "thatSource->getNextFrame()".

Note that the error about "atempting to read more than once" occurs 
if you call "getNextFrame()" on the *same* object a second time, 
before the 'after getting' function from the first call has been 
invoked.  I.e., it's OK to do:

	source->getNextFrame(..., afterGettingFunc, ...);

	void afterGettingFunc(...) {
		source->getNextFrame(...);
	}

but you *cannot* do:

	source->getNextFrame(..., afterGettingFunc, ...);
	source->getNextFrame(...);
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list