public bool Slow(string name) { foreach (CHKDVRDevice device in mVideoDevices.Values) { IBackPlayer play = device.GetPlayer(name) as IBackPlayer; if (play != null) { return(play.Slow()); } } return(false); }
public bool Goto(string name, ref DateTime gotoTime) { foreach (CHKDVRDevice device in mVideoDevices.Values) { IBackPlayer play = device.GetPlayer(name) as IBackPlayer; if (play != null) { return(play.Locate(gotoTime)); } } return(false); }
public bool Stop() { if (mVideoSource != null) { IBackPlayer player = mVideoSource as IBackPlayer; if (player != null) { return(player.Pause()); } else { return(mVideoSource.Stop()); } } return(false); }
private void button_download_Click(object sender, EventArgs e) { if (this.saveFileDialog1.ShowDialog() == DialogResult.OK) { VideoPlayer player = videoPlayerManageCtrl1.ActiveBox; if (player != null) { IBackPlayer backPlay = player.VideoSource as IBackPlayer; if (backPlay != null) { //backPlay.StartDownload(this.saveFileDialog1.FileName); backPlay.StartDownload(dateTimePicker_begin.Value, dateTimePicker_end.Value, this.saveFileDialog1.FileName); return; } } TreeNode node = dataTreeView1.SelectedNode; if (node != null) { IVideoSourceConfig vsConfig = VSUtil.GetBackPlayConfig(node.Tag as DataRow); if (vsConfig != null) { vsConfig.StartTime = dateTimePicker_begin.Value; vsConfig.StopTime = dateTimePicker_end.Value; IVideoSource vs = CLocalSystem.VideoSourceManager.Open(vsConfig, IntPtr.Zero); if (vs != null) { IBackPlayer backPlay = vs as IBackPlayer; if (backPlay != null) { backPlay.RecordFile.OnDownProgress += new RECORDFILE_DOWNPROGRESS(DoDownProgress); backPlay.StartDownload(this.saveFileDialog1.FileName); } } } } } }