Repository navigation
test: cover the lifecycle of hardware decoding in the media player - #323
Merged
Merged
Conversation
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).
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds seven tests to
HardwareDecodingTestfor 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 wherewebrtc.test.hardwareDecodingis 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.