[Live-devel] OnDemandServerMediaSubSession

Ross Finlayson finlayson at live.com
Fri Jun 24 10:08:40 PDT 2005


>. Is it basicaly possible to write an OnDemandServer to stream on a 
>multicast address?

It's probably possible to do this, but it would be a bit strange, because 
"OnDemandServerMediaSubsession", as written, creates and 'plays' a new 
"RTPSink" object for each client connection.  In your case, that is not 
what you want.  Instead, you want to create just a single "RTPSink", but to 
'play' it only when one or more clients are requesting it.

So, instead, I would suggest subclassing "PassiveServerMediaSubsession" 
(which you already have working), and redefining the virtual functions 
"startStream()" and "deleteStream()" to start playing, or stop playing, the 
"RTPSink" object, based on a reference count.  I.e., "startStream" would 
increment the reference count, and start playing the "RTPSink" if the 
reference count is now 1.  "deleteStream" would decrement the reference 
count, and stop playing the "RTPSink" if the reference count is now 0.


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



More information about the live-devel mailing list