Giter Site home page Giter Site logo

Comments (2)

RogerHardiman avatar RogerHardiman commented on July 28, 2024

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.

TA2k avatar TA2k commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.