資源簡介
private void play()
{
disConnect = new fDisConnect(DisConnectEvent);
bool blnInit = DHClient.DHInit(disConnect, IntPtr.Zero);
deviceInfo = new NET_DEVICEINFO();
int error = 0;

代碼片段和文件信息
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?DHNetSDK;
using?DHPlaySDK;
namespace?監控測試
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????private?NET_DEVICEINFO?deviceInfo;
????????///?
????????///?設備用戶登錄ID
????????///?
????????private?int?pLoginID;
??????
????????///?
????????///?程序消息提示title
????????///?
????????private?const?string?pMsgtitle?=?“沙場專用“;
????????///?
????????///?最后操作信息顯示格式
????????///?
????????private?const?string?pErrInfoFormatstyle?=?“代碼:errcode;\n描述:errmSG.“;
????????///?
????????///?實時監視句柄
????????///?
????????private?int?uRealHandle;
????????///?
????????///?實時監視數據回調
????????///?
????????private?fRealDataCallBack?cbRealData;
????????///?
????????///?斷開連接回調
????????///?
????????private?fDisConnect?disConnect;
????????///?
????????///?是否己設置實時數據回調
????????///?
????????private?bool?blnSetRealDataCallBack?=?false;
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????picPlayMain.Width?=?this.Width;
????????????picPlayMain.Height?=?this.Height;
????????????play();
????????}
????????private?void?play()
????????{
????????????disConnect?=?new?fDisConnect(DisConnectEvent);
????????????bool?blnInit?=?DHClient.DHInit(disConnect?IntPtr.Zero);
????????????deviceInfo?=?new?NET_DEVICEINFO();
????????????int?error?=?0;
????????????pLoginID?=?DHClient.DHLogin(“192.168.1.118“?27777?“admin“?“admin“?out?deviceInfo?out?error);
????????????if?(pLoginID?!=?0)
????????????{
????????????????uRealHandle?=?DHClient.DHRealPlay(pLoginID?0?IntPtr.Zero);//只取數據不播放
????????????????cbRealData?=?new?fRealDataCallBack(cbRealDataFun);
????????????????if?(DHPlay.DHPlayControl(PLAY_COMMAND.OpenStream?0?IntPtr.Zero?0?(UInt32)(900?*?1024)))
????????????????{
????????????????}
????????????????else
????????????????{
????????????????????MessageBox.Show(“打開流播放失敗!“?pMsgtitle);
????????????????????return;
????????????????}
????????????????if?(DHPlay.DHSetStreamOpenMode(0?PLAY_MODE.STREAME_REALTIME))//設置流播放模式
????????????????{
????????????????}
????????????????else
????????????????{
????????????????????MessageBox.Show(“設置流播放模式失敗!“?pMsgtitle);
????????????????????return;
????????????????}
????????????????if?(DHPlay.DHPlayControl(PLAY_COMMAND.Start?0?picPlayMain.Handle))
????????????????{
????????????????}
????????????????else
????????????????{
????????????????????MessageBox.Show(“流播放開始失敗!“?pMsgtitle);
????????????????????//btnStopRealPlay.Enabled?=?false;
????????????????????return;
????????????????}
????????????????if?(blnSetRealDataCallBack?==?true
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????114688??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\aacdec.dll
?????文件??????48640??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\adpcmdec.dll
?????文件?????154624??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\amrdec.dll
?????文件????????414??2015-03-17?09:49??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\avglobal.h
?????文件????1862144??2015-03-17?09:57??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\avnetsdk.dll
?????文件????2135040??2015-03-17?09:56??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhconfigsdk.dll
?????文件?????458893??2015-03-17?09:49??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhconfigsdk.h
?????文件???????2542??2015-03-17?09:56??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhconfigsdk.lib
?????文件?????660480??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhlog.dll
?????文件????5552640??2015-03-17?09:56??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhnetsdk.dll
?????文件????1219600??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhnetsdk.h
?????文件?????115294??2015-03-17?09:56??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhnetsdk.lib
?????文件??????69632??2008-04-30?08:45??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\DHNetSDKCS.dll
?????文件?????247041??2008-04-30?08:45??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\DHNetSDKcs.xm
?????文件????1318912??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\dhplay.dll
?????文件??????28672??2008-04-30?08:45??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\DHPlaySDKCS.dll
?????文件??????64310??2008-04-30?08:45??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\DHPlaySDKCS.xm
?????文件??????24576??2008-04-30?08:45??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\DHVDCSDKCS.dll
?????文件???????6042??2008-04-30?08:45??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\DHVDCSDKCS.xm
?????文件?????282624??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\h264dec.dll
?????文件????1045504??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\Infra.dll
?????文件?????296960??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\Json.dll
?????文件??????32768??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\mjpegdec.dll
?????文件??????60416??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\mp2dec.dll
?????文件?????614400??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\mp3dec.dll
?????文件?????196608??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\mpeg4dec.dll
?????文件?????672256??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\Netfr
?????文件??????20480??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\postproc.dll
?????文件?????454656??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\Stream.dll
?????文件????1439232??2015-03-17?09:50??C#?大華SDK開發例子??64位系統\監控測試\bin\Debug\StreamSvr.dll
............此處省略40個文件信息
評論
共有 條評論