Ejemplo n.º 1
0
        //供时间轴调用
        public void PlayRecVideo(int index)
        {
            if (lPort != -1)
            {
                lRet = VM_Player_Vlc.VMK_Player_Close(lPort);
            }
            lPort = lPorts[index];
            lRet  = VM_Player_Vlc.VMK_Player_Open(lPort, paths[index]);
            lRet  = VM_Player_Vlc.VMK_Player_SetHwnd(lPort, pictureBox1.Handle);
            lRet  = VM_Player_Vlc.VMK_Player_Play(lPort);

            if (lRet < 0)
            {
                MessageBox.Show("播放录像失败!");
            }
        }
Ejemplo n.º 2
0
        //播放
        private void button1_Click(object sender, EventArgs e)
        {
            //if(lPort!=-1)
            //lRet = VM_Player_Vlc.VMK_Player_Close(lPort);
            lPort = 1;
            string path = dataGridView1.SelectedRows[0].Cells[1].Value.ToString();

            lPort = (int)dataGridView1.SelectedRows[0].Cells[2].Value;
            lRet  = VM_Player_Vlc.VMK_Player_Open(lPort, path);
            lRet  = VM_Player_Vlc.VMK_Player_SetHwnd(lPort, pictureBox1.Handle);
            lRet  = VM_Player_Vlc.VMK_Player_Play(lPort);

            int RecodingTime = VM_Player_Vlc.VMK_Player_GetPlayedTime(lPort);

            //trackBar1.Value = 0;
            trackBar1.Maximum = RecodingTime * 1000;
            if (lRet < 0)
            {
                MessageBox.Show("播放录像失败!");
            }
        }
Ejemplo n.º 3
0
        //播放
        private void button10_Click(object sender, EventArgs e)
        {
            if (lPort != -1)
            {
                lRet = VM_Player_Vlc.VMK_Player_Close(lPort);
            }
            if (dataGridView1.Rows.Count == 0 || dataGridView1.SelectedRows.Count == 0)
            {
                return;
            }
            string path = dataGridView1.SelectedRows[0].Cells[1].Value.ToString();

            lPort = (int)dataGridView1.SelectedRows[0].Cells[2].Value;
            lRet  = VM_Player_Vlc.VMK_Player_Open(lPort, path);
            lRet  = VM_Player_Vlc.VMK_Player_SetHwnd(lPort, pictureBox1.Handle);
            lRet  = VM_Player_Vlc.VMK_Player_Play(lPort);
            if (lRet < 0)
            {
                MessageBox.Show("播放录像失败!");
            }
        }