laiyuliang123 2015-05-21 03:22
浏览 1833

大华摄像头二次开发能登录监录像不能显示在控件上,保存视频文格式是什么

private void Form1_Load(object sender, EventArgs e)
{
pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
pictureBox1.Location = new System.Drawing.Point(0, 0);
pictureBox1.Size = new System.Drawing.Size(229, 176);
pictureBox1.TabIndex = 1;
pictureBox1.TabStop = false;
pictureBox1.Tag = "0";

        handle = pictureBox1.Handle;         
        disConnect = new fDisConnect(DisConnectEvent);
        DHClient.DHInit(disConnect, IntPtr.Zero);
        DHClient.DHSetEncoding(LANGUAGE_ENCODING.gb2312);
        NET_DEVICEINFO info = new NET_DEVICEINFO();
        ID = DHClient.DHLogin("10.1.50.243", 37777, "admin", "admin", out info, out error);
        isLogin = DHClient.DHStartListen(ID);
        RealHandle = DHClient.DHRealPlay(ID, 0, handle);
        cbRealData = new fRealDataCallBack(cbRealDataFun);
        //isSave = DHClient.DHStartSaveRealData(RealHandle, "D:/1.dav");
        //pictureBox1.Show();
        pictureBox1.Refresh();

        if (isLogin)
        {
            MessageBox.Show(string.Format("Login True!"));
        }
        else
        {
            MessageBox.Show(string.Format("Login False!"));
        }

        if (RealHandle == 0)
        {
            MessageBox.Show(string.Format("Play False!"));
        }
        else
        {
            MessageBox.Show(string.Format("Play True!"));
        }
        if (DHClient.DHSetRealDataCallBack(RealHandle, cbRealData, IntPtr.Zero) == true)//设置数据回调处理函数
        {
            MessageBox.Show("设置数据回调处理函数成功!");
        }
        else
        {
            MessageBox.Show("设置数据回调处理函数失败!");
            return;
        }
        if (isSave)
        {
            MessageBox.Show(string.Format("Save True!"));
        }
        else
        {
            MessageBox.Show(string.Format("Save False!"));
        }

    }
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥15 stable diffusion
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误