public override void StopLiveStream(LiveStream liveStream)
{
lock (_liveStreamsLock)
{
try
{
if (_liveStreams.ContainsKey(liveStream.RtspUrl))
{
IUser tve3User = _liveStreamUsers[liveStream.RtspUrl];
#if USE_ARGUS_RTSP
StopRtspStream(liveStream);
#endif
if (TvServerPlugin.TvController_IsTimeShifting(ref tve3User))
{
if (!TvServerPlugin.TvController_StopTimeShifting(ref tve3User))
{
Log(TraceEventType.Error, "Failed to stop live stream '{0}'", liveStream.RtspUrl);
}
}
_liveStreams.Remove(liveStream.RtspUrl);
_liveStreamUsers.Remove(liveStream.RtspUrl);
}
CleanUpTimeshiftingFiles(liveStream.TimeshiftFile);
}
catch (Exception ex)
{
Log(TraceEventType.Error, ex.Message);
}
}
}