002--onvif攝像機(jī)客戶端_第1頁(yè)
已閱讀1頁(yè),還剩29頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、Onvif攝像機(jī)的客戶端,以下攝像機(jī)均指標(biāo)準(zhǔn)onvif攝像機(jī),一、程序設(shè)計(jì)框架,,LinuxNVR Setup,LinuxNVR,,,現(xiàn)有協(xié)議,Camera-1,Camera-2,,Camera-n,…,,,,Onvif協(xié)議,二、Web Service,Web Service = SOAP + HTTP + WSDLSOAP 指簡(jiǎn)單對(duì)象訪問(wèn)協(xié)議WSDL(Web Services Description Language)web 服務(wù)

2、描述語(yǔ)言也是一個(gè)XML文檔,它通過(guò)HTTP向公眾發(fā)布,公告客戶端程序關(guān)于某個(gè)具體的 Web service服務(wù)的URL信息、方法的命名,參數(shù),返回值等,三、SOAP協(xié)議簡(jiǎn)介,SOAP 指簡(jiǎn)單對(duì)象訪問(wèn)協(xié)議,它是一種基于XML的消息通訊格式,用于網(wǎng)絡(luò)上,不同平臺(tái),不同語(yǔ)言的應(yīng)用程序間的通訊。 一條 SOAP 消息就是一個(gè)普通的 XML 文檔,包含下列元素: 1、Envelope 元素,標(biāo)識(shí)XML 文檔一條 SOAP 消息 2、He

3、ader 元素,包含頭部信息的XML標(biāo)簽3、Body 元素,包含所有的調(diào)用和響應(yīng)的主體信息的標(biāo)簽4、Fault 元素,錯(cuò)誤信息標(biāo)簽。,3.1、SOAP Fault 元素,Fault 元素表示 SOAP的錯(cuò)誤消息。它必須是 Body 元素的子元素,且在一條 SOAP 消息中,F(xiàn)ault 元素只能出現(xiàn)一次。Fault 元素?fù)碛邢铝凶釉兀?常用的SOAP Fault Codes,3.2、搜索攝像機(jī),搜索攝像機(jī)遵循ws-discov

4、ery協(xié)議,ws-discovery提供了兩種操作模式:ad hoc和managed模式。 ad hoc模式:客戶端會(huì)以多播的形式發(fā)送一個(gè)Probe(探測(cè))消息,如果服務(wù)匹配該信息,則以單播方式直接將響應(yīng)ProbeMatch消息發(fā)送到客戶端。 managed模式:代理模式,由代理發(fā)送Probe消息和接收ProbeMatch消息。,remotediscovery.wsdl.htm,Probe,

5、 ,參考Probe.xml,Probe.xml,uuid的獲取#include #include int main(){ unsigned char uu[17] = {0}; uuid_generate(uu); unsigned char uuid[37] = {0}; sprintf((char*)uuid, "%02x%02x%02

6、x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7], uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]); printf(&

7、quot;%s\n", uuid); return 0;}//g++ uuid.cpp -luuid,ProbeMatch, , ,參考ProbeMatch.xml,ProbeMatch.xml,需要解析出XAddrs

8、:http://192.168.0.102/onvif/device_serviceIP:192.168.0.102端口默認(rèn)80,3.3、Onvif協(xié)議交互,TCP連接ip:port(192.168.0.102:80) 。采用HTTP+SOAP的方式與攝像機(jī)交互。POST /onvif/device_service HTTP/1.1\r\nHost: 192.168.0.102\r\nContent-Type: applic

9、ation/soap+xml; charset=utf-8\r\nContent-Length: 299\r\n\r\n,可以參考Onvif測(cè)試工具Test選項(xiàng),3.1.1、IP Configuration,IPv41、Static IP (Must)2、Link Local Address (Should)3、DHCP (Must),IPv61、Static IP (Must if Implemented)2、Sta

10、teless IP Configuration – Router Advertisement (Must if Implemented)3、Stateless IP Configuration – Neighbour Discovery (Must if Implemented)4、Stateful IP Configuration (Must if Implemented),3.1.2、Device Management,1)Ca

11、pabilities1、Get Wsdl Url (Must)2、All Capabilities (Must)3、Device Capabilities (Must)4、Media Capabilities (Must)5、Event Capabilities (Must)6、PTZ Capabilities (Must)7、Service Category Capabilities (Must)服務(wù)種類8、SOAP

12、Fault Message (Should),Device Management,2)Network1、Network Command Hostname Configuration (Must)2、Network Command Set Hostname Test (Must)3、Network Command Set Hostname Test Error Case (Should)4、Get DNS Configuratio

13、n (Must)5、Set DNS Configuration – Search Domain (Must)6、Set DNS Configuration – DNS Manual IPv4 (Must)7、Set DNS Configuration – DNS Manual IPv6 (Must if Implemented)8、Set DNS Configuration – From DHCP (Must)9、Set DN

14、S Configuration – DNS Manual Invalid IPv4 (Should)10、Set DNS Configuration – DNS Manual Invalid IPv6 (Should if Implemented),Device Management,Network11、Get NTP Configuration (Must if Supported)12、Set NTP Configuratio

15、n – NTP Manual IPv4 (Must if Supported)13、Set NTP Configuration – NTP Manual IPv6 (Must if Supported And Implemented)14、Set NTP Configuration – From DHCP (Must if Supported)15、Set NTP Configuration – NTP Manual Invali

