ONVIF AbsoluteMove: send the speed in a named speed space, at its maximum #23
Merged
ClaudeAI
merged 1 commits from fix/onvif-abs-move-speed into master 37 minutes ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fix/onvif-abs-move-speed'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Summary
protocolPTZ_ONVIF::goAbsolutemoved the camera slower than a preset move. The AbsoluteMove request sent its speed as<Speed><PanTilt x="1" y="1"/><Zoom x="1"/></Speed>, without aspaceattribute. A camera then reads the value in its own default speed space (the one of the PTZConfiguration's DefaultPTZSpeed), where 1 isn't necessarily the maximum. It may even be the slowest setting, for example in a range of 0..300 degrees per second. Preset moves usually run at the camera's own preset speed instead.Changes
pOnvif::ptz_GetNode():SupportedPTZSpacesand keeps thePanTiltSpeedSpace/ZoomSpeedSpaceto use: the generic one if the node lists it, otherwise the first one with its ownXRange;GenericSpeedSpace/ZoomGenericSpeedSpace, range 0..1) are used;printfof the whole reply is removed.ptz_AbsoluteMove(): sends the speed with thespaceattribute, at that space's maximum. An optional speed argument (0..1 of the range) is available.protocolPTZ_ONVIF::create(): reads the node's speed spaces once and logs which speed is used, for examplePTZ speed (from node): PanTilt ...GenericSpeedSpace max 1.000, Zoom ... max 1.000.XMLNode::nChildNode(name)compares the prefixed name (tt:...), butgetChildNode(name, i)ignores the prefix, so the spaces are iterated withgetChildNodeuntil it returns an empty node.Testing
Fake ONVIF camera, protocol test with AddressSanitizer (no findings):
Debug86build is fine. The only error isvideoLive555AVLibSource.cpp:818, which comes from the newer live555 headers used for the check (std::atomic<char>event-loop flag), not from this change.If the moves are still slow
The cause is then probably a camera setting. Many PTZ cameras reduce the pan speed when zoomed in ("Proportional Pan"). An ABS move includes a zoom target, so it is affected, while presets are not. The new log line shows which speed the camera is offered.
Generated with Claude Code
https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
8e345e6161.