Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This document describes the fields that can be found within a configuration file
## ONVIF section

- **enable**: Boolean to activate ONVIF services (default: `false`).
- **enable_auth**: Boolean to turn on ONVIF authentication (default: `false`).
- **enable_auth**: Boolean to turn on ONVIF authentication (default: `false`). When this is off, a client may still attach a username token and the request is answered without checking it.
- **auth_user**: Username for ONVIF authentication (default: `admin`).
- **auth_pass**: Password for ONVIF authentication (default: `12345`).

Expand Down Expand Up @@ -89,6 +89,10 @@ This document describes the fields that can be found within a configuration file
- **profile**: Encoding profile.
- **bitrate**: Bitrate in kbps.

On FH8852 the H.264 rate controller ignores that target and stays at its highest quantizer, so the value is turned into a fixed quantizer: 38 at 1024 kbps, 36 at 2048 kbps, 34 at 4096 kbps, and 32 at 8192 kbps. It never goes below 30. A higher bitrate is a lower quantizer and a larger stream. H.265 keeps the driver's constant-bitrate control.

On FH8852, `gc4653_mipi` starts from the 1920×1080 tables in the sensor library: format 0x203 at 25 fps and 0x204 at 30 fps. The nearest listed rate is used. A request for a larger picture, including 2560×1440, stays at 1920×1080, which is the resolution of the shipped IQ file. The 4MP sensor tables need an ISP buffer that does not fit beside the encoder in the 35 MB memory zone on this board. The sensor mode is chosen when the pipeline starts, so a frame-rate change needs a restart. Other sensors in this HAL keep a single mode.

## OSD section

- **enable**: Boolean to turn on On-Screen Display regions globally, used to reduce resource usage or let another app manage the functionality (default: `true`).
Expand Down Expand Up @@ -120,6 +124,8 @@ This document describes the fields that can be found within a configuration file
- **bitrate**: Bitrate in kbps.
- **qfactor**: JPEG compression quality factor.

On FH8852 a higher quality selects a lower encoder quantizer: quality 1 is quantizer 98 and quality 99 is quantizer 0. The encoder does not use the bitrate field.

## HTTP POST section

