private void changeStreamIndex(VideoControlActionEventArgs vca) { if (this.config.AutoChangeStreamIndex == false) { return; } if (vca.Camera == null) { return; } if (vca.VControl.CurrentCamera == null) { return; } if (vca.VControl.Mode != ShowMode.Real) { return; } VideoSourceBase vs = this.getVideoSourceByVideoControl(vca.VControl); VideoPanel panel = this.m_VideoPanelTable[vca.VControl.VideoPanelID] as VideoPanel; //if (vca.VControl.IsMax) // vs?.ChangeStreamIndex(vca.VControl.VControl, 0); //else //{ // if (this.CurLayout.ControlList.Count > 4) // { // this.m_StreamManager.ChangeStreamIndex(vca.VControl.VControl, 1); // } //} }
private void vc_ActionProc(object sender, VideoControlActionEventArgs e) { VideoControlActionEventArgs voe = e as VideoControlActionEventArgs; switch (voe.Type) { case VideoControlAction.FullScreen: case VideoControlAction.NormalScreen: if (this.CurLayout.ScreenCount == 1) { foreach (VideoControlLayout vcl in this.CurLayout.ControlList) { if (vcl.Control != voe.VControl) { vcl.Control.IsMax = false; } } } this.RefreshPanel(this, new EventArgs()); break; } }
private void Vc_ActionEvent(object sender, VideoControlActionEventArgs args) { var vs = this.getVideoSourceByVideoControl(args.VControl); switch (args.Type) { case VideoControlAction.CloseVideo: this.closeVideo(args.VControl); break; case VideoControlAction.PB_Play: if (args.Arg != null && args.Camera != null) { this.closeVideo(args.VControl); vs?.StartPlaybackByTime(args.Camera, args.VControl, ((PlaybackInfo)args.Arg).Start, ((PlaybackInfo)args.Arg).End); } break; case VideoControlAction.PB_Resume: vs?.PB_Resume(args.VControl); args.VControl.PBStatus = VideoControl.PB_Status.Play; break; case VideoControlAction.PB_Pause: vs?.PB_Pause(args.VControl); args.VControl.PBStatus = VideoControl.PB_Status.Pause; break; case VideoControlAction.PB_Stop: this.StopVideo(args.VControl); args.VControl.PBStatus = VideoControl.PB_Status.BeforeStart; break; case VideoControlAction.PB_Fast: vs?.PB_Fast(args.VControl); break; case VideoControlAction.PB_Slow: vs?.PB_Slow(args.VControl); break; case VideoControlAction.PB_Step: vs?.PB_Step(args.VControl); break; case VideoControlAction.Snap: this.snap(args.VControl); break; case VideoControlAction.Seleced: this.setSelected(args.VControl); break; case VideoControlAction.PB_SetPos: vs?.PB_SetPos(args.VControl, (int)args.Arg); break; case VideoControlAction.PB_StratDownload: this.startDownload(args.VControl); break; case VideoControlAction.PB_StopDownload: this.stopDownload(args.VControl); break; case VideoControlAction.ErrorReport: this.LogModule.Error(args.Arg.ToString()); break; case VideoControlAction.Transposition: try { int oldIndex = Convert.ToInt32(args.Arg.ToString()); int newIndex = Convert.ToInt32(args.VControl.Name); VideoPanel panel = this.m_VideoPanelTable[args.VControl.VideoPanelID] as VideoPanel; panel?.Transposition(oldIndex, newIndex); } catch { } break; case VideoControlAction.FullScreen: case VideoControlAction.NormalScreen: //this.changeStreamIndex(vca); break; case VideoControlAction.OpenSound: this.openSound_VC(args.VControl); break; case VideoControlAction.CloseSound: this.closeSound_VC(args.VControl); break; } }