Bug 1660383 [wpt PR 25164] - Reland "[webcodecs] Implement Audio/VideoDecoder error callback.", a=testonly
authorDan Sanders <sandersd@chromium.org>
Wed, 26 Aug 2020 08:53:27 +0000
changeset 546481 ff203320370a691267bd00d1816312f9de7b6833
parent 546480 bd8576b53e1308ac226f76f49109a9ceed920d8c
child 546482 6f391b1eb0fd0f6ce34c872225cf370d5100262a
push id37735
push userabutkovits@mozilla.com
push dateThu, 27 Aug 2020 21:29:40 +0000
treeherdermozilla-central@109f3a4de567 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1660383, 25164, 1045247, 2368493, 800406
milestone82.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1660383 [wpt PR 25164] - Reland "[webcodecs] Implement Audio/VideoDecoder error callback.", a=testonly Automatic update from web-platform-tests Reland "[webcodecs] Implement Audio/VideoDecoder error callback." This reverts commit 51b274e89cbb45a7a1ce9b4f1ae78ed81639c7ba. Bug: 1045247 Change-Id: I4f22c1e340d6c2224eaccb29e41b2605efe0d47a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2368493 Commit-Queue: Dan Sanders <sandersd@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Auto-Submit: Dan Sanders <sandersd@chromium.org> Reviewed-by: Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#800406} -- wpt-commits: 22ea3f8f6d0fc3034cf18743d7ea6c402f2ae188 wpt-pr: 25164
testing/web-platform/tests/webcodecs/h264.mp4
testing/web-platform/tests/webcodecs/video-decoder.html
testing/web-platform/tests/webcodecs/vp9.mp4
new file mode 100644
index 0000000000000000000000000000000000000000..e21fcba32c125fba820ffa2269013c612d2b78fc
GIT binary patch
literal 7637
zc$|%S2UOF|(tZL6NSEFTU3x-qp(7w59Tb5Wl0bj}Aqh>Yh=72opiz(_qI4-zq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xp-cdp>*%_2#E5
z5E)UoP1v!TSy6!{$L>mJBKDxOr4ZW*2a%t_jHk@D&-pXoqCTQTts2KGwARe&8D+Z+
zy{@|l1RX9>8?mZa`Hd)P`%VWbLOMo5D#Lk2?j{&UQQDvecux|4H%4S|GDqE-zFtVa
zv^&{*@pI{f%ahN}K;6%x#8EAk*<Y{xjb3(so$$THU1veD&~Uw8I_yqMozKkcAIsq#
zY0+5}ZW@J|R9|N>y!=UZ?SZ-Xzt$2mcgOo`3*60%O>>xe{agZLDLoR{(BJB@_`dQ}
zgVv*~q<=57ynTHGNT-4E4nQLT|JKM?{&XPV?Dww*{CC!Wu5|$aYa=85x(GP97YREN
zy#B-_|F7Q8V*l@P{=2xqvtj$sQUrx0;7Kzt3WF#7%i_#0^*?OMbiI)ta1sD{BmXn^
zi+{S^`#%dAG!ldRr{?TC*58@-XWzAq;XX(V>Wl+i_xA8{BLUU`?>|oezD*J2UpihS
z4(0Z@H0b<s7|>rBSd1sQVn~=Y<B@;kq@R7t`yWbimiRWnm;{XfC&qtioTsOxQJLgb
zABY6doz4Nc+(~osq^|BSAk*2QoDD#o9lg{WKmaBB+d_{}^YOvKnJp6*j>rBZ%30^c
z6aEzYpOI+*0E#orO3LBy^0R&e@h>jTUoz@{=ve{(zW%2j#s5+NN6t%%iTID0|A+(7
zB<XJctp+4HV;(8XOcLH9^|Q<1O1c<lxz&=o3#ogPOu7Eb1>yTQzu+^jKay}}<LHh0
zGoLlVzh4&81;fFySj^uGFXQpojT9{)_?|iBL&E<U|4GOU9^j^=Dyyg@3ju@wA6-TB
Am;e9(
--- a/testing/web-platform/tests/webcodecs/video-decoder.html
+++ b/testing/web-platform/tests/webcodecs/video-decoder.html
@@ -1,14 +1,54 @@
 <!DOCTYPE html>
 <html>
 <title>Test the VideoDecoder API.</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
+'use strict';
+
+// TODO(sandersd): Move metadata into a helper library.
+// TODO(sandersd): Add H.264 idecode test once there is an API to query for
+// supported codecs.
+let h264 = {
+  buffer: fetch('h264.mp4').then(r => r.arrayBuffer()),
+  codec: "avc1.64000c",
+  description: {offset: 7229, size: 46},
+  frames: [{offset: 48, size: 4007},
+           {offset: 4055, size: 926},
+           {offset: 4981, size: 241},
+           {offset: 5222, size: 97},
+           {offset: 5319, size: 98},
+           {offset: 5417, size: 624},
+           {offset: 6041, size: 185},
+           {offset: 6226, size: 94},
+           {offset: 6320, size: 109},
+           {offset: 6429, size: 281}]
+};
+
+let vp9 = {
+  buffer: fetch('vp9.mp4').then(r => r.arrayBuffer()),
+  // TODO(sandersd): Verify that the file is actually level 1.
+  codec: "vp09.00.10.08",
+  frames: [{offset: 44, size: 3315},
+           {offset: 3359, size: 203},
+           {offset: 3562, size: 245},
+           {offset: 3807, size: 172},
+           {offset: 3979, size: 312},
+           {offset: 4291, size: 170},
+           {offset: 4461, size: 195},
+           {offset: 4656, size: 181},
+           {offset: 4837, size: 356},
+           {offset: 5193, size: 159}]
+};
+
+function view(buffer, {offset, size}) {
+  return new Uint8Array(buffer, offset, size);
+}
 
 // Calls done after giving async output/error callbacks a final chance to run.
 async function asyncDone(test) {
   test.step_timeout(test.step_func_done(), 0);
 }
 
 async_test(async (t) => {
   // VideoDecoderInit lacks required fields.
@@ -49,10 +89,138 @@ async_test(async (t) => {
   assert_throws_js(TypeError, () => { decoder.configure(config); });
 
   // Valid unambiguous codec accepted.
   config.codec = 'vp09.00.10.08';
   decoder.configure(config);
 
   asyncDone(t);
 }, 'Test VideoDecoder.configure() codec validity');
+
+promise_test(t => vp9.buffer.then(buffer => {
+  let numOutputs = 0;
+  let decoder = new VideoDecoder({
+    output(frame) {
+      t.step(() => {
+        assert_equals(++numOutputs, 1, "outputs");
+        assert_equals(frame.cropWidth, 320, "cropWidth");
+        assert_equals(frame.cropHeight, 240, "cropHeight");
+        assert_equals(frame.timestamp, 0, "timestamp");
+        frame.destroy();
+      });
+    },
+    error(e) {
+      t.step(() => {
+        // TODO(sandersd): Change to 'throw e' once e is defined.
+        throw "decode error";
+      });
+    }
+  });
+
+  decoder.configure({codec: vp9.codec});
+
+  decoder.decode(new EncodedVideoChunk('key', 0, view(buffer, vp9.frames[0])));
+
+  return decoder.flush().then(() => {
+    assert_equals(numOutputs, 1, "outputs");
+  });
+}), 'Decode VP9');
+
+promise_test(t => {
+  let decoder = new VideoDecoder({
+    output(frame) {
+      t.step(() => {
+        throw "unexpected output";
+      });
+    },
+    error(e) {
+      t.step(() => {
+        throw "unexpected error";
+      });
+    }
+  });
+
+  decoder.close();
+
+  let fakeChunk = new EncodedVideoChunk('key', 0, Uint8Array.of(0));
+  assert_throws_dom("InvalidStateError",
+                    () => decoder.configure({codec: vp9.codec}),
+                    "configure");
+  assert_throws_dom("InvalidStateError",
+                    () => decoder.decode(fakeChunk),
+                    "reset");
+  assert_throws_dom("InvalidStateError",
+                    () => decoder.reset(),
+                    "reset");
+  assert_throws_dom("InvalidStateError",
+                    () => decoder.close(),
+                    "close");
+  return promise_rejects_dom(t, 'InvalidStateError', decoder.flush(), 'flush');
+}, 'Closed decoder');
+
+promise_test(t => {
+  let numErrors = 0;
+  let decoder = new VideoDecoder({
+    output(frame) {
+      t.step(() => {
+        throw "unexpected output";
+      });
+    },
+    error(e) {
+      numErrors++;
+    }
+  });
+
+  let fakeChunk = new EncodedVideoChunk('key', 0, Uint8Array.of(0));
+  decoder.decode(fakeChunk);
+
+  return decoder.flush().then(
+      () => { throw "flush succeeded unexpectedly"; },
+      () => { assert_equals(numErrors, 1, "errors"); });
+}, 'Decode without configure');
+
+promise_test(t => {
+  let numErrors = 0;
+  let decoder = new VideoDecoder({
+    output(frame) {
+      t.step(() => {
+        throw "unexpected output";
+      });
+    },
+    error(e) {
+      numErrors++;
+    }
+  });
+
+  decoder.configure({codec: vp9.codec});
+
+  let fakeChunk = new EncodedVideoChunk('key', 0, Uint8Array.of(0));
+  decoder.decode(fakeChunk);
+
+  return decoder.flush().then(
+      () => { throw "flush succeeded unexpectedly"; },
+      () => { assert_equals(numErrors, 1, "errors"); });
+}, 'Decode corrupt VP9 frame');
+
+promise_test(t => {
+  let numErrors = 0;
+  let decoder = new VideoDecoder({
+    output(frame) {
+      t.step(() => {
+        throw "unexpected output";
+      });
+    },
+    error(e) {
+      numErrors++;
+    }
+  });
+
+  decoder.configure({codec: vp9.codec});
+
+  let fakeChunk = new EncodedVideoChunk('key', 0, Uint8Array.of());
+  decoder.decode(fakeChunk);
+
+  return decoder.flush().then(
+      () => { throw "flush succeeded unexpectedly"; },
+      () => { assert_equals(numErrors, 1, "errors"); });
+}, 'Decode empty VP9 frame');
 </script>
 </html>
new file mode 100644
index 0000000000000000000000000000000000000000..7553e5cae9202c0f144126910e9471658038b455
GIT binary patch
literal 6159
zc$|Gz1zeNi)*szUNq2*kG)x@bAs|X4GCDTdh)IkV5v9AkMLKl|N|&Sv2-1j1ckG*Z
z@9%o={l4${z5n-|=RD^*{cZpNfXN<?fI7h-ZU6u_;5WrU%nd4W2LJ#N+I!g90RYq=
z-M}{RV9gLE0M*WoBSIN2CORzuVGMHO^nLW&)2sRDJ>(XWmvomUdC?Dagp^*tw2&V6
z(O2I`>Gxcq8TX&*C7*%3OLkeQ_Ta;Fdr0*`wC`R(w1!syp8wQkbQuzE`wgpI{N6iA
z*+#<q?r(?lwk>CE?Z?(Q26Z<|QQq(OpdrW4`ddy4ATvz;=p4hyRgQL;u`%+yN;w)6
zr<2DSIRE$;NvZJ4EB(}tP)GcDA9D_hZ$dwkyT(?)n|EsYWG1INa^KRdLb_|@i*qFr
z2}MulfbSsp#wW8l(NseffoAs!`z_2E8mo!tWX9yrf5dLYbX9yz^eXu@@(o}8E26t4
zgj9BgdIkP!c_~<+ce7V$FgT&HO9v&U70|osJoY)K==34a5(&g%%z$xAt%0XygVKoc
z65$+$>hRSRW3aB;Sb3VLb+hh4O7Iu{qj9C)yWN@7OZj=VVb)h(db*jq5(c!UMmyXT
z;elj?4QmUyspyK`2GY5MC7gpco`JKBs^nQsl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