private void closeVideo(VideoControl vc) { VideoSourceBase vs = this.getVideoSourceByVideoControl(vc); switch (vc.Mode) { case ShowMode.Real: vs?.StopPreview(vc); break; case ShowMode.Playback: case ShowMode.PlayFile: vs?.StopPlayback(vc); break; default: break; } }
/// <summary> /// 关闭视频 /// </summary> /// <param name="vc"></param> public void StopVideo(VideoControl vc) { VideoSourceBase vs = this.getVideoSourceByVideoControl(vc); switch (vc.Mode) { case ShowMode.Real: vs?.StopPreview(vc); break; case ShowMode.Playback: case ShowMode.PlayFile: vs?.StopPlayback(vc); vc.PBStatus = VideoControl.PB_Status.BeforeStart; break; default: break; } vc.Mode = ShowMode.Stop; vc.CurrentCamera = null; this.m_VideoControlTable[vc] = null; vc.ErrorMessage = ""; }