- **enable**: Boolean to activate HTTP POST snapshots.
Expand Down
6 changes: 3 additions & 3 deletions res/onvif/capabilities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<tt:RELToken>false</tt:RELToken>
<tt:SAMLToken>false</tt:SAMLToken>
<tt:KerberosToken>false</tt:KerberosToken>
<tt:UsernameToken>true</tt:UsernameToken>
<tt:HttpDigest>true</tt:HttpDigest>
<tt:UsernameToken>%s</tt:UsernameToken>
<tt:HttpDigest>false</tt:HttpDigest>
</tt:Security>
</tt:Device>
<tt:Events>
Expand All @@ -60,7 +60,7 @@
<tt:StreamingCapabilities>
<tt:RTPMulticast>false</tt:RTPMulticast>
<tt:RTP_TCP>false</tt:RTP_TCP>
<tt:RTP_RTSP_TCP>false</tt:RTP_RTSP_TCP>
<tt:RTP_RTSP_TCP>true</tt:RTP_RTSP_TCP>
</tt:StreamingCapabilities>
<tt:ProfileCapabilities>
<tt:MaximumNumberOfProfiles>2</tt:MaximumNumberOfProfiles>
Expand Down
12 changes: 12 additions & 0 deletions res/onvif/devicecaps.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl">
<SOAP-ENV:Body>
<tds:GetServiceCapabilitiesResponse>
<tds:Capabilities>
<tds:Network IPFilter="false" ZeroConfiguration="false" IPVersion6="false" DynDNS="false" Dot11Configuration="false" HostnameFromDHCP="false" NTP="0"/>
<tds:Security TLS1.0="false" TLS1.1="false" TLS1.2="false" OnboardKeyGeneration="false" AccessPolicyConfig="false" DefaultAccessPolicy="false" Dot1X="false" RemoteUserHandling="false" X.509Token="false" SAMLToken="false" KerberosToken="false" UsernameToken="%s" HttpDigest="false" RELToken="false"/>
<tds:System DiscoveryResolve="true" DiscoveryBye="true" RemoteDiscovery="false" SystemBackup="false" SystemLogging="false" FirmwareUpgrade="false"/>
</tds:Capabilities>
</tds:GetServiceCapabilitiesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
10 changes: 10 additions & 0 deletions res/onvif/dns.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetDNSResponse>
<tds:DNSInformation>
<tt:FromDHCP>true</tt:FromDHCP>
</tds:DNSInformation>
</tds:GetDNSResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
26 changes: 26 additions & 0 deletions res/onvif/encoder.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<trt:Configurations token="VEC_%d">
<tt:Name>VideoEncoderConfig_%d</tt:Name>
<tt:UseCount>1</tt:UseCount>
<tt:Encoding>%s</tt:Encoding>
<tt:Resolution>
<tt:Width>%d</tt:Width>
<tt:Height>%d</tt:Height>
</tt:Resolution>
<tt:Quality>5</tt:Quality>
<tt:RateControl>
<tt:FrameRateLimit>%d</tt:FrameRateLimit>
<tt:EncodingInterval>1</tt:EncodingInterval>
<tt:BitrateLimit>%d</tt:BitrateLimit>
</tt:RateControl>
%s
<tt:Multicast>
<tt:Address>
<tt:Type>IPv4</tt:Type>
<tt:IPv4Address>0.0.0.0</tt:IPv4Address>
</tt:Address>
<tt:Port>0</tt:Port>
<tt:TTL>1</tt:TTL>
<tt:AutoStart>false</tt:AutoStart>
</tt:Multicast>
<tt:SessionTimeout>PT60S</tt:SessionTimeout>
</trt:Configurations>
36 changes: 36 additions & 0 deletions res/onvif/encoderoptions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<trt:GetVideoEncoderConfigurationOptionsResponse>
<trt:Options>
<tt:QualityRange>
<tt:Min>1</tt:Min>
<tt:Max>5</tt:Max>
</tt:QualityRange>
<tt:H264>
<tt:ResolutionsAvailable>
<tt:Width>%d</tt:Width>
<tt:Height>%d</tt:Height>
</tt:ResolutionsAvailable>
<tt:ResolutionsAvailable>
<tt:Width>%d</tt:Width>
<tt:Height>%d</tt:Height>
</tt:ResolutionsAvailable>
<tt:GovLengthRange>
<tt:Min>1</tt:Min>
<tt:Max>200</tt:Max>
</tt:GovLengthRange>
<tt:FrameRateRange>
<tt:Min>1</tt:Min>
<tt:Max>%d</tt:Max>
</tt:FrameRateRange>
<tt:EncodingIntervalRange>
<tt:Min>1</tt:Min>
<tt:Max>1</tt:Max>
</tt:EncodingIntervalRange>
<tt:H264ProfilesSupported>Main</tt:H264ProfilesSupported>
</tt:H264>
</trt:Options>
</trt:GetVideoEncoderConfigurationOptionsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
8 changes: 8 additions & 0 deletions res/onvif/encoders.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<trt:GetVideoEncoderConfigurationsResponse>
%s
</trt:GetVideoEncoderConfigurationsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
10 changes: 10 additions & 0 deletions res/onvif/gateway.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetNetworkDefaultGatewayResponse>
<tds:NetworkGateway>
<tt:IPv4Address>%s</tt:IPv4Address>
</tds:NetworkGateway>
</tds:GetNetworkDefaultGatewayResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
11 changes: 11 additions & 0 deletions res/onvif/hostname.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetHostnameResponse>
<tds:HostnameInformation>
<tt:FromDHCP>false</tt:FromDHCP>
<tt:Name>%s</tt:Name>
</tds:HostnameInformation>
</tds:GetHostnameResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
11 changes: 11 additions & 0 deletions res/onvif/mediacaps.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl">
<SOAP-ENV:Body>
<trt:GetServiceCapabilitiesResponse>
<trt:Capabilities SnapshotUri="true" Rotation="false" VideoSourceMode="false" OSD="false">
<trt:ProfileCapabilities MaximumNumberOfProfiles="2"/>
<trt:StreamingCapabilities RTPMulticast="false" RTP_TCP="false" RTP_RTSP_TCP="true" NonAggregateControl="false"/>
</trt:Capabilities>
</trt:GetServiceCapabilitiesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
11 changes: 11 additions & 0 deletions res/onvif/mediaprofile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,16 @@
<tt:EncodingInterval>1</tt:EncodingInterval>
<tt:BitrateLimit>%d</tt:BitrateLimit>
</tt:RateControl>
%s
<tt:Multicast>
<tt:Address>
<tt:Type>IPv4</tt:Type>
<tt:IPv4Address>0.0.0.0</tt:IPv4Address>
</tt:Address>
<tt:Port>0</tt:Port>
<tt:TTL>1</tt:TTL>
<tt:AutoStart>false</tt:AutoStart>
</tt:Multicast>
<tt:SessionTimeout>PT60S</tt:SessionTimeout>
</tt:VideoEncoderConfiguration>
</trt:Profiles>
24 changes: 24 additions & 0 deletions res/onvif/network.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetNetworkInterfacesResponse>
<tds:NetworkInterfaces token="%s">
<tt:Enabled>true</tt:Enabled>
<tt:Info>
<tt:Name>%s</tt:Name>
<tt:HwAddress>%s</tt:HwAddress>
</tt:Info>
<tt:IPv4>
<tt:Enabled>true</tt:Enabled>
<tt:Config>
<tt:Manual>
<tt:Address>%s</tt:Address>
<tt:PrefixLength>%d</tt:PrefixLength>
</tt:Manual>
<tt:DHCP>true</tt:DHCP>
</tt:Config>
</tt:IPv4>
</tds:NetworkInterfaces>
</tds:GetNetworkInterfacesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
8 changes: 8 additions & 0 deletions res/onvif/profile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<trt:GetProfileResponse>
%s
</trt:GetProfileResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
17 changes: 17 additions & 0 deletions res/onvif/protocols.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetNetworkProtocolsResponse>
<tds:NetworkProtocols>
<tt:Name>HTTP</tt:Name>
<tt:Enabled>true</tt:Enabled>
<tt:Port>%d</tt:Port>
</tds:NetworkProtocols>
<tds:NetworkProtocols>
<tt:Name>RTSP</tt:Name>
<tt:Enabled>%s</tt:Enabled>
<tt:Port>%d</tt:Port>
</tds:NetworkProtocols>
</tds:GetNetworkProtocolsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
23 changes: 23 additions & 0 deletions res/onvif/scopes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetScopesResponse>
<tds:Scopes>
<tt:ScopeDef>Fixed</tt:ScopeDef>
<tt:ScopeItem>onvif://www.onvif.org/Profile/Streaming</tt:ScopeItem>
</tds:Scopes>
<tds:Scopes>
<tt:ScopeDef>Fixed</tt:ScopeDef>
<tt:ScopeItem>onvif://www.onvif.org/type/video_encoder</tt:ScopeItem>
</tds:Scopes>
<tds:Scopes>
<tt:ScopeDef>Fixed</tt:ScopeDef>
<tt:ScopeItem>onvif://www.onvif.org/name/Divinus</tt:ScopeItem>
</tds:Scopes>
<tds:Scopes>
<tt:ScopeDef>Fixed</tt:ScopeDef>
<tt:ScopeItem>onvif://www.onvif.org/hardware/%s</tt:ScopeItem>
</tds:Scopes>
</tds:GetScopesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
23 changes: 23 additions & 0 deletions res/onvif/services.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetServicesResponse>
<tds:Service>
<tds:Namespace>http://www.onvif.org/ver10/device/wsdl</tds:Namespace>
<tds:XAddr>http://%s:%d/onvif/device_service</tds:XAddr>
<tds:Version>
<tt:Major>2</tt:Major>
<tt:Minor>42</tt:Minor>
</tds:Version>
</tds:Service>
<tds:Service>
<tds:Namespace>http://www.onvif.org/ver10/media/wsdl</tds:Namespace>
<tds:XAddr>http://%s:%d/onvif/media_service</tds:XAddr>
<tds:Version>
<tt:Major>2</tt:Major>
<tt:Minor>42</tt:Minor>
</tds:Version>
</tds:Service>
</tds:GetServicesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
6 changes: 6 additions & 0 deletions res/onvif/settime.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl">
<SOAP-ENV:Body>
<tds:SetSystemDateAndTimeResponse/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
13 changes: 13 additions & 0 deletions res/onvif/sourceconfigs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<trt:GetVideoSourceConfigurationsResponse>
<trt:Configurations token="VSC_1">
<tt:Name>VideoSourceConfig_1</tt:Name>
<tt:UseCount>1</tt:UseCount>
<tt:SourceToken>VideoSource_1</tt:SourceToken>
<tt:Bounds height="%d" width="%d" y="0" x="0"/>
</trt:Configurations>
</trt:GetVideoSourceConfigurationsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
36 changes: 18 additions & 18 deletions res/onvif/systemtime.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
<SOAP-ENV:Body>
<tds:GetSystemDateAndTimeResponse>
<tds:SystemDateAndTime>
<tds:DateTimeType>NTP</tds:DateTimeType>
<tds:DaylightSavings>false</tds:DaylightSavings>
<tds:TimeZone>
<tds:TZ>UTC</tds:TZ>
</tds:TimeZone>
<tds:UTCDateTime>
<tds:Time>
<tds:Hour>%02d</tds:Hour>
<tds:Minute>%02d</tds:Minute>
<tds:Second>%02d</tds:Second>
</tds:Time>
<tds:Date>
<tds:Year>%d</tds:Year>
<tds:Month>%02d</tds:Month>
<tds:Day>%02d</tds:Day>
</tds:Date>
</tds:UTCDateTime>
<tt:DateTimeType>Manual</tt:DateTimeType>
<tt:DaylightSavings>false</tt:DaylightSavings>
<tt:TimeZone>
<tt:TZ>UTC</tt:TZ>
</tt:TimeZone>
<tt:UTCDateTime>
<tt:Time>
<tt:Hour>%02d</tt:Hour>
<tt:Minute>%02d</tt:Minute>
<tt:Second>%02d</tt:Second>
</tt:Time>
<tt:Date>
<tt:Year>%d</tt:Year>
<tt:Month>%02d</tt:Month>
<tt:Day>%02d</tt:Day>
</tt:Date>
</tt:UTCDateTime>
</tds:SystemDateAndTime>
</tds:GetSystemDateAndTimeResponse>
</SOAP-ENV:Body>
Expand Down
Loading
Loading