Skip to content

test: cover the lifecycle of hardware decoding in the media player - #323

Merged
devopvoid merged 1 commit into
mainfrom
test/hardware-decoding-lifecycle
Oct 4, 2026
Merged

devopvoid merged 1 commit into
mainfrom
test/hardware-decoding-lifecycle

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Adds seven tests to HardwareDecodingTest for what a hardware decoder goes through that the existing tests do not reach. Each compares the pictures with software decoding, frame by frame, and requires hardware where webrtc.test.hardwareDecoding is set.

  • loopsInHardware: two looped passes, each starting from the first key frame.
  • seekBetweenKeyFrames: a seek to a position that is not a key frame.
  • seekAfterEndStartsOver: a decoder that has drained at the end of the stream takes packets again after a seek.
  • pausesAndResumes: no frames while paused, and none dropped or repeated.
  • closesWhilePlaying: 20 rounds of closing a player in the middle of decoding.
  • opensManyWithoutPlaying: 50 players opened and closed without a packet.
  • decodesConcurrently: four players at once, H.264 and VP9.

No new media and no change to production code.

Run on an NVIDIA GeForce RTX 3080 on Windows (Direct3D 11) with the hardware required: all 14 tests of the class pass. On a machine without a hardware decoder the tests skip, as the existing ones do.

Not covered: Linux NVDEC (feat/linux-nvdec-decoder), which needs a Linux machine, and streams the GPU refuses other than VP9 4:4:4, which need new media.

Loop, seek between key frames, seek after the end of the stream, pause and
resume, closing while playing, opening many players without playing, and
several players decoding at once. Each compares the pictures with software
decoding, and requires hardware where webrtc.test.hardwareDecoding is set.

Run on an NVIDIA GeForce RTX 3080 on Windows (Direct3D 11).
@devopvoid
devopvoid merged commit 197eec6 into main Oct 4, 2026
22 checks passed
@devopvoid
devopvoid deleted the test/hardware-decoding-lifecycle branch October 4, 2026 18:29
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.

1 participant