alpha2 0.5.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -3
- package/THIRD_PARTY_NOTICES.md +7 -3
- package/dist/apply-edit.d.ts +124 -0
- package/dist/apply-edit.js +15 -0
- package/dist/assets.d.ts +12 -0
- package/dist/audio-layout.js +6 -3
- package/dist/audio-worklet-processor.js +27 -33
- package/dist/audio.d.ts +5 -4
- package/dist/audio.js +8 -6
- package/dist/compose.d.ts +105 -0
- package/dist/compose.js +63 -0
- package/dist/decoder-fallback.d.ts +3 -2
- package/dist/decoder-fallback.js +11 -3
- package/dist/decoder-stall.d.ts +15 -0
- package/dist/decoder-stall.js +52 -0
- package/dist/edit-data.d.ts +24 -0
- package/dist/edit-data.js +224 -0
- package/dist/edit-keys.d.ts +16 -0
- package/dist/edit-keys.js +233 -0
- package/dist/edit.d.ts +41 -8
- package/dist/edit.js +123 -30
- package/dist/export-failure.d.ts +10 -2
- package/dist/export-failure.js +55 -4
- package/dist/export-retry.d.ts +6 -1
- package/dist/export-retry.js +12 -1
- package/dist/exporter.d.ts +11 -7
- package/dist/exporter.js +10 -9
- package/dist/extract.d.ts +65 -0
- package/dist/extract.js +291 -0
- package/dist/extractor.d.ts +151 -0
- package/dist/extractor.js +141 -0
- package/dist/float32.d.ts +2 -0
- package/dist/float32.js +10 -0
- package/dist/frame-intake.d.ts +5 -0
- package/dist/frame-intake.js +10 -3
- package/dist/generated/builtin-effects.d.ts +3 -0
- package/dist/generated/builtin-effects.js +1804 -0
- package/dist/generated/project-schema.d.ts +636 -37
- package/dist/generated/project-schema.js +55 -0
- package/dist/generated/project-shape.js +950 -381
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json-text.js +14 -2
- package/dist/layout-values.js +7 -1
- package/dist/layout.d.ts +12 -4
- package/dist/media.d.ts +43 -10
- package/dist/media.js +255 -66
- package/dist/mediabunny.d.ts +32 -12
- package/dist/mediabunny.js +276 -90
- package/dist/player.d.ts +9 -3
- package/dist/player.js +114 -18
- package/dist/plugins.d.ts +62 -0
- package/dist/plugins.js +506 -0
- package/dist/project-data.d.ts +56 -0
- package/dist/project-data.js +765 -0
- package/dist/project.d.ts +24 -1
- package/dist/project.js +456 -38
- package/dist/robustness.d.ts +6 -33
- package/dist/robustness.js +2 -63
- package/dist/sha256.d.ts +3 -2
- package/dist/sha256.js +14 -6
- package/dist/worker-error.d.ts +3 -2
- package/dist/worker-error.js +3 -1
- package/dist/worker.d.ts +13 -3
- package/dist/worker.js +36 -9
- package/package.json +26 -1
- package/wasm/alpha2_compose.d.ts +92 -0
- package/wasm/alpha2_compose.js +445 -0
- package/wasm/alpha2_compose_bg.wasm +0 -0
- package/wasm/alpha2_compose_bg.wasm.d.ts +17 -0
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_extensions_pdf_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +151 -18
- package/wasm/alpha2_wasm.js +403 -59
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +21 -6
- package/wasm/rust-crate-licenses.md +5 -61
- package/wasm/snippets/alpha2-wasm-1b02e9f302d283ba/inline3.js +7 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline1.js → alpha2-wasm-1b02e9f302d283ba/inline0.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline2.js → alpha2-wasm-1b02e9f302d283ba/inline1.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline3.js → alpha2-wasm-1b02e9f302d283ba/inline2.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a6265983c9769e80/inline0.js → alpha2-wasm-1b02e9f302d283ba/inline4.js} +0 -0
package/dist/frame-intake.js
CHANGED
|
@@ -42,15 +42,22 @@ export async function intakeVideoFrame(frame, options) {
|
|
|
42
42
|
* Reads the frame's planes, retrying up to {@link READBACK_RETRIES} times a task apart on readback
|
|
43
43
|
* failures. Rejects with {@link NonPlanarVideoFrameError} or the last read's error.
|
|
44
44
|
*/
|
|
45
|
-
export
|
|
45
|
+
export function readPlanesWithRetries(frame, declared, identity, pool, counters) {
|
|
46
|
+
return withReadbackRetries(() => readPlanarYuvFrame(frame, declared, identity, pool), () => (counters.readbackRetries += 1));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Runs `read`, retrying up to {@link READBACK_RETRIES} times a task apart while it fails with
|
|
50
|
+
* {@link isUnreadableFrame}. Rejects with the last read's error.
|
|
51
|
+
*/
|
|
52
|
+
export async function withReadbackRetries(read, onRetry = () => { }) {
|
|
46
53
|
for (let retry = 0;; retry += 1) {
|
|
47
54
|
try {
|
|
48
|
-
return await
|
|
55
|
+
return await read();
|
|
49
56
|
}
|
|
50
57
|
catch (error) {
|
|
51
58
|
if (retry >= READBACK_RETRIES || !isUnreadableFrame(error))
|
|
52
59
|
throw error;
|
|
53
|
-
|
|
60
|
+
onRetry();
|
|
54
61
|
await nextTask();
|
|
55
62
|
}
|
|
56
63
|
}
|