[Live-devel] Switching sources

Ross Finlayson finlayson at live555.com
Mon Jul 3 10:42:29 PDT 2006


>I'd like to change the source without disconnecting the destination. 
>So I did sink->stopPlaying() then sink->startPlaying(newSource). The 
>sources are mp3 streams (not files). But when this change happens 
>the stream I got is not changing the way I expect.

I think a better way to do this is to retain the same source object, 
but to change the underlying media source that it reads from.  For 
example, if you are currently reading from a "ByteStreamFileSource", 
then I suggest using a new source class (that you would write) that 
lets you change the underlying input 'open file'.  That way, you 
don't need to mess around with "stopPlaying()"/"startPlaying()" - the 
RTP/RTCP-related code need not know that input source has changed.


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



More information about the live-devel mailing list