• 监控视频的测试


    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);
                }
    
            }
        }
    }

  • 相关阅读:
    苦尽甘来之国产数据库风云榜2022年03月
    存储demo
    行云日志捕获
    重跑支持,删除历史数据
    SpingMVC:结果跳转方式与数据处理
    从Go编程看IO多路复用Select
    mac brew 安装
    对手价是什么意思
    WPF 自定义 窗体(抄袭Fluent.Ribbon仿VS窗体)
    领域驱动设计(2) 领域事件、DDD分层架构
  • 原文地址:https://www.cnblogs.com/w2011/p/2567755.html
Copyright © 2020-2023  润新知