[Live-devel] How to Pause a medium

Ross Finlayson finlayson at live555.com
Tue Oct 18 05:32:41 PDT 2005


>Is it possible to pause a medium as it is possible the
>stop it by Medium::close(fInputSource1); ??

Yes, call "FramedSource::stopGettingFrames()" (or, on a 'sink' 
object: "MediaSink::stopPlaying()" (which calls 
"FramedSource::stopGettingFrames()")).

Note that if you are implementing your own source object, you will 
need to implement the virtual function "FramedSource::doStopGettingFrames()".


>I have 2 MPEG2_TS framed source streams opened and I
>only output one at a time, and CPU consumption goes
>wild. So when I dont ouput a stream, I want to pause
>it, so CPU doesnt go crasy. Any easy way ??

See above.  (However, if your CPU is "going wild", then you should 
make sure that your source object implementation is not doing some 
dumb polling.)


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list