zoukankan      html  css  js  c++  java
  • 监控视频的测试

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using SIMUHKNETSDK;
    namespace SIMUSDK
    {
        public partial class Form1 : Form
        {
            private int m_videoHandle;//视频Handle
            private int m_userID;//当前用户ID
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                bool flag =SIMUHKNETSDK.SIMUHKNETSDK.NET_DVR_Init();
                int success = LoginVideo();
                if (success == -1)
                {
                    groupBox1.Text = "用户登录[连接失败]";
                }
                else
                {
                    groupBox1.Text = "用户登录[连接成功]";
                }
            }
    
            private int LoginVideo()
            {
                SIMUHKNETSDK.NET_DVR_DEVICEINFO serInfo = new SIMUHKNETSDK.NET_DVR_DEVICEINFO();
                m_userID = SIMUHKNETSDK.SIMUHKNETSDK.NET_DVR_Login(txtIP.Text, int.Parse(txtHost.Text), txtUserName.Text.ToString(), txtPassword.Text.ToString(), out serInfo);
                return m_userID;
            }
    
            private void button2_Click(object sender, EventArgs e)
            {
                for (int i = 1; i <= 4; i++)
                {
                    Panel panel = new Panel();
                    NET_DVR_CLIENTINFO cli = new NET_DVR_CLIENTINFO();
                    cli.lChannel = i;
                    cli.lLinkMode = 0;
                    cli.hPlayWnd = panel.Handle;
                    panel.Dock = DockStyle.Fill;
                    cli.sMultiCastIP = "0.0.0.0";
                    tableLayoutPanel1.Controls.Add(panel);
                    m_videoHandle =SIMUHKNETSDK.SIMUHKNETSDK.NET_DVR_RealPlay(m_userID, ref cli);
                }
    
            }
        }
    }

  • 相关阅读:
    Python day 34 并发编程、PID/PPID、实现多进程得两种方式
    Python Day33:粘包问题及粘包解决方案
    数据分析
    数据分析
    爬虫 之 mongodb数据库
    爬虫
    爬虫
    爬虫
    flask框架
    flask框架
  • 原文地址:https://www.cnblogs.com/w2011/p/2567755.html
Copyright © 2011-2022 走看看