public void Dispose() { if (_videoSourceCmd != null) { _videoSourceCmd.VideoDisplayEvent -= _syncRec.Set; _videoSourceCmd.Dispose(); } _videoSourceCmd = null; _syncRec.Dispose(); }
public VideoStorager(string videoId, int streamId) { VideoId_StreamId = $"{videoId}_{streamId}"; string path = System.IO.Path.Combine(GlobalData.Path, VideoId_StreamId); _syncRec = new SyncRecorder(path); VideoSource source = VideoSourcesCmd.Instance.GetVideoSource(videoId, streamId); _videoSourceCmd = new VideoSourceCmd(source); _videoSourceCmd.VideoDisplayEvent += _syncRec.Set; }