mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-12 11:43:13 -04:00
Groundwork for moving decoding out of the camera and into the decoder thread. The parsing of DecoderHWAccelName sat inline in FfmpegCamera::OpenFfmpeg(), where nothing could test it, and the ai_server branch has a second copy of the same logic in its Monitor-side decoder open. Moving the decoder without pulling this out first would carry the duplication across rather than end it. No behaviour change: same iteration over the types this build offers, same comma-separated priority list, same warn-and-skip for a name libavutil does not know, same order. Being a free function it can now be tested, which it could not be before. The cases covered are the ones an operator's setting actually runs into -- a single name, a priority list, spaces around the commas, a typo among good entries, empty entries -- asserted against whatever device types the host reports rather than against a fixed list, so the test travels. This host offers seven, so no section skipped for want of data. Confirmed non-vacuous by mutation: dropping TrimSpaces fails one case, and accepting an unknown name instead of skipping it fails two. Build clean with no warnings; suite 147 cases / 12531 assertions. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015Y6FieTwEXuLhhR4e2yiax