Exemple #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("播放录像失败!");
            }
        }
Exemple #2
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("播放录像失败!");
            }
        }