Skip to content

Commit

Permalink
webcodecs: Temporal SVC encode
Browse files Browse the repository at this point in the history
1. Adding VideoEncoderConfig.scalabilityMode and EncodedVideoChunkMetadata
2. Connecting them to SVC fields in media::VideoEncoder config and output
3. Renaming VideoEncoderOutputCallback to EncodedVideoChunkOutputCallback
   in order to comply with the spec.
4. Deleting EncodedVideoMetadata, it doesn't do anything,
   and can be confused with EncodedVideoChunkMetadata
5. New test: temporal_svc.any.js

Bug: 1176474
Change-Id: Ia89ec093c55df4495f50d51262bcc75c578fd8d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2755947
Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#863171}
  • Loading branch information
Djuffin authored and chromium-wpt-export-bot committed Mar 16, 2021
1 parent 4358ece commit ed7ea87
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webcodecs/video-encoder.any.js
Expand Up @@ -60,7 +60,10 @@ promise_test(t => {
promise_test(async t => {
let output_chunks = [];
let codecInit = getDefaultCodecInit(t);
codecInit.output = chunk => output_chunks.push(chunk);
codecInit.output = (chunk, metadata) => {
assert_not_equals(metadata, null);
output_chunks.push(chunk);
}

let encoder = new VideoEncoder(codecInit);

Expand Down Expand Up @@ -102,7 +105,7 @@ promise_test(async t => {
let bitmap = await generateBitmap(320, 200);
let encoder = null;
let reset_completed = false;
codecInit.output = chunk => {
codecInit.output = (chunk, metadata) => {
if (chunk.timestamp % 2 == 0) {
// pre-reset frames have even timestamp
callbacks_before_reset++;
Expand Down

0 comments on commit ed7ea87

Please sign in to comment.