[Live-devel] How to control the reading of buffer

Ross Finlayson finlayson at live.com
Mon May 17 19:11:17 PDT 2004


>The reason to perform manual read and write is to avoid shared buffer
>problems. If the encoder is writing to the buffer, I don't want the *RTPSink
>reading from the buffer.

*That's* your problem.  Note 
<http://www.live.com/liveMedia/faq.html#threads> that the library can be 
called from within a single thread of control only.  Once a 'source' object 
has delivered data to its client (e.g., to a *RTPSink), then nothing else 
can be reading from (or writing to) this data, because no other thread of 
control should be running.

Your original source object (e.g., based on "DeviceSource.cpp") needs to 
make sure that data gets delivered to its client only when it's ready.


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



More information about the live-devel mailing list