Skip to content

fix(playback): report the software host's actual video decoder - #760

Open
andreencar wants to merge 1 commit into
superuser404notfound:mainfrom
andreencar:fix/753-active-video-decoder
Open

andreencar wants to merge 1 commit into
superuser404notfound:mainfrom
andreencar:fix/753-active-video-decoder

Conversation

@andreencar

Copy link
Copy Markdown

Summary

When the software playback host selects VideoToolbox for HEVC, activeVideoDecoder now reports VideoToolbox HEVC (HW) instead of libavcodec HEVC (SW). The label follows the selected decoder on both initial load and reload, without changing decoder selection or playback routing.

Closes #753

What changed

  • Expose the software host's selected hardware-decoder identity internally and use it at the two label assignment sites.
  • Add load/reload regression coverage for hardware HEVC, software HEVC, VP9 and AV1. A seekable custom source exercises the separate session-rebuild path on reload.
  • Update the changelog and API documentation to distinguish the playback backend from the decoder implementation.

Test plan

  • Device / OS: Apple M1 Max, macOS 27.0.1 (26A434), Xcode 27.0 (27A266a), Swift 6.4.
  • Source media: synthetic, video-only fixtures generated by bash Scripts/fetch-fixtures.sh (no audio or Dolby Vision):
    • hdr10-hevc.mp4: MP4, HEVC Main 10, 1920×1080, 10-bit 4:2:0, HDR10/PQ → VideoToolbox HEVC (HW).
    • hev1-inband-xps.mp4: MP4, HEVC Main, 320×240, 8-bit 4:2:0, in-band parameter sets, no HDR metadata → libavcodec HEVC (SW).
    • vp9.webm: WebM, VP9 Profile 0, 1920×1080, 8-bit 4:2:0, no HDR metadata → libavcodec VP9 (SW).
    • av1.mp4: MP4, AV1 Main, 1920×1080, 8-bit 4:2:0, no HDR metadata → dav1d AV1 (SW).
  • Result: all four cases report the expected label on initial load and reload while playbackBackend remains .software. Before the fix, the hardware HEVC test failed both label assertions; the software cases passed.
  • Validation: full swift test passes (4,349 Swift Testing tests and 17 XCTest tests); the macOS demo builds; documentation-link and whitespace checks pass. Revalidated after rebasing onto the latest main.
  • The new media tests follow the existing optional-fixture convention: they skip when the local clips are absent, and the hardware HEVC case also requires hardware HEVC support. No physical iOS/tvOS device validation performed.

Checklist

  • CHANGELOG.md updated
  • Commit messages follow Conventional Commits (feat(...), fix(...), chore(...))
  • The fix lives in the engine, not in a host-side workaround
  • Public API changes are intentional and documented (no public API shape changes; clarified existing property documentation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

activeVideoDecoder reports "libavcodec HEVC (SW)" on the software path even when VideoToolbox hardware decoding is in use

1 participant