Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /webcodecs/videoDecoder-h264-sei.https.any.html?h264_sei_annexb - WPT Dashboard Interop Dashboard
- /webcodecs/videoDecoder-h264-sei.https.any.html?h264_sei_avc - WPT Dashboard Interop Dashboard
- /webcodecs/videoDecoder-h264-sei.https.any.worker.html?h264_sei_annexb - WPT Dashboard Interop Dashboard
- /webcodecs/videoDecoder-h264-sei.https.any.worker.html?h264_sei_avc - WPT Dashboard Interop Dashboard
// META: global=window,dedicatedworker
// META: script=videoDecoder-codec-specific-setup.js
// META: variant=?h264_sei_avc
// META: variant=?h264_sei_annexb
promise_test(async t => {
await checkImplements();
const callbacks = {};
const decoder = createVideoDecoder(t, callbacks);
decoder.configure(CONFIG);
// Frame 0 is IDR, frame 5 is SEI recovery point.
decoder.decode(CHUNKS[5]);
// First decode the IDR frame to
let outputs = 0;
callbacks.output = frame => {
outputs++;
assert_equals(frame.timestamp, CHUNKS[5].timestamp, 'timestamp');
assert_equals(frame.duration, CHUNKS[5].duration, 'duration');
frame.close();
};
await decoder.flush();
assert_equals(outputs, 1, 'outputs');
}, 'H.264 SEI recovery point frames are treated as keyframes.');