在 onvif 设备管理器中显示视频流

display video stream in onvif device manager

我想使用 ONVIF 设备管理器从另一台计算机上查看我的视频流。我实现了 WS-discovery 和 WS-security,将设备、deviceIO 和媒体 wsdls 包含到我的代码中,我的代码可以响应这些 wsdl 文件中的 wsdl 操作。但是 Onvif DM 没有任何请求开始视频流或获取流 url。

我只能从 Onvif DM 看到这个屏幕: 此屏幕之前的所有请求是:

DeviceBindingService :: GetSystemDateAndTime
DeviceBindingService :: GetDeviceInformation
DeviceBindingService :: GetScopes
DeviceBindingService :: GetDNS
DeviceBindingService :: GetNetworkInterfaces
DeviceBindingService :: GetSystemDateAndTime
DeviceBindingService :: GetCapabilities
DeviceBindingService :: GetServices
DeviceBindingService :: GetCapabilities
MediaBindingService :: GetVideoSources
MediaBindingService :: GetProfiles
MediaBindingService :: GetProfiles
MediaBindingService :: GetSnapshotUri
MediaBindingService :: GetProfiles
MediaBindingService :: GetAudioSources

我认为这与 GetServices 响应有关,但我无法找到缺少的内容。我的 GetServices 响应:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:sizexenc="http://tempuri.org/sizexenc.xsd" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:sizeds="http://tempuri.org/sizeds.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xmime="http://tempuri.org/xmime.xsd" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl">
    <SOAP-ENV:Header>
        <wsse:Security SOAP-ENV:mustUnderstand="true">
            <wsse:UsernameToken>
                <wsse:Username>admin</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">iZGOClWegnxwfuolWSakKIYyVRk=</wsse:Password>
                <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">0bGB7IsWkEi0xhHgctiHixYHAAAAAA==</wsse:Nonce>
                <wsu:Created>2016-09-19T15:12:49.009Z</wsu:Created>
            </wsse:UsernameToken>
        </wsse:Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tds:GetServicesResponse>
            <tds:Service xsi:type="tds:Service">
                <tds:Namespace>http://www.onvif.org/ver10/device/wsdl</tds:Namespace>
                <tds:XAddr>http://******:1881/</tds:XAddr>
                <tds:Version xsi:type="tt:OnvifVersion">
                    <tt:Major>2</tt:Major>
                    <tt:Minor>5</tt:Minor>
                </tds:Version>
            </tds:Service>
                <tds:Service xsi:type="tds:Service">
                    <tds:Namespace>http://www.onvif.org/ver10/media/wsdl</tds:Namespace>
                <tds:XAddr>http://******:1906/</tds:XAddr>
                <tds:Version xsi:type="tt:OnvifVersion">
                    <tt:Major>2</tt:Major>
                    <tt:Minor>6</tt:Minor>
                </tds:Version>
            </tds:Service>
                <tds:Service xsi:type="tds:Service">
                    <tds:Namespace>http://www.onvif.org/ver10/deviceIO/wsdl</tds:Namespace>
                <tds:XAddr>http://******:1931/</tds:XAddr>
                <tds:Version xsi:type="tt:OnvifVersion">
                    <tt:Major>2</tt:Major>
                    <tt:Minor>6</tt:Minor>
                </tds:Version>
            </tds:Service>
        </tds:GetServicesResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

我怎样才能做到这一点?

我缺少的是 GetVideoSourceConfigurationGetProfiles 响应之间的一些不一致。 -感谢@mpromonet-

要在 ONVIF 设备管理器中显示实时视频流,我必须再实现两个功能:

MediaBindingService :: GetStreamUri
MediaBindingService :: GetVideoSourceConfiguration