[Live-devel] Changing from Multicast to Unicast

Piers Hawksley piers.hawksley at panogenics.com
Fri Oct 25 06:25:01 PDT 2013


 >> Am I missing a step in the remove code ?

 >Yes.  What you're missing is that a "PassiveServerMediaSubsession" 
object refers to a stream that exists independently (as opposed to an 
"OnDemandServerMediaSubsession", that creates (and destroys) its own 
stream, on demand).  Therefore, for the multicast case, you need to not 
only create the stream separately, you also need to destroy it separately.

Thanks for the explanation and code - it sounds obvious now you've 
explained it.

 >> To remove
 >> rtspServer->deleteServerMediaSession(stream->sms);
 >> stream->sms->deleteAllSubsessions();

 >The second statement is unnecessary.  Even worse, it can cause a 
crash, because the first statement deletes the "stream->sms" object!

Thanks - second statement removed.

 >Of course, there's also a call to sink<-startPlaying(*videoSource, ...);

Sorry - I did have a call to startPlaying ... just failed to add it to 
the question !

Thanks for correcting me - my application now works correctly.

Cheers,
Piers


More information about the live-devel mailing list