[Live-devel] Closing injector question

jers at inwind.it jers at inwind.it
Mon Sep 19 15:11:02 PDT 2005


Hi all
 
I'm a new user of Live library and I'd like to create an injector "on demand". I mean I'd like to start and stop injecting (and therefore stop playing the device source) and, then, restart it after some time! I don't know what is the safer way to do it. 
I mean, is it enough to close the DarwinInjector ? 
or do I close the RTCPInstance, the videosink, and then the videoSource?
Looking at the source it seems to me that there are objects that won't be removed.
For example the MediaSession session created near line 192 of DarwinInjector.cpp, may be I'm wrong, but I don't see where it is freed.

Can this be the right policy?

        close(injector);  // DarwinInjector Object
        close(videoRTCP); // RTCPInstance Obj
        close(videoSink); //  MPEG4ESVideoRTPSink Obj
        delete rtcpGroupsockVideo;
        delete rtpGroupsockVideo;
        close(videoSource);     // closes also videoES

Thanks in advance.
Jers




More information about the live-devel mailing list