【问题标题】:integrate vivotek ip camera in C# windows application using VitaminCtrl使用 VitaminCtrl 将 vivotek ip camera 集成到 C# windows 应用程序中
【发布时间】:2014-06-26 13:25:03
【问题描述】:

我开发了一个应用程序来从 vivotek ip camera 获取视频,代码如下,但它显示连接到 10.60.13.12... 没有收到视频

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using VITAMINDECODERLib;

using AxVITAMINDECODERLib;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }


        private void btnconnect_Click_1(object sender, EventArgs e)

        {

            string strPreIP = "http://";

            if (txtip.TextLength != 0)
                axVitaminCtrl1.Url = strPreIP + txtip.Text;

            // Port
            axVitaminCtrl1.HttpPort = Convert.ToInt32(txtport.Text);

            // User name
            if (txtusername.TextLength != 0)
                axVitaminCtrl1.UserName = txtusername.Text;

            // Password
            if (txtpass.TextLength != 0)
                axVitaminCtrl1.Password = txtpass.Text;

            // View stream
            axVitaminCtrl1.ViewStream = (VITAMINDECODERLib.EDualStreamOption)comboviewstream.SelectedIndex.GetHashCode();

            // Protocol
            axVitaminCtrl1.ConnectionProtocol = (VITAMINDECODERLib.EConnProtocol)comboprotocol.SelectedIndex.GetHashCode() + 1;

            axVitaminCtrl1.Connect();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            axVitaminCtrl1.Disconnect();
        }

        private void comboviewstream_SelectedIndexChanged(object sender, EventArgs e)
        {
            axVitaminCtrl1.ViewStream = (VITAMINDECODERLib.EDualStreamOption)((System.Windows.Forms.ComboBox)sender).SelectedIndex.GetHashCode();
        }

        private void axVitaminCtrl1_OnVideoCodec(object sender, _IVitaminCtrlEvents_OnVideoCodecEvent e)
        {
            e.eVideoCodec = VITAMINDECODERLib.EVideoCodecType.eViCodecMJpeg;
        }
    }
}

【问题讨论】:

    标签: camera ip


    【解决方案1】:
    1. 您应该检查调试/发布平台(将其更改为 x86)
    2. 运行此程序的电脑和相机应该有相同的子网

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-09-23
      • 1970-01-01
      • 2020-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多