[Live-devel] ending RTSPServer application
pierre.lhussiez
pierre.lhussiez at laposte.net
Thu Sep 1 15:13:36 PDT 2005
Hi ross,
I have a little problem when my application is ending, not all the memory is unallocated.
After exiting the doEventLoop, I close RTSPServer using Medium::close(rtspServer).
Then RTSPServer::close(rtspServer); delete the ServerMediaSession and the ServerMediaSubsession but does not call Medium::close for other medium than RTSPServer.
So when I try to delete the environment then env->reclaim(); does not delete itself. Because the public void* UsageEnvironment::liveMediaPriv member is not NULL.
What is the way to follow?
The Following is my main code part:
RTSPServer* rtspServer;
UsageEnvironment* env;
TaskScheduler* scheduler;
//derive from BasicTaskScheduler
schedule = OperaTaskScheduler::createNew();
env = BasicUsageEnvironment::createNew(*scheduler);
rtspServer = RTSPServer::createNew(*env);
ServerMediaSession* sms
= ServerMediaSession::createNew(*env, NULL, inputFileName,
"Session streamed by \"audioStreamer\"", isSSM);
//derive from OperaPassiveServerMediaSubsession
sms->addSubsession(OperaLiveServerMediaSubsession:: createNew(*env, inputFileName, true /* reusefirst*/, false, NULL));
rtspServer->addServerMediaSession(sms);
env->taskScheduler().doEventLoop(); // return on a specific windoze event
Medium::close(rtspServer);
env->reclaim(); //does not perform 'delete this'
delete scheduler;
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live.com/pipermail/live-devel/attachments/20050901/df9c4014/attachment.html
More information about the live-devel
mailing list