[Live-devel] AAC/H264 Closing Down
Goran Ambardziev
goran.ambardziev at gmail.com
Tue Apr 8 14:43:33 PDT 2014
> >>/ Btw, what is the correct sequence of closing the RTSP server and other classes from live555.
> /
> The easiest way is just to call:
> exit(0);
>
> However, if (for some reason) you want to keep the process around, even after you've destroyed the server, you can do so by:
> - Calling "Medium::close()" on all of your 'source', 'sink', and 'RTCPInstance' objects.
> - Calling "Medium::close()" on your RTSP server
> - Deleting your 'Groupsock' objects.
> - Calling env->reclaim();
> - Doing delete scheduler;
I need the process to stay alive after I'm done with streaming, so I
cannot call exit(0)
I do closing like this. Signal done flag. Call stop playing on Sinks.
Close sources, sinks, RTCPInstance objects etc.
I get an access violation error when closing VideoSink (m_pRtpVideoSink).
The error is in method "void FramedSource::stopGettingFrames()" when
calling "doStopGettingFrames*()*". Why could this be happening?
m_pUsageEnv->taskScheduler().doEventLoop( &m_doneFlag ); // does not return
// Close everything
//
if(m_pRtpVideoSink != NULL)
{
m_pRtpVideoSink->stopPlaying();
}
if(m_pRtpAudioSink != NULL)
{
m_pRtpAudioSink->stopPlaying();
}
Medium::close( m_pH264FramedSource );
Medium::close( m_pAacFrameedSource );
Medium::close( m_pRtpVideoSink );
Medium::close( m_pRtpAudioSink );
Medium::close(rtcp);
Medium::close(rtcpAudio);
Medium::close(rtspServer);
rtpVideoGroupsock->removeAllDestinations();
rtcpVideoGroupsock->removeAllDestinations();
delete rtpVideoGroupsock;
delete rtcpVideoGroupsock;
rtpAudioGroupsock->removeAllDestinations();
rtcpAudioGroupsock->removeAllDestinations();
delete rtpAudioGroupsock;
delete rtcpAudioGroupsock;
m_pUsageEnv->reclaim();
delete scheduler;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140408/c3364aa8/attachment.html>
More information about the live-devel
mailing list