Comments (2)
Thank you for the problem report and the offer of a PR.
There may be a deeper problem here which I started looking at last weekend but did not have enough time.
When the library connects to the camera it calls Media1 API GetVideoSources and then matches the Tokens from with the Media2 GetProfiles.
GetVideoSources does not have an equivalent function in Media2.
This could also be causing you problem. as well as the '$' from the XML parsing.
I do not know why ONVIF dropped this API, and we cannot ask them as none of us are ONVIF members.
GetVideoSources could tell you about all sources, even if there was no Profile assigned to them.
But perhaps the design now is all sources will have one Profile (a profile that cannot be deleted) you can get a list of Video Sources from the list of Profiles.
Or maybe we have to use Media2/GetVideoSourceConfigurations
Anyway, it may be worth looking at the GetVideoSources code too.
from onvif.
Here the corresponding GetVideoSources the videoSource.$.token is ''
<?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:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery"
xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:xop="http://www.w3.org/2004/08/xop/include"
xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2"
xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl"
xmlns:tdn="http://www.onvif.org/ver10/network/wsdl"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
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://schemas.xmlsoap.org/ws/2005/02/sc"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl"
xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl"
xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:trt2="http://www.onvif.org/ver20/media/wsdl"
xmlns:tr2="http://www.onvif.org/ver20/media/wsdl"
xmlns:ewsd="http://www.onvifext.com/onvif/ext/ver10/wsdl"
xmlns:exsd="http://www.onvifext.com/onvif/ext/ver10/schema"
xmlns:tnshik="http://www.hikvision.com/2011/event/topics"
xmlns:hikwsd="http://www.onvifext.com/onvif/ext/ver10/wsdl"
xmlns:hikxsd="http://www.onvifext.com/onvif/ext/ver10/schema">
<SOAP-ENV:Header>
<wsse:Security>
<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">=</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">==</wsse:Nonce>
<wsu:Created>2023-03-09T06:53:06.048Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<trt:GetVideoSourcesResponse>
<trt:VideoSources token="">
<tt:Framerate>0</tt:Framerate>
<tt:Resolution>
<tt:Width>0</tt:Width>
<tt:Height>0</tt:Height>
</tt:Resolution>
<tt:Imaging>
<tt:BacklightCompensation>
<tt:Mode>OFF</tt:Mode>
<tt:Level>0</tt:Level>
</tt:BacklightCompensation>
<tt:Brightness>50.1960793</tt:Brightness>
<tt:ColorSaturation>50.1960793</tt:ColorSaturation>
<tt:Contrast>50.1960793</tt:Contrast>
<tt:Focus>
<tt:AutoFocusMode>MANUAL</tt:AutoFocusMode>
<tt:DefaultSpeed>1</tt:DefaultSpeed>
<tt:NearLimit>1</tt:NearLimit>
<tt:FarLimit>10</tt:FarLimit>
</tt:Focus>
<tt:IrCutFilter>AUTO</tt:IrCutFilter>
<tt:Sharpness>50.1960793</tt:Sharpness>
<tt:WideDynamicRange>
<tt:Mode>ON</tt:Mode>
<tt:Level>1</tt:Level>
</tt:WideDynamicRange>
<tt:WhiteBalance>
<tt:Mode>AUTO</tt:Mode>
<tt:CrGain>128</tt:CrGain>
<tt:CbGain>128</tt:CbGain>
</tt:WhiteBalance>
</tt:Imaging>
</trt:VideoSources>
</trt:GetVideoSourcesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
from onvif.
Related Issues (20)
- setOSD(): position can take effect, but plaintext does not HOT 1
- Question: I have a dvr/nvr dahua so the discover method retrieve me 1 record. Is there any other method that can tell me how many cameras the dvr has? HOT 2
- Error: GetRecordings
- Compatibility of Axis M5000-G PTZ Camera. HOT 4
- HikVision "Wrong ONVIF Soap Response" Error HOT 17
- Find recording from nvr within specific time HOT 4
- ONVIF SOAP Fault during connect with Vivotek camera's HOT 3
- Action string in Content-Type causes failures with Illustra cameras
- Discovery has been unable to search, how to debug it
- Discovery displays HTTP servers on local network
- Wrong ONVIF SOAP Response on AXIS Cameras
- NetworkInterfaceSetConfiguration documentation change
- feat req: custom position in createOSD HOT 1
- No events for TAPO C520 C510 HOT 1
- relativeMove documentation incorrect
- Unsubscribe: Triggers a second unsubscribe via _eventRequest
- getRecordingOptions not working with UNIVIEW Channels | brand issue | ONVIF SOAP Fault: Optional Action Not Implemented
- Add an option to set pull-request timeout
- getStreamUri not working correctly on multi channel NVR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onvif.