﻿{"id":1431,"date":"2024-08-17T18:43:01","date_gmt":"2024-08-17T10:43:01","guid":{"rendered":"https:\/\/www.tansoo.cn\/?p=1431"},"modified":"2024-08-17T18:43:01","modified_gmt":"2024-08-17T10:43:01","slug":"phpbb-94","status":"publish","type":"post","link":"https:\/\/www.tansoo.cn\/?p=1431","title":{"rendered":"\u6d77\u5eb7\u6444\u50cf\u673a\u5e93\u51fd\u6570\u8fde\u63a5\u53ca\u663e\u793a\u89c6\u9891"},"content":{"rendered":"<p>\u8fde\u63a5\u9700\u8981\u6444\u50cf\u673a\u7684\uff1aIP\u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001\u7528\u6237\u540d\u3001\u767b\u5f55\u5bc6\u7801\u3002<br \/>\n\u5f00\u53d1\u5305\u4e0b\u8f7d\uff1a<\/p>\n<div class=\"inline-attachment\"><!-- ia0 -->HCNetSDK.zip<!-- ia0 --><\/div>\n<div class=\"codebox_plus_wrap\">\n<div class=\"codebox_plus_header\"><strong>Code: <\/strong><a href=\"#\" onclick=\"codebox_plus_select(this, 1); return false;\">[\u5168\u9009]<\/a>&nbsp;<a href=\"#\" onclick=\"codebox_plus_toggle(this, 1); return false;\">[Expand\/Collapse]<\/a><\/div>\n<div>\n<div style=\"display: inline;\">\n<div class=\"cpp\" style=\"font-family:monospace;\">\n<ol>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\"><span style=\"color: #0000ff;\">void<\/span> MainWindow<span style=\"color: #008080;\">::<\/span><span style=\"color: #007788;\">on_btn_dvr_connect_clicked<\/span><span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\"><span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; <span style=\"color: #0000ff;\">if<\/span><span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #000040;\">!<\/span>dvr_connected<span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/ 1.\u521d\u59cb\u5316\u6d77\u5eb7\u76d1\u63a7SDK<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">bool<\/span> isok <span style=\"color: #000080;\">=<\/span> NET_DVR_Init<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">if<\/span><span style=\"color: #008000;\">&#40;<\/span>isok<span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qDebug<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> <span style=\"color: #FF0000;\">&quot;SDK\u521d\u59cb\u5316\u6210\u529f!&quot;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loger<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot;1.\u6d77\u5eb7SDK\u521d\u59cb\u5316\u6210\u529f\uff01\u8fde\u63a5\u6444\u50cf\u5934\uff1a&quot;<\/span> <span style=\"color: #000040;\">+<\/span> ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>edit_dvr_host<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>text<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #000040;\">+<\/span> <span style=\"color: #FF0000;\">&quot;:&quot;<\/span> <span style=\"color: #000040;\">+<\/span> ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>edit_dvr_post<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>text<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/\u8bbe\u7f6e\u8fde\u63a5\u65f6\u95f4\u4e0e\u91cd\u8fde\u65f6\u95f4<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/ NET_DVR_SetConnectTime(3000, 3);<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/ NET_DVR_SetReconnect(30000, true);<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/ 2.\u8bbe\u7f6e\u8fde\u63a5\u76f8\u673a\u7684\u4fe1\u606f\uff0c\u7528\u6237\u6ce8\u518c\u8bbe\u5907<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_USER_LOGIN_INFO struLoginInfo<span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u5305\u542b\u76f8\u673a\u53c2\u6570\u7684\u7ed3\u6784\u4f53<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_DEVICEINFO_V40 struDeviceInfoV40<span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u767b\u5f55\u540e\u7684\u76f8\u673a\u4fe1\u606f<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp;<\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struLoginInfo.<span style=\"color: #007788;\">bUseAsynLogin<\/span> <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u540c\u6b65\u767b\u5f55\u65b9\u5f0f<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strcpy_s<span style=\"color: #008000;\">&#40;<\/span>struLoginInfo.<span style=\"color: #007788;\">sDeviceAddress<\/span>, ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>edit_dvr_host<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>text<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span>.<span style=\"color: #007788;\">toLatin1<\/span><span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u8bbe\u5907IP\u5730\u5740<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struLoginInfo.<span style=\"color: #007788;\">wPort<\/span> <span style=\"color: #000080;\">=<\/span> ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>edit_dvr_post<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>text<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span>.<span style=\"color: #007788;\">toInt<\/span><span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u8bbe\u5907\u670d\u52a1\u7aef\u53e3<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strcpy_s<span style=\"color: #008000;\">&#40;<\/span>struLoginInfo.<span style=\"color: #007788;\">sUserName<\/span>, ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>edit_dvr_user<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>text<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span>.<span style=\"color: #007788;\">toLatin1<\/span><span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u8bbe\u5907\u767b\u5f55\u7528\u6237\u540d<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; strcpy_s<span style=\"color: #008000;\">&#40;<\/span>struLoginInfo.<span style=\"color: #007788;\">sPassword<\/span>, ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>edit_dvr_password<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>text<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span>.<span style=\"color: #007788;\">toLatin1<\/span><span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u8bbe\u5907\u767b\u5f55\u5bc6\u7801<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp;<\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lUserID <span style=\"color: #000080;\">=<\/span> NET_DVR_Login_V40<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #000040;\">&amp;<\/span>struLoginInfo, <span style=\"color: #000040;\">&amp;<\/span>struDeviceInfoV40<span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u8bbe\u5907\u767b\u5f55<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp;<\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">if<\/span><span style=\"color: #008000;\">&#40;<\/span>lUserID <span style=\"color: #000080;\">&lt;<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qDebug<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> <span style=\"color: #FF0000;\">&quot;\u767b\u5f55\u5931\u8d25: &quot;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> NET_DVR_GetLastError<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loger<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot; &nbsp;&#8230;\u6444\u50cf\u5934\u8fde\u63a5\u5931\u8d25\uff0c\u9519\u8bef\u4ee3\u7801\uff1a&quot;<\/span> <span style=\"color: #000040;\">+<\/span> QString<span style=\"color: #008080;\">::<\/span><span style=\"color: #007788;\">number<\/span><span style=\"color: #008000;\">&#40;<\/span>NET_DVR_GetLastError<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_Cleanup<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><span style=\"color: #666666;\">\/\/\u91ca\u653e SDK \u8d44\u6e90<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">return<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">else<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qDebug<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> <span style=\"color: #FF0000;\">&quot;\u767b\u5f55\u6210\u529f &quot;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loger<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot; &nbsp;&#8230;\u6444\u50cf\u5934\u8fde\u63a5\u6210\u529f\uff01&quot;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/ HWND hWnd = (HWND)ui-&gt;graphicsView-&gt;winId(); \/\/\u83b7\u53d6\u7a97\u53e3\u53e5\u67c4<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HWND hWnd <span style=\"color: #000080;\">=<\/span> <span style=\"color: #008000;\">&#40;<\/span>HWND<span style=\"color: #008000;\">&#41;<\/span>ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>graphicsView<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>winId<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u83b7\u53d6\u7a97\u53e3\u53e5\u67c4<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_PREVIEWINFO struPlayInfo<span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struPlayInfo.<span style=\"color: #007788;\">hPlayWnd<\/span> <span style=\"color: #000080;\">=<\/span> hWnd<span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u9700\u8981 SDK \u89e3\u7801\u65f6\u53e5\u67c4\u8bbe\u4e3a\u6709\u6548\u503c\uff0c\u4ec5\u53d6\u6d41\u4e0d\u89e3\u7801\u65f6\u53ef\u8bbe\u4e3a\u7a7a<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struPlayInfo.<span style=\"color: #007788;\">lChannel<\/span> <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">1<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/\u9884\u89c8\u901a\u9053\u53f7<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struPlayInfo.<span style=\"color: #007788;\">dwStreamType<\/span> <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/0-\u4e3b\u7801\u6d41\uff0c1-\u5b50\u7801\u6d41\uff0c2-\u7801\u6d41 3\uff0c3-\u7801\u6d41 4\uff0c\u4ee5\u6b64\u7c7b\u63a8<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struPlayInfo.<span style=\"color: #007788;\">dwLinkMode<\/span> <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/0- TCP \u65b9\u5f0f\uff0c1- UDP \u65b9\u5f0f\uff0c2- \u591a\u64ad\u65b9\u5f0f\uff0c3- RTP \u65b9\u5f0f\uff0c4-RTP\/RTSP\uff0c5-RSTP\/HTTP<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; struPlayInfo.<span style=\"color: #007788;\">bBlocked<\/span> <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000dd;\">1<\/span><span style=\"color: #008080;\">;<\/span> <span style=\"color: #666666;\">\/\/0- \u975e\u963b\u585e\u53d6\u6d41\uff0c1- \u963b\u585e\u53d6\u6d41<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lRealPlayHandle <span style=\"color: #000080;\">=<\/span> NET_DVR_RealPlay_V40<span style=\"color: #008000;\">&#40;<\/span>lUserID, <span style=\"color: #000040;\">&amp;<\/span>struPlayInfo, nullptr, nullptr<span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp;<\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">if<\/span><span style=\"color: #008000;\">&#40;<\/span>lRealPlayHandle <span style=\"color: #000080;\">&lt;<\/span> <span style=\"color: #0000dd;\">0<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qDebug<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> <span style=\"color: #FF0000;\">&quot;\u9884\u89c8\u5931\u8d25: &quot;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> NET_DVR_GetLastError<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loger<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot; &nbsp;&#8230;.\u56fe\u50cf\u9884\u89c8\u5931\u8d25\uff0c\u9519\u8bef\u4ee3\u7801\uff1a&quot;<\/span> <span style=\"color: #000040;\">+<\/span> QString<span style=\"color: #008080;\">::<\/span><span style=\"color: #007788;\">number<\/span><span style=\"color: #008000;\">&#40;<\/span>NET_DVR_GetLastError<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_Logout<span style=\"color: #008000;\">&#40;<\/span>lUserID<span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_Cleanup<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">return<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>btn_dvr_connect<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>setText<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot;\u5173\u95ed\u6444\u50cf\u5934&quot;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dvr_connected <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000ff;\">true<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #0000ff;\">else<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; qDebug<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> <span style=\"color: #FF0000;\">&quot;SDK\u521d\u59cb\u5316\u5931\u8d25: &quot;<\/span> <span style=\"color: #000080;\">&lt;&lt;<\/span> NET_DVR_GetLastError<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loger<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot;&gt;\u6d77\u5eb7SDK\u521d\u59cb\u5316\u5931\u8d25\uff0c\u9519\u8bef\u4ee3\u7801\uff1a&quot;<\/span> <span style=\"color: #000040;\">+<\/span> QString<span style=\"color: #008080;\">::<\/span><span style=\"color: #007788;\">number<\/span><span style=\"color: #008000;\">&#40;<\/span>NET_DVR_GetLastError<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; <span style=\"color: #0000ff;\">else<\/span> <span style=\"color: #008000;\">&#123;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/\u5173\u95ed\u9884\u89c8<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_StopRealPlay<span style=\"color: #008000;\">&#40;<\/span>lRealPlayHandle<span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; <span style=\"color: #666666;\">\/\/\u6ce8\u9500\u7528\u6237<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_Logout<span style=\"color: #008000;\">&#40;<\/span>lUserID<span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; NET_DVR_Cleanup<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; loger<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot;&gt;\u65ad\u5f00\u4e0e\u6444\u50cf\u5934\u8fde\u63a5\u3002&quot;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; ui<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>btn_dvr_connect<span style=\"color: #000040;\">&#8211;<\/span><span style=\"color: #000080;\">&gt;<\/span>setText<span style=\"color: #008000;\">&#40;<\/span><span style=\"color: #FF0000;\">&quot;\u8fde\u63a5\u6444\u50cf\u5934&quot;<\/span><span style=\"color: #008000;\">&#41;<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; &nbsp; &nbsp; dvr_connected <span style=\"color: #000080;\">=<\/span> <span style=\"color: #0000ff;\">false<\/span><span style=\"color: #008080;\">;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\">&nbsp; &nbsp; <span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<li style=\"margin-left:20px;\">\n<div style=\"border-bottom: dotted 1px #cccccc;\"><span style=\"color: #008000;\">&#125;<\/span><\/div>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"codebox_plus_footer\">GeSHi &copy; Codebox Plus Extension<\/div>\n<\/div>\n<p><small>\u539f\u6587\u4f5c\u8005: BG6RSH | <a href=\"https:\/\/bbs.tansoo.cn\/viewtopic.php?t=94\" target=\"_blank\" rel=\"noopener\">\u67e5\u770b\u539f\u5e16<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fde\u63a5\u9700\u8981\u6444\u50cf\u673a\u7684\uff1aIP\u5730\u5740\u3001\u7aef\u53e3\u53f7\u3001\u7528\u6237\u540d\u3001\u767b\u5f55\u5bc6\u7801\u3002 \u5f00\u53d1\u5305\u4e0b\u8f7d\uff1a HCNet &hellip; <a href=\"https:\/\/www.tansoo.cn\/?p=1431\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105],"tags":[],"class_list":["post-1431","post","type-post","status-publish","format-standard","hentry","category-105"],"_links":{"self":[{"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=\/wp\/v2\/posts\/1431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1431"}],"version-history":[{"count":0,"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=\/wp\/v2\/posts\/1431\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tansoo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}