>>/  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;

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to