16、d IPv4 (Should if Supported)16、Set NTP Configuration – NTP Manual Invalid IPv6 (Should if Supported And Implemented)17、Get Network Interface Configuration (Must)18、Set Network Interface Configuration – IPv4 (Must)19、

17、Set Network Interface Configuration – IPv6 (Must if Implemented)20、Set Network Interface Configuration – Invalid IPv4 (Should)21、Set Network Interface Configuration – Invalid IPv6 (Should if Implemented),Device Managem

18、ent,Network22、Get Network Protocols Configuration (Must)23、Set Network Protocols Configuration (Must)24、Set Network Protocols Configuration – Unsupported Protocols (Should)25、Get Network Default Gateway Configuration

19、 (Must)26、Set Network Default Gateway Configuration – IPv4 (Must)27、Set Network Default Gateway Configuration – IPv6 (Should if Implemented)28、Set Network Default Gateway Configuration – Invalid IPv4 (Should)29、Set N

20、etwork Default Gateway Configuration – Invalid IPv6 (Should if Implemented),Device Management,3)System1、System Command Get System DateAndTime (Must)2、System Command Set System DateAndTime (Must)3、System Command Set Sy

21、stem DateAndTime Using NTP (Must if Implemented)4、System Command Set System DateAndTime Test For Invalid Timezone (Should)5、System Command Set System DateAndTime Test For Invalid Date (Should)6、System Command Factory

22、Default Hard (Must)7、System Command Factory Default Soft (Must)8、System Command Reboot (Must)9、System Command Device Information (Must),Device Management,4)Security1、Security Command Get Users (Must)2、Security Comma

23、nd Create Users (Must)3、Security Command Create Users Error Case (Should)4、Security Command Delete Users (Must)5、Security Command Delete Users Error Case (Should)6、Security Command Delete Users All Users (Must)7、Sec

24、urity Command Set User (Must)8、Security Command Set User Error Case (Should),3.1.3、Media Configuration,5)Media Profile1、Media Profile Configuration (Must)2、Dynamic Media Profile Configuration (Must),6)Video Configurat

25、ion1、Video Source Configuration (Must)2、Video Encoder Configuration (Must)3、Jpeg Video Encoder Configuration (Must)4、Mpeg4 Video Encoder Configuration (Must if Implemented)5、H.264 Video Encoder Configuration (Must i

26、f Implemented)6、Guaranteed Number of Video Encoder Instances (Must),Media Configuration,Audio Configuration1、Audio Source Configuration (Must if Supported)2、Audio Encoder Configuration (Must if Supported)3、G.711 Audi

27、o Encoder Configuration (Must if Supported)4、G.726 Audio Encoder Configuration (Must if Supported And Implemented)5、AAC Audio Encoder Configuration (Must if Supported And Implemented),PTZ ConfigurationPTZ Configuratio

28、n (Must if Supported),Media Configuration,Metadata ConfigurationMetadata Configuration (Must),Media StreamingSnapshot URI (Should),Error HandlingSOAP Fault Message (Should)SOAP Fault Message (Should),3.1.3、PTZ,PTZ No

29、de1、PTZ Nodes (Must if Supported)2、PTZ Node (Must if Supported)3、SOAP Fault Message (Should if Supported)PTZ Configuration1、PTZ Configurations (Must if Supported)2、PTZ Configuration (Must if Supported)3、PTZ Config

30、uration Options (Must if Supported)4、PTZ Set Configuration (Must if Supported)5、SOAP Fault Message (Should if Supported)Move Operation1、PTZ Absolute Move (Must if Supported And Implemented)2、SOAP Fault Message (Shou

31、ld if Supported And Implemented)3、PTZ Relative Move (Must if Supported And Implemented)4、PTZ Continuous Move (Must if Supported)5、PTZ Continuous Move & Stop (Must if Supported),PTZ,Preset Operation1、Set And Get P

32、reset (Must if Supported And Implemented)2、Goto Preset (Must if Supported And Implemented)3、Remove Preset (Must if Supported And Implemented)Home Position Operation1、Home Position Operations (Configurable) (Must if S

33、upported And Implemented)2、Home Position Operation (Fixed) (Must if Supported And Implemented)Auxiliary Operation1、Send Auxiliary Command (Must if Supported And Implemented)Predefined PTZ SpacesAbsolute Position Spa

34、ces1、Generic PAN / TILT Position Space (Must if Supported And Implemented)2、Generic ZOOM Position Space (Must if Supported And Implemented)Relative Translation Spaces1、Generic PAN / TILT Translation Space (Must if Su

35、pported And Implemented)2、Generic ZOOM Translation Space (Must if Supported And Implemented)Continuous Velocity Spaces1、Generic PAN / TILT Velocity Space (Must if Implemented)2、Generic ZOOM Velocity Space (Must if Im

36、plemented)Speed Spaces1、Generic PAN / TILT Speed Space (Must if Supported And Implemented)2、Generic ZOOM Speed Space (Must if Supported And Implemented),1)Get Media Service Address Media

37、 http://192.168.0.105/onvif/device_service true true true ,3.1.5、獲取Media Data,2)、Connect to Media Service3)、Get Media Profile

38、 H.264-stream ,4)Select Profile with JPEG/MPEG Video encoder configuration encoder0 profil

39、e-0_05)Check if Required Profile Found,6)Set Video Encoder Configuration encoder0 0 JPEG 640 480 0 30 1

40、 4096 IPv4 0.0.0.0 ::1 0 0 false PT30M false ,7)Get Stream URI

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論