alpha2 0.4.6 → 0.5.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 +5 -4
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/abort.d.ts +12 -0
- package/dist/abort.js +48 -0
- package/dist/active-clock.d.ts +35 -0
- package/dist/active-clock.js +99 -0
- package/dist/assets.d.ts +28 -22
- package/dist/assets.js +8 -12
- package/dist/audio-layout.d.ts +52 -74
- package/dist/audio-layout.js +114 -148
- package/dist/audio-timeline.d.ts +89 -117
- package/dist/audio-timeline.js +102 -118
- package/dist/audio-worker.d.ts +12 -21
- package/dist/audio-worker.js +8 -13
- package/dist/audio-worklet-processor.js +45 -58
- package/dist/audio-worklet.d.ts +45 -76
- package/dist/audio-worklet.js +44 -79
- package/dist/audio.d.ts +15 -23
- package/dist/audio.js +9 -13
- package/dist/builder.d.ts +45 -63
- package/dist/builder.js +49 -45
- package/dist/capabilities.d.ts +99 -16
- package/dist/capabilities.js +2 -2
- package/dist/captions.d.ts +45 -22
- package/dist/captions.js +60 -15
- package/dist/chroma-siting.d.ts +24 -41
- package/dist/chroma-siting.js +38 -71
- package/dist/containers.d.ts +41 -30
- package/dist/containers.js +59 -27
- package/dist/decoder-fallback.d.ts +13 -0
- package/dist/decoder-fallback.js +38 -0
- package/dist/decoder-order.d.ts +24 -39
- package/dist/decoder-order.js +28 -42
- package/dist/edit.d.ts +77 -154
- package/dist/edit.js +98 -180
- package/dist/effects.d.ts +108 -177
- package/dist/effects.js +7 -9
- package/dist/export-destination.d.ts +25 -41
- package/dist/export-destination.js +20 -32
- package/dist/export-failure.d.ts +34 -59
- package/dist/export-failure.js +54 -48
- package/dist/export-metrics.d.ts +116 -0
- package/dist/export-metrics.js +74 -0
- package/dist/export-retry.d.ts +46 -29
- package/dist/export-retry.js +86 -51
- package/dist/exporter.d.ts +67 -116
- package/dist/exporter.js +133 -133
- package/dist/extensions.d.ts +69 -115
- package/dist/extensions.js +55 -82
- package/dist/frame-intake.d.ts +92 -0
- package/dist/frame-intake.js +114 -0
- package/dist/frame-supply.d.ts +96 -162
- package/dist/frame-supply.js +181 -171
- package/dist/generated/project-schema.d.ts +701 -485
- package/dist/generated/project-schema.js +55 -2
- package/dist/generated/project-shape.js +261 -16
- package/dist/geometry.d.ts +28 -34
- package/dist/geometry.js +18 -23
- package/dist/gpu-recovery.d.ts +92 -0
- package/dist/gpu-recovery.js +135 -0
- package/dist/hdr-frames.d.ts +82 -67
- package/dist/hdr-frames.js +112 -49
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/json-text.d.ts +13 -23
- package/dist/json-text.js +10 -20
- package/dist/layout-values.d.ts +14 -22
- package/dist/layout-values.js +18 -21
- package/dist/layout.d.ts +48 -63
- package/dist/layout.js +37 -37
- package/dist/loudness.d.ts +27 -32
- package/dist/loudness.js +19 -23
- package/dist/media.d.ts +85 -237
- package/dist/media.js +133 -287
- package/dist/mediabunny.d.ts +166 -245
- package/dist/mediabunny.js +741 -580
- package/dist/physical-frames.d.ts +5 -17
- package/dist/physical-frames.js +4 -11
- package/dist/player.d.ts +56 -47
- package/dist/player.js +155 -40
- package/dist/presented-frames.d.ts +2 -7
- package/dist/presented-frames.js +3 -8
- package/dist/project.d.ts +73 -117
- package/dist/project.js +384 -445
- package/dist/rate-control.d.ts +9 -23
- package/dist/rate-control.js +7 -18
- package/dist/renderer-choice.d.ts +41 -0
- package/dist/renderer-choice.js +82 -0
- package/dist/repacked-bytes.d.ts +0 -2
- package/dist/repacked-bytes.js +2 -5
- package/dist/robustness.d.ts +25 -37
- package/dist/robustness.js +71 -54
- package/dist/sha256.d.ts +5 -13
- package/dist/sha256.js +9 -24
- package/dist/text.d.ts +97 -71
- package/dist/text.js +33 -70
- package/dist/video-frames.d.ts +7 -25
- package/dist/video-frames.js +12 -29
- package/dist/waveform.d.ts +5 -11
- package/dist/waveform.js +4 -9
- package/dist/worker-error.d.ts +5 -20
- package/dist/worker-error.js +8 -25
- package/dist/worker.d.ts +82 -95
- package/dist/worker.js +235 -143
- package/package.json +26 -2
- package/wasm/alpha2_audio_worklet.wasm +0 -0
- package/wasm/alpha2_extensions.d.ts +26 -47
- package/wasm/alpha2_extensions.js +26 -47
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +460 -567
- package/wasm/alpha2_wasm.js +594 -594
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +15 -8
- package/wasm/rust-crate-licenses.md +2 -2
- package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-1313375d424845c0}/inline1.js +1 -0
- package/wasm/snippets/alpha2-wasm-1313375d424845c0/inline2.js +82 -0
- package/wasm/snippets/alpha2-wasm-c62e60c964e88a52/inline2.js +0 -52
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-1313375d424845c0}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-1313375d424845c0}/inline3.js +0 -0
package/wasm/alpha2_wasm.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/* @ts-self-types="./alpha2_wasm.d.ts" */
|
|
2
|
-
import { alpha2Canvas2d, alpha2ImagePixels, alpha2PutRgba, alpha2ResizeCanvas } from './snippets/alpha2-wasm-
|
|
3
|
-
import {
|
|
4
|
-
import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-
|
|
5
|
-
import * as import1 from "./snippets/alpha2-wasm-
|
|
6
|
-
import * as import2 from "./snippets/alpha2-wasm-
|
|
2
|
+
import { alpha2Canvas2d, alpha2ImagePixels, alpha2PutRgba, alpha2ResizeCanvas } from './snippets/alpha2-wasm-1313375d424845c0/inline0.js';
|
|
3
|
+
import { alpha2BitmapUploadProbe, alpha2FrameBitmap } from './snippets/alpha2-wasm-1313375d424845c0/inline2.js';
|
|
4
|
+
import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-1313375d424845c0/inline3.js';
|
|
5
|
+
import * as import1 from "./snippets/alpha2-wasm-1313375d424845c0/inline1.js"
|
|
6
|
+
import * as import2 from "./snippets/alpha2-wasm-1313375d424845c0/inline1.js"
|
|
7
|
+
import * as import3 from "./snippets/alpha2-wasm-1313375d424845c0/inline1.js"
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
|
-
* Converts one source's audio to the project rate. Positions are sample
|
|
11
|
-
*
|
|
11
|
+
* Converts one source's audio to the project rate. Positions are sample indexes: the source's
|
|
12
|
+
* at its own rate, the output's at the project rate.
|
|
12
13
|
*/
|
|
13
14
|
export class AudioResampler {
|
|
14
15
|
__destroy_into_raw() {
|
|
@@ -25,8 +26,8 @@ export class AudioResampler {
|
|
|
25
26
|
* A converter from `source_rate` to `target_rate`.
|
|
26
27
|
*
|
|
27
28
|
* # Errors
|
|
28
|
-
* Rejects a rate of zero or above 768 kHz, and a source rate more than
|
|
29
|
-
*
|
|
29
|
+
* Rejects a rate of zero or above 768 kHz, and a source rate more than 8192 times the
|
|
30
|
+
* target rate.
|
|
30
31
|
* @param {number} source_rate
|
|
31
32
|
* @param {number} target_rate
|
|
32
33
|
*/
|
|
@@ -40,8 +41,8 @@ export class AudioResampler {
|
|
|
40
41
|
return this;
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
|
-
* `frames` outputs from `target_start`, from `input`, whose first sample
|
|
44
|
-
*
|
|
44
|
+
* `frames` outputs from `target_start`, from `input`, whose first sample is source sample
|
|
45
|
+
* `input_start`. The source is silent outside `input`.
|
|
45
46
|
*
|
|
46
47
|
* # Errors
|
|
47
48
|
* Rejects a position that is not a whole sample index.
|
|
@@ -237,9 +238,8 @@ export class LoudnessMeter {
|
|
|
237
238
|
return this;
|
|
238
239
|
}
|
|
239
240
|
/**
|
|
240
|
-
* Adds one block
|
|
241
|
-
*
|
|
242
|
-
* silence.
|
|
241
|
+
* Adds one block of planar samples, channel after channel, all of one length. NaN or
|
|
242
|
+
* infinite samples measure as silence.
|
|
243
243
|
*
|
|
244
244
|
* # Errors
|
|
245
245
|
* Rejects a block whose length is not a multiple of the channel count.
|
|
@@ -313,13 +313,12 @@ export class PlaybackClock {
|
|
|
313
313
|
return ret[0] !== 0;
|
|
314
314
|
}
|
|
315
315
|
/**
|
|
316
|
-
* A clock starting at `tick` at wall time `now_ms`, playing at `rate`
|
|
317
|
-
*
|
|
318
|
-
* `
|
|
316
|
+
* A clock starting at `tick` at wall time `now_ms`, playing at `rate` under `policy`
|
|
317
|
+
* (`drop_video_keep_audio`, `preserve_every_video_frame`, `silent_scrub`, or
|
|
318
|
+
* `offline_exact`).
|
|
319
319
|
*
|
|
320
320
|
* # Errors
|
|
321
|
-
* Rejects an unknown policy, an invalid frame rate, or a rate or tick
|
|
322
|
-
* that is not finite.
|
|
321
|
+
* Rejects an unknown policy, an invalid frame rate, or a non-finite rate or tick.
|
|
323
322
|
* @param {string} policy
|
|
324
323
|
* @param {number} frame_rate_num
|
|
325
324
|
* @param {number} frame_rate_den
|
|
@@ -339,10 +338,9 @@ export class PlaybackClock {
|
|
|
339
338
|
return this;
|
|
340
339
|
}
|
|
341
340
|
/**
|
|
342
|
-
* The time to show at wall time `now_ms`. `heard` is the audio output's
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
* the clock last asked for has been shown.
|
|
341
|
+
* The time to show at wall time `now_ms`. `heard` is the audio output's position in ticks
|
|
342
|
+
* while it runs, else `undefined` (positions before the clock's start clamp to it);
|
|
343
|
+
* `presented` says whether the frame last asked for has been shown.
|
|
346
344
|
*
|
|
347
345
|
* # Errors
|
|
348
346
|
* Rejects a `heard` that is not an integer tick.
|
|
@@ -398,8 +396,17 @@ export class RasterizedText {
|
|
|
398
396
|
}
|
|
399
397
|
}
|
|
400
398
|
/**
|
|
401
|
-
* Copies out the
|
|
402
|
-
*
|
|
399
|
+
* Copies out the background boxes split off by `splitBackground`, packed like the
|
|
400
|
+
* pixels. Empty when not split, or after `takePixels`.
|
|
401
|
+
* @returns {Uint8Array}
|
|
402
|
+
*/
|
|
403
|
+
takeBackground() {
|
|
404
|
+
const ret = wasm.rasterizedtext_takeBackground(this.__wbg_ptr);
|
|
405
|
+
return ret;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Copies out the pixels as tightly packed premultiplied RGBA8 rows and releases them and
|
|
409
|
+
* the background; a second call returns an empty array.
|
|
403
410
|
* @returns {Uint8Array}
|
|
404
411
|
*/
|
|
405
412
|
takePixels() {
|
|
@@ -410,10 +417,8 @@ export class RasterizedText {
|
|
|
410
417
|
if (Symbol.dispose) RasterizedText.prototype[Symbol.dispose] = RasterizedText.prototype.free;
|
|
411
418
|
|
|
412
419
|
/**
|
|
413
|
-
* Measures text generators
|
|
414
|
-
*
|
|
415
|
-
* a renderer draws with, in the same order, it answers for that
|
|
416
|
-
* renderer's frames.
|
|
420
|
+
* Measures where text generators draw on the canvas, without a GPU. Given the same fonts in
|
|
421
|
+
* the same order as a renderer, it answers for that renderer's frames.
|
|
417
422
|
*/
|
|
418
423
|
export class WasmTextMeasurer {
|
|
419
424
|
__destroy_into_raw() {
|
|
@@ -427,12 +432,11 @@ export class WasmTextMeasurer {
|
|
|
427
432
|
wasm.__wbg_wasmtextmeasurer_free(ptr, 0);
|
|
428
433
|
}
|
|
429
434
|
/**
|
|
430
|
-
* Appends every face of an OpenType font file to the fallback
|
|
431
|
-
* in
|
|
432
|
-
* checked before any is added.
|
|
435
|
+
* Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
|
|
436
|
+
* stack in file order, all checked before any is added.
|
|
433
437
|
*
|
|
434
438
|
* # Errors
|
|
435
|
-
* Rejects malformed font bytes
|
|
439
|
+
* Rejects malformed font bytes; no face is added.
|
|
436
440
|
* @param {string} family
|
|
437
441
|
* @param {Uint8Array} bytes
|
|
438
442
|
*/
|
|
@@ -472,24 +476,20 @@ export class WasmTextMeasurer {
|
|
|
472
476
|
wasm.wasmtextmeasurer_clearFonts(this.__wbg_ptr);
|
|
473
477
|
}
|
|
474
478
|
/**
|
|
475
|
-
* Where each node of the layout generator `generator_json`
|
|
476
|
-
*
|
|
477
|
-
* `
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
*
|
|
485
|
-
* the picture is drawn at. The layout's `"<n>px"` lengths are pixels
|
|
486
|
-
* of the project canvas, `canvasWidth` by `canvasHeight`: the
|
|
487
|
-
* picture's size when they are omitted.
|
|
479
|
+
* Where each node of the layout generator `generator_json` (`{ "type": "layout",
|
|
480
|
+
* "root" }`) lies on a `width` by `height` picture at `time` (ticks), as JSON
|
|
481
|
+
* `{ nodes }`.
|
|
482
|
+
*
|
|
483
|
+
* Nodes are in preorder as `{ at, border, content, overflow, lineCount, baselines }`,
|
|
484
|
+
* boxes `{ left, top, right, bottom }` in picture fractions before the clip's transform
|
|
485
|
+
* and node visuals. `lineCount` is `null` for a node without text, and `baselines`
|
|
486
|
+
* (`{ first, last }`, fractions of picture height) also for empty text. `"<n>px"`
|
|
487
|
+
* lengths are project canvas pixels (`canvasWidth` by `canvasHeight`, defaulting to the
|
|
488
|
+
* picture size).
|
|
488
489
|
*
|
|
489
490
|
* # Errors
|
|
490
|
-
* Rejects
|
|
491
|
-
*
|
|
492
|
-
* measurer without fonts for a layout with text.
|
|
491
|
+
* Rejects an invalid layout generator, an empty picture or canvas, a time that is not
|
|
492
|
+
* whole ticks, and a measurer without fonts for a layout with text.
|
|
493
493
|
* @param {string} generator_json
|
|
494
494
|
* @param {number} width
|
|
495
495
|
* @param {number} height
|
|
@@ -519,20 +519,17 @@ export class WasmTextMeasurer {
|
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
/**
|
|
522
|
-
* Where the text generator `generator_json` (`{ "type": "text",
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
* canvas height. Measure at the project's canvas size: text laid out
|
|
531
|
-
* at another size can break its lines elsewhere.
|
|
522
|
+
* Where the text generator `generator_json` (`{ "type": "text", "text", "style" }`)
|
|
523
|
+
* lies on a `width` by `height` canvas, as JSON `{ layout, content, ink, lineCount,
|
|
524
|
+
* baselines }`.
|
|
525
|
+
*
|
|
526
|
+
* Rectangles are `{ left, top, right, bottom }` in canvas fractions, before the clip's
|
|
527
|
+
* transform; `ink` is `null` when nothing draws. `baselines` is `{ first, last }`, the
|
|
528
|
+
* first and last alphabetic baselines as fractions of canvas height. Measure at the
|
|
529
|
+
* project canvas size, since another size can break lines elsewhere.
|
|
532
530
|
*
|
|
533
531
|
* # Errors
|
|
534
|
-
* Rejects
|
|
535
|
-
* a measurer without fonts.
|
|
532
|
+
* Rejects an invalid text generator, an empty canvas, and a measurer without fonts.
|
|
536
533
|
* @param {string} generator_json
|
|
537
534
|
* @param {number} width
|
|
538
535
|
* @param {number} height
|
|
@@ -585,12 +582,11 @@ export class WasmTextRasterizer {
|
|
|
585
582
|
wasm.__wbg_wasmtextrasterizer_free(ptr, 0);
|
|
586
583
|
}
|
|
587
584
|
/**
|
|
588
|
-
* Appends every face of an OpenType font file to the fallback
|
|
589
|
-
* in
|
|
590
|
-
* checked before any is added.
|
|
585
|
+
* Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
|
|
586
|
+
* stack in file order, all checked before any is added.
|
|
591
587
|
*
|
|
592
588
|
* # Errors
|
|
593
|
-
* Rejects malformed font bytes
|
|
589
|
+
* Rejects malformed font bytes; no face is added.
|
|
594
590
|
* @param {string} family
|
|
595
591
|
* @param {Uint8Array} bytes
|
|
596
592
|
*/
|
|
@@ -654,14 +650,12 @@ export class WasmTextRasterizer {
|
|
|
654
650
|
return this;
|
|
655
651
|
}
|
|
656
652
|
/**
|
|
657
|
-
* Shapes, lays out, and rasterizes one request, or returns the cached
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
* least recently used past it.
|
|
653
|
+
* Shapes, lays out, and rasterizes one request, or returns the cached result for its
|
|
654
|
+
* content version. The cache keeps `alpha2_text::DEFAULT_TEXT_CACHE_BYTES` of results,
|
|
655
|
+
* least recently used first out.
|
|
661
656
|
*
|
|
662
657
|
* # Errors
|
|
663
|
-
* Rejects a malformed or out-of-range request, or a rasterizer
|
|
664
|
-
* without fonts.
|
|
658
|
+
* Rejects a malformed or out-of-range request, or a rasterizer without fonts.
|
|
665
659
|
* @param {string} request_json
|
|
666
660
|
* @param {bigint} content_version
|
|
667
661
|
* @returns {RasterizedText}
|
|
@@ -679,8 +673,7 @@ export class WasmTextRasterizer {
|
|
|
679
673
|
if (Symbol.dispose) WasmTextRasterizer.prototype[Symbol.dispose] = WasmTextRasterizer.prototype.free;
|
|
680
674
|
|
|
681
675
|
/**
|
|
682
|
-
* Builds a multi-resolution waveform summary from planar samples streamed in
|
|
683
|
-
* blocks.
|
|
676
|
+
* Builds a multi-resolution waveform summary from planar samples streamed in blocks.
|
|
684
677
|
*/
|
|
685
678
|
export class WaveformBuilder {
|
|
686
679
|
__destroy_into_raw() {
|
|
@@ -708,8 +701,8 @@ export class WaveformBuilder {
|
|
|
708
701
|
return WaveformResult.__wrap(ret[0]);
|
|
709
702
|
}
|
|
710
703
|
/**
|
|
711
|
-
* A builder for `channels` channels, `bucket_samples` samples per finest
|
|
712
|
-
*
|
|
704
|
+
* A builder for `channels` channels, `bucket_samples` samples per finest bucket, and
|
|
705
|
+
* `levels` zoom levels, each four times coarser.
|
|
713
706
|
*
|
|
714
707
|
* # Errors
|
|
715
708
|
* Rejects zero channels, a zero bucket, or 0 or more than 16 levels.
|
|
@@ -727,12 +720,11 @@ export class WaveformBuilder {
|
|
|
727
720
|
return this;
|
|
728
721
|
}
|
|
729
722
|
/**
|
|
730
|
-
* Adds one block
|
|
731
|
-
* channel, all of one length.
|
|
723
|
+
* Adds one block of planar samples, channel after channel, all of one length.
|
|
732
724
|
*
|
|
733
725
|
* # Errors
|
|
734
|
-
* Rejects a block whose length is not a multiple of the channel count,
|
|
735
|
-
*
|
|
726
|
+
* Rejects a block whose length is not a multiple of the channel count, or a finished
|
|
727
|
+
* builder.
|
|
736
728
|
* @param {Float32Array} planar
|
|
737
729
|
*/
|
|
738
730
|
push(planar) {
|
|
@@ -776,8 +768,8 @@ export class WaveformResult {
|
|
|
776
768
|
return ret >>> 0;
|
|
777
769
|
}
|
|
778
770
|
/**
|
|
779
|
-
* One channel's buckets at `level` as `[min, max, rms]` triples; empty
|
|
780
|
-
*
|
|
771
|
+
* One channel's buckets at `level` as `[min, max, rms]` triples; empty past the last level
|
|
772
|
+
* or channel.
|
|
781
773
|
* @param {number} level
|
|
782
774
|
* @param {number} channel
|
|
783
775
|
* @returns {Float32Array}
|
|
@@ -810,9 +802,8 @@ if (Symbol.dispose) WaveformResult.prototype[Symbol.dispose] = WaveformResult.pr
|
|
|
810
802
|
/**
|
|
811
803
|
* The browser renderer that draws on the CPU, for a page with no GPU.
|
|
812
804
|
*
|
|
813
|
-
* It answers the calls `WebEffectRegistry`
|
|
814
|
-
*
|
|
815
|
-
* renderer, byte for byte. Effects registered at run time are refused.
|
|
805
|
+
* It answers the same preview, export, text and audio calls as `WebEffectRegistry` and draws
|
|
806
|
+
* byte-identical pictures to the native CPU renderer. Runtime effects are refused.
|
|
816
807
|
*/
|
|
817
808
|
export class WebCpuRenderer {
|
|
818
809
|
static __wrap(ptr) {
|
|
@@ -832,12 +823,11 @@ export class WebCpuRenderer {
|
|
|
832
823
|
wasm.__wbg_webcpurenderer_free(ptr, 0);
|
|
833
824
|
}
|
|
834
825
|
/**
|
|
835
|
-
* Appends every face of an OpenType font file to the fallback
|
|
836
|
-
*
|
|
837
|
-
* before any is added, as the export host registers a file.
|
|
826
|
+
* Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
|
|
827
|
+
* stack in file order, all checked before any is added.
|
|
838
828
|
*
|
|
839
829
|
* # Errors
|
|
840
|
-
* Returns an error for malformed font bytes
|
|
830
|
+
* Returns an error for malformed font bytes; no face is added.
|
|
841
831
|
* @param {string} family
|
|
842
832
|
* @param {Uint8Array} bytes
|
|
843
833
|
*/
|
|
@@ -874,8 +864,8 @@ export class WebCpuRenderer {
|
|
|
874
864
|
* `WebEffectRegistry.aliasVideoFrame`.
|
|
875
865
|
*
|
|
876
866
|
* # Errors
|
|
877
|
-
* Refuses an alias that would
|
|
878
|
-
*
|
|
867
|
+
* Refuses an alias that would push the export frame's sources over the uploaded-frame
|
|
868
|
+
* budget.
|
|
879
869
|
* @param {string} source_id
|
|
880
870
|
* @param {bigint} existing_media_time_ticks
|
|
881
871
|
* @param {bigint} requested_media_time_ticks
|
|
@@ -1011,29 +1001,30 @@ export class WebCpuRenderer {
|
|
|
1011
1001
|
return ret >>> 0;
|
|
1012
1002
|
}
|
|
1013
1003
|
/**
|
|
1014
|
-
* `WebEffectRegistry.beginExportAt`: one exact timeline timestamp at
|
|
1015
|
-
*
|
|
1004
|
+
* `WebEffectRegistry.beginExportAt`: one exact timeline timestamp at export quality, with
|
|
1005
|
+
* `readback` already settled.
|
|
1016
1006
|
*
|
|
1017
1007
|
* # Errors
|
|
1018
|
-
* Returns an error without a loaded project, for an unknown codec or an
|
|
1019
|
-
*
|
|
1020
|
-
* or when the frame cannot be drawn.
|
|
1008
|
+
* Returns an error without a loaded project, for an unknown codec or odd size, an effect
|
|
1009
|
+
* that does not draw on the CPU (`EFFECT_ERROR`), or when the frame cannot be drawn.
|
|
1021
1010
|
* @param {bigint} time_ticks
|
|
1022
1011
|
* @param {string} codec
|
|
1012
|
+
* @param {string | null} [pixels]
|
|
1023
1013
|
* @returns {any}
|
|
1024
1014
|
*/
|
|
1025
|
-
beginExportAt(time_ticks, codec) {
|
|
1015
|
+
beginExportAt(time_ticks, codec, pixels) {
|
|
1026
1016
|
const ptr0 = passStringToWasm0(codec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1027
1017
|
const len0 = WASM_VECTOR_LEN;
|
|
1028
|
-
|
|
1018
|
+
var ptr1 = isLikeNone(pixels) ? 0 : passStringToWasm0(pixels, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1019
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1020
|
+
const ret = wasm.webcpurenderer_beginExportAt(this.__wbg_ptr, time_ticks, ptr0, len0, ptr1, len1);
|
|
1029
1021
|
if (ret[2]) {
|
|
1030
1022
|
throw takeFromExternrefTable0(ret[1]);
|
|
1031
1023
|
}
|
|
1032
1024
|
return takeFromExternrefTable0(ret[0]);
|
|
1033
1025
|
}
|
|
1034
1026
|
/**
|
|
1035
|
-
* `WebEffectRegistry.beginExportFrame
|
|
1036
|
-
* settled.
|
|
1027
|
+
* `WebEffectRegistry.beginExportFrame`, with `readback` already settled.
|
|
1037
1028
|
*
|
|
1038
1029
|
* # Errors
|
|
1039
1030
|
* As [`Self::export_frame`].
|
|
@@ -1050,8 +1041,8 @@ export class WebCpuRenderer {
|
|
|
1050
1041
|
* `WebEffectRegistry.beginExport`, drawing on the CPU.
|
|
1051
1042
|
*
|
|
1052
1043
|
* # Errors
|
|
1053
|
-
* Returns an error without a loaded project, for an empty range, an
|
|
1054
|
-
*
|
|
1044
|
+
* Returns an error without a loaded project, for an empty range, an invalid frame rate, or
|
|
1045
|
+
* an unknown codec.
|
|
1055
1046
|
* @param {bigint} start_ticks
|
|
1056
1047
|
* @param {bigint} end_ticks
|
|
1057
1048
|
* @param {number} rate_num
|
|
@@ -1067,8 +1058,7 @@ export class WebCpuRenderer {
|
|
|
1067
1058
|
}
|
|
1068
1059
|
}
|
|
1069
1060
|
/**
|
|
1070
|
-
* The engine's effect and transition authoring catalog
|
|
1071
|
-
* draws on the CPU.
|
|
1061
|
+
* The engine's effect and transition authoring catalog; every built-in draws on the CPU.
|
|
1072
1062
|
* @returns {string}
|
|
1073
1063
|
*/
|
|
1074
1064
|
builtinCatalog() {
|
|
@@ -1084,10 +1074,8 @@ export class WebCpuRenderer {
|
|
|
1084
1074
|
}
|
|
1085
1075
|
}
|
|
1086
1076
|
/**
|
|
1087
|
-
*
|
|
1088
|
-
*
|
|
1089
|
-
* `features` says `renderer.cpu` is available, `renderer.gpu` is not,
|
|
1090
|
-
* and runtime effects (`effects.runtime`) do not run.
|
|
1077
|
+
* The shared capability report JSON with runtime `browser`: backend `cpu`,
|
|
1078
|
+
* `renderer.cpu` available, `renderer.gpu` and `effects.runtime` not.
|
|
1091
1079
|
*
|
|
1092
1080
|
* # Errors
|
|
1093
1081
|
* Returns an error if the report cannot be serialized.
|
|
@@ -1142,7 +1130,7 @@ export class WebCpuRenderer {
|
|
|
1142
1130
|
wasm.webcpurenderer_clearFrames(this.__wbg_ptr);
|
|
1143
1131
|
}
|
|
1144
1132
|
/**
|
|
1145
|
-
* Refused:
|
|
1133
|
+
* Refused: runtime effects are WGSL, which only a GPU runs.
|
|
1146
1134
|
*
|
|
1147
1135
|
* # Errors
|
|
1148
1136
|
* Always rejects with `EFFECT_ERROR`.
|
|
@@ -1167,8 +1155,8 @@ export class WebCpuRenderer {
|
|
|
1167
1155
|
return ret !== 0;
|
|
1168
1156
|
}
|
|
1169
1157
|
/**
|
|
1170
|
-
* A JSON snapshot for developer tooling: what the CPU renderer drew,
|
|
1171
|
-
*
|
|
1158
|
+
* A JSON snapshot for developer tooling: what the CPU renderer drew, its result cache, and
|
|
1159
|
+
* the frames it holds.
|
|
1172
1160
|
*
|
|
1173
1161
|
* # Errors
|
|
1174
1162
|
* Returns an error if the snapshot cannot be serialized.
|
|
@@ -1199,12 +1187,11 @@ export class WebCpuRenderer {
|
|
|
1199
1187
|
wasm.webcpurenderer_endExport(this.__wbg_ptr);
|
|
1200
1188
|
}
|
|
1201
1189
|
/**
|
|
1202
|
-
* `WebEffectRegistry.exportFrame`: the next export frame, drawn
|
|
1203
|
-
* CPU before the call returns.
|
|
1190
|
+
* `WebEffectRegistry.exportFrame`: the next export frame, drawn before the call returns.
|
|
1204
1191
|
*
|
|
1205
1192
|
* # Errors
|
|
1206
|
-
* Returns an error without a running export or
|
|
1207
|
-
*
|
|
1193
|
+
* Returns an error without a running export or loaded project, or when the frame cannot
|
|
1194
|
+
* be drawn.
|
|
1208
1195
|
* @returns {Promise<any>}
|
|
1209
1196
|
*/
|
|
1210
1197
|
exportFrame() {
|
|
@@ -1289,8 +1276,8 @@ export class WebCpuRenderer {
|
|
|
1289
1276
|
return ret !== 0;
|
|
1290
1277
|
}
|
|
1291
1278
|
/**
|
|
1292
|
-
* Loads and validates a versioned project document, keeping uploads
|
|
1293
|
-
*
|
|
1279
|
+
* Loads and validates a versioned project document, keeping uploads as
|
|
1280
|
+
* `WebEffectRegistry.loadProject` does, and ends a running export.
|
|
1294
1281
|
*
|
|
1295
1282
|
* # Errors
|
|
1296
1283
|
* Rejects a document the engine refuses.
|
|
@@ -1434,10 +1421,9 @@ export class WebCpuRenderer {
|
|
|
1434
1421
|
return ret !== 0;
|
|
1435
1422
|
}
|
|
1436
1423
|
/**
|
|
1437
|
-
* Draws one project frame at
|
|
1438
|
-
*
|
|
1439
|
-
* `
|
|
1440
|
-
* is neither drawn nor put (`unchanged`).
|
|
1424
|
+
* Draws one project frame at preview quality onto the canvas's 2D context, scaled to fit,
|
|
1425
|
+
* and returns the JSON `WebEffectRegistry.renderAt` returns. A frame equal to the one
|
|
1426
|
+
* shown is skipped (`unchanged`).
|
|
1441
1427
|
*
|
|
1442
1428
|
* # Errors
|
|
1443
1429
|
* Fails without a project, or when the frame cannot be drawn.
|
|
@@ -1510,8 +1496,8 @@ export class WebCpuRenderer {
|
|
|
1510
1496
|
wasm.webcpurenderer_resetPlayer(this.__wbg_ptr);
|
|
1511
1497
|
}
|
|
1512
1498
|
/**
|
|
1513
|
-
* Sizes the canvas to `width` by `height`, which preview frames are
|
|
1514
|
-
*
|
|
1499
|
+
* Sizes the canvas to `width` by `height`, which preview frames are scaled to fill, and
|
|
1500
|
+
* drops the held frame.
|
|
1515
1501
|
*
|
|
1516
1502
|
* # Errors
|
|
1517
1503
|
* Fails without a canvas, or for a zero or oversized dimension.
|
|
@@ -1581,8 +1567,7 @@ export class WebCpuRenderer {
|
|
|
1581
1567
|
wasm.webcpurenderer_setPassTiming(this.__wbg_ptr, _enabled);
|
|
1582
1568
|
}
|
|
1583
1569
|
/**
|
|
1584
|
-
* Renders preview frames at `scale` times the project
|
|
1585
|
-
* on (0.5 until set).
|
|
1570
|
+
* Renders preview frames at `scale` times the project size from now on (default 0.5).
|
|
1586
1571
|
*
|
|
1587
1572
|
* # Errors
|
|
1588
1573
|
* Rejects a scale that is not finite, above 0 and at most 8.
|
|
@@ -1595,8 +1580,8 @@ export class WebCpuRenderer {
|
|
|
1595
1580
|
}
|
|
1596
1581
|
}
|
|
1597
1582
|
/**
|
|
1598
|
-
* Lets drawn results
|
|
1599
|
-
*
|
|
1583
|
+
* Lets drawn results use up to `bytes` of wasm memory for reuse when a frame repeats; zero
|
|
1584
|
+
* (the default) disables it.
|
|
1600
1585
|
*
|
|
1601
1586
|
* # Errors
|
|
1602
1587
|
* Rejects a negative or non-finite budget.
|
|
@@ -1609,8 +1594,7 @@ export class WebCpuRenderer {
|
|
|
1609
1594
|
}
|
|
1610
1595
|
}
|
|
1611
1596
|
/**
|
|
1612
|
-
* Sets the byte budget
|
|
1613
|
-
* memory), as `WebEffectRegistry.setUploadedFrameBudget` does.
|
|
1597
|
+
* Sets the uploaded-frame byte budget (default 256 MiB of wasm memory).
|
|
1614
1598
|
*
|
|
1615
1599
|
* # Errors
|
|
1616
1600
|
* Rejects a negative or non-finite budget.
|
|
@@ -1639,8 +1623,7 @@ export class WebCpuRenderer {
|
|
|
1639
1623
|
return v2;
|
|
1640
1624
|
}
|
|
1641
1625
|
/**
|
|
1642
|
-
*
|
|
1643
|
-
* its call returns.
|
|
1626
|
+
* Resolves at once, since CPU work is done when its call returns.
|
|
1644
1627
|
* @returns {Promise<any>}
|
|
1645
1628
|
*/
|
|
1646
1629
|
submittedWorkDone() {
|
|
@@ -1648,8 +1631,8 @@ export class WebCpuRenderer {
|
|
|
1648
1631
|
return ret;
|
|
1649
1632
|
}
|
|
1650
1633
|
/**
|
|
1651
|
-
* `true`: decoded `VideoFrame`s are taken
|
|
1652
|
-
*
|
|
1634
|
+
* `true`: decoded `VideoFrame`s are taken as planes (`uploadYuvFrame`) or through a 2D
|
|
1635
|
+
* canvas.
|
|
1653
1636
|
* @returns {boolean}
|
|
1654
1637
|
*/
|
|
1655
1638
|
get supportsExternalVideoFrame() {
|
|
@@ -1720,8 +1703,8 @@ export class WebCpuRenderer {
|
|
|
1720
1703
|
}
|
|
1721
1704
|
}
|
|
1722
1705
|
/**
|
|
1723
|
-
* [`Self::upload_presented_video_frame`] for a bitmap made with
|
|
1724
|
-
*
|
|
1706
|
+
* [`Self::upload_presented_video_frame`] for a bitmap made with `premultiplyAlpha: "none"`.
|
|
1707
|
+
* Always closes `bitmap`.
|
|
1725
1708
|
*
|
|
1726
1709
|
* # Errors
|
|
1727
1710
|
* As [`Self::upload_presented_video_frame`].
|
|
@@ -1844,13 +1827,11 @@ export class WebCpuRenderer {
|
|
|
1844
1827
|
return takeFromExternrefTable0(ret[0]);
|
|
1845
1828
|
}
|
|
1846
1829
|
/**
|
|
1847
|
-
* `WebEffectRegistry.uploadPresentedVideoFrame
|
|
1848
|
-
*
|
|
1849
|
-
* `frame`; an HDR source's frame is refused (`uploadYuvFrame` takes it).
|
|
1830
|
+
* `WebEffectRegistry.uploadPresentedVideoFrame`: the frame read through a 2D canvas (the
|
|
1831
|
+
* browser's conversion). Always closes `frame`. HDR sources must use `uploadYuvFrame`.
|
|
1850
1832
|
*
|
|
1851
1833
|
* # Errors
|
|
1852
|
-
* Rejects an HDR source's frame, a bad placement, and a frame the
|
|
1853
|
-
* browser cannot read.
|
|
1834
|
+
* Rejects an HDR source's frame, a bad placement, and a frame the browser cannot read.
|
|
1854
1835
|
* @param {string} source_id
|
|
1855
1836
|
* @param {bigint} media_time_ticks
|
|
1856
1837
|
* @param {VideoFrame} frame
|
|
@@ -1870,8 +1851,7 @@ export class WebCpuRenderer {
|
|
|
1870
1851
|
return takeFromExternrefTable0(ret[0]);
|
|
1871
1852
|
}
|
|
1872
1853
|
/**
|
|
1873
|
-
* `WebEffectRegistry.uploadRgbaFrame`: premultiplied RGBA8 kept at its
|
|
1874
|
-
* own size.
|
|
1854
|
+
* `WebEffectRegistry.uploadRgbaFrame`: premultiplied RGBA8 kept at its own size.
|
|
1875
1855
|
*
|
|
1876
1856
|
* # Errors
|
|
1877
1857
|
* Rejects pixels that do not hold the size.
|
|
@@ -1894,8 +1874,7 @@ export class WebCpuRenderer {
|
|
|
1894
1874
|
return takeFromExternrefTable0(ret[0]);
|
|
1895
1875
|
}
|
|
1896
1876
|
/**
|
|
1897
|
-
* `WebEffectRegistry.uploadRgbaImage`: a
|
|
1898
|
-
* at its own size.
|
|
1877
|
+
* `WebEffectRegistry.uploadRgbaImage`: a premultiplied RGBA8 still kept at its own size.
|
|
1899
1878
|
*
|
|
1900
1879
|
* # Errors
|
|
1901
1880
|
* Rejects pixels that do not hold the size.
|
|
@@ -1917,8 +1896,8 @@ export class WebCpuRenderer {
|
|
|
1917
1896
|
return takeFromExternrefTable0(ret[0]);
|
|
1918
1897
|
}
|
|
1919
1898
|
/**
|
|
1920
|
-
* `WebEffectRegistry.uploadVideoFrame`: the frame read through a 2D
|
|
1921
|
-
*
|
|
1899
|
+
* `WebEffectRegistry.uploadVideoFrame`: the frame read through a 2D canvas and fitted to
|
|
1900
|
+
* the loaded project. Always closes `frame`.
|
|
1922
1901
|
*
|
|
1923
1902
|
* # Errors
|
|
1924
1903
|
* Rejects an HDR source's frame and a frame the browser cannot read.
|
|
@@ -1937,14 +1916,13 @@ export class WebCpuRenderer {
|
|
|
1937
1916
|
return takeFromExternrefTable0(ret[0]);
|
|
1938
1917
|
}
|
|
1939
1918
|
/**
|
|
1940
|
-
* `WebEffectRegistry.uploadYuvFrame`: a decoded frame's planes
|
|
1941
|
-
*
|
|
1942
|
-
* the project's color pipeline when a frame first draws them.
|
|
1919
|
+
* `WebEffectRegistry.uploadYuvFrame`: a decoded frame's planes as `VideoFrame.copyTo`
|
|
1920
|
+
* writes them, converted under the project's color pipeline when first drawn.
|
|
1943
1921
|
*
|
|
1944
1922
|
* # Errors
|
|
1945
|
-
* Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout
|
|
1946
|
-
*
|
|
1947
|
-
*
|
|
1923
|
+
* Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout or plane that does
|
|
1924
|
+
* not fit the data, a bad size or rotation, and an HDR frame the project's color pipeline
|
|
1925
|
+
* refuses.
|
|
1948
1926
|
* @param {string} source_id
|
|
1949
1927
|
* @param {bigint} media_time_ticks
|
|
1950
1928
|
* @param {string} format
|
|
@@ -2001,8 +1979,7 @@ export class WebCpuRenderer {
|
|
|
2001
1979
|
return ret >>> 0;
|
|
2002
1980
|
}
|
|
2003
1981
|
/**
|
|
2004
|
-
* `"canvas"`:
|
|
2005
|
-
* canvas.
|
|
1982
|
+
* `"canvas"`: `VideoFrame`s are read through a 2D canvas.
|
|
2006
1983
|
* @returns {string}
|
|
2007
1984
|
*/
|
|
2008
1985
|
get videoFrameCopy() {
|
|
@@ -2021,7 +1998,7 @@ export class WebCpuRenderer {
|
|
|
2021
1998
|
if (Symbol.dispose) WebCpuRenderer.prototype[Symbol.dispose] = WebCpuRenderer.prototype.free;
|
|
2022
1999
|
|
|
2023
2000
|
/**
|
|
2024
|
-
* WebGPU
|
|
2001
|
+
* The browser GPU renderer (WebGPU or WebGL2), with its runtime effect registry.
|
|
2025
2002
|
*/
|
|
2026
2003
|
export class WebEffectRegistry {
|
|
2027
2004
|
static __wrap(ptr) {
|
|
@@ -2041,12 +2018,28 @@ export class WebEffectRegistry {
|
|
|
2041
2018
|
wasm.__wbg_webeffectregistry_free(ptr, 0);
|
|
2042
2019
|
}
|
|
2043
2020
|
/**
|
|
2044
|
-
*
|
|
2045
|
-
*
|
|
2046
|
-
*
|
|
2021
|
+
* The adapter as the browser names it: wgpu's name (the unmasked WebGL renderer or a
|
|
2022
|
+
* WebGPU adapter's description), else `<vendor> <architecture>`; empty when unnamed.
|
|
2023
|
+
* @returns {string}
|
|
2024
|
+
*/
|
|
2025
|
+
get adapter() {
|
|
2026
|
+
let deferred1_0;
|
|
2027
|
+
let deferred1_1;
|
|
2028
|
+
try {
|
|
2029
|
+
const ret = wasm.webeffectregistry_adapter(this.__wbg_ptr);
|
|
2030
|
+
deferred1_0 = ret[0];
|
|
2031
|
+
deferred1_1 = ret[1];
|
|
2032
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2033
|
+
} finally {
|
|
2034
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
/**
|
|
2038
|
+
* Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
|
|
2039
|
+
* stack in file order, all checked before any is added.
|
|
2047
2040
|
*
|
|
2048
2041
|
* # Errors
|
|
2049
|
-
* Returns an error for malformed font bytes
|
|
2042
|
+
* Returns an error for malformed font bytes; no face is added.
|
|
2050
2043
|
* @param {string} family
|
|
2051
2044
|
* @param {Uint8Array} bytes
|
|
2052
2045
|
*/
|
|
@@ -2061,10 +2054,9 @@ export class WebEffectRegistry {
|
|
|
2061
2054
|
}
|
|
2062
2055
|
}
|
|
2063
2056
|
/**
|
|
2064
|
-
* Appends an OpenType font to the fallback stack
|
|
2065
|
-
*
|
|
2066
|
-
*
|
|
2067
|
-
* for pixel.
|
|
2057
|
+
* Appends an OpenType font to the fallback stack for captions, text generators and
|
|
2058
|
+
* layouts. With the same fonts as the export host, preview text matches exported text
|
|
2059
|
+
* pixel for pixel.
|
|
2068
2060
|
*
|
|
2069
2061
|
* # Errors
|
|
2070
2062
|
* Returns an error for malformed font bytes.
|
|
@@ -2083,12 +2075,12 @@ export class WebEffectRegistry {
|
|
|
2083
2075
|
}
|
|
2084
2076
|
}
|
|
2085
2077
|
/**
|
|
2086
|
-
* Aliases a new exact source-time request to an already uploaded
|
|
2087
|
-
*
|
|
2078
|
+
* Aliases a new exact source-time request to an already uploaded frame. Returns `false`
|
|
2079
|
+
* when no frame is stored at the existing time.
|
|
2088
2080
|
*
|
|
2089
2081
|
* # Errors
|
|
2090
|
-
* Refuses with `RESOURCE_LIMIT
|
|
2091
|
-
* the
|
|
2082
|
+
* Refuses with `RESOURCE_LIMIT` an alias that would push the export frame's sources over
|
|
2083
|
+
* the uploaded-frame budget.
|
|
2092
2084
|
* @param {string} source_id
|
|
2093
2085
|
* @param {bigint} existing_media_time_ticks
|
|
2094
2086
|
* @param {bigint} requested_media_time_ticks
|
|
@@ -2120,8 +2112,7 @@ export class WebEffectRegistry {
|
|
|
2120
2112
|
return ret >>> 0;
|
|
2121
2113
|
}
|
|
2122
2114
|
/**
|
|
2123
|
-
*
|
|
2124
|
-
* JSON array of source IDs.
|
|
2115
|
+
* Source IDs the most recent `renderAudio` call could not mix, as a JSON array.
|
|
2125
2116
|
* @returns {string}
|
|
2126
2117
|
*/
|
|
2127
2118
|
audioMissingSources() {
|
|
@@ -2143,12 +2134,9 @@ export class WebEffectRegistry {
|
|
|
2143
2134
|
}
|
|
2144
2135
|
}
|
|
2145
2136
|
/**
|
|
2146
|
-
* Source intervals a host must decode before mixing a sample range
|
|
2147
|
-
*
|
|
2148
|
-
*
|
|
2149
|
-
* They cover read-ahead and, after a seek, the finite state-settling
|
|
2150
|
-
* history each clip's effect stages replay, as well as the delay lines.
|
|
2151
|
-
* Tick values are strings so JavaScript preserves the full i64 range.
|
|
2137
|
+
* Source intervals a host must decode before mixing a sample range, including
|
|
2138
|
+
* interpolation neighbours, read-ahead, delay lines, and after a seek the settling history
|
|
2139
|
+
* effect stages replay. Tick values are strings to preserve the full i64 range.
|
|
2152
2140
|
* @param {bigint} start_sample
|
|
2153
2141
|
* @param {number} frames
|
|
2154
2142
|
* @returns {string}
|
|
@@ -2172,7 +2160,7 @@ export class WebEffectRegistry {
|
|
|
2172
2160
|
}
|
|
2173
2161
|
}
|
|
2174
2162
|
/**
|
|
2175
|
-
* Allocated audio sample bytes, including spare capacity
|
|
2163
|
+
* Allocated audio sample bytes, including spare capacity.
|
|
2176
2164
|
* @returns {number}
|
|
2177
2165
|
*/
|
|
2178
2166
|
audioRetainedBytes() {
|
|
@@ -2188,12 +2176,9 @@ export class WebEffectRegistry {
|
|
|
2188
2176
|
return ret >>> 0;
|
|
2189
2177
|
}
|
|
2190
2178
|
/**
|
|
2191
|
-
* Half-open project-rate sample intervals of one source's
|
|
2192
|
-
*
|
|
2193
|
-
*
|
|
2194
|
-
*
|
|
2195
|
-
* A host decodes only what these do not cover: the store may have
|
|
2196
|
-
* extended, replaced or dropped a window since the host uploaded it.
|
|
2179
|
+
* Half-open project-rate sample intervals of one source's windows, most recently uploaded
|
|
2180
|
+
* first, as JSON `[{startSample, endSample}]`. A host decodes only what these do not
|
|
2181
|
+
* cover, since the store may have extended, replaced or dropped windows.
|
|
2197
2182
|
* @param {string} source_id
|
|
2198
2183
|
* @returns {string}
|
|
2199
2184
|
*/
|
|
@@ -2226,28 +2211,45 @@ export class WebEffectRegistry {
|
|
|
2226
2211
|
return ret >>> 0;
|
|
2227
2212
|
}
|
|
2228
2213
|
/**
|
|
2229
|
-
*
|
|
2230
|
-
*
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2214
|
+
* The graphics API this renderer draws through: `"webgpu"` or `"webgl2"`.
|
|
2215
|
+
* @returns {string}
|
|
2216
|
+
*/
|
|
2217
|
+
get backend() {
|
|
2218
|
+
let deferred1_0;
|
|
2219
|
+
let deferred1_1;
|
|
2220
|
+
try {
|
|
2221
|
+
const ret = wasm.webeffectregistry_backend(this.__wbg_ptr);
|
|
2222
|
+
deferred1_0 = ret[0];
|
|
2223
|
+
deferred1_1 = ret[1];
|
|
2224
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2225
|
+
} finally {
|
|
2226
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
/**
|
|
2230
|
+
* Starts one exact timeline timestamp offscreen at export quality: the stateless
|
|
2231
|
+
* counterpart of [`Self::export_frame`] for a JavaScript-scheduled exporter.
|
|
2235
2232
|
*
|
|
2236
|
-
*
|
|
2237
|
-
*
|
|
2238
|
-
*
|
|
2233
|
+
* The readback promise is exposed separately so later frames can be submitted while
|
|
2234
|
+
* earlier mappings are in flight. Frames are packed for `codec` as [`Self::begin_export`]
|
|
2235
|
+
* does, in `pixels` (an `FFmpeg` pixel format: `yuva420p` keeps alpha and draws no
|
|
2236
|
+
* background, `yuv420p10le` is 10-bit; I420 when absent). Non-I420 layouts are packed into
|
|
2237
|
+
* tight planes with the `WebCodecs` `format` (`I420A`, `I420P10`).
|
|
2239
2238
|
*
|
|
2240
2239
|
* # Errors
|
|
2241
|
-
* Returns an error without a loaded project, for an unknown codec, or
|
|
2242
|
-
*
|
|
2240
|
+
* Returns an error without a loaded project, for an unknown codec or pixel format, or when
|
|
2241
|
+
* rendering or submission fails.
|
|
2243
2242
|
* @param {bigint} time_ticks
|
|
2244
2243
|
* @param {string} codec
|
|
2244
|
+
* @param {string | null} [pixels]
|
|
2245
2245
|
* @returns {any}
|
|
2246
2246
|
*/
|
|
2247
|
-
beginExportAt(time_ticks, codec) {
|
|
2247
|
+
beginExportAt(time_ticks, codec, pixels) {
|
|
2248
2248
|
const ptr0 = passStringToWasm0(codec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2249
2249
|
const len0 = WASM_VECTOR_LEN;
|
|
2250
|
-
|
|
2250
|
+
var ptr1 = isLikeNone(pixels) ? 0 : passStringToWasm0(pixels, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2251
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2252
|
+
const ret = wasm.webeffectregistry_beginExportAt(this.__wbg_ptr, time_ticks, ptr0, len0, ptr1, len1);
|
|
2251
2253
|
if (ret[2]) {
|
|
2252
2254
|
throw takeFromExternrefTable0(ret[1]);
|
|
2253
2255
|
}
|
|
@@ -2256,10 +2258,8 @@ export class WebEffectRegistry {
|
|
|
2256
2258
|
/**
|
|
2257
2259
|
* Starts the next export render and returns before its GPU readback maps.
|
|
2258
2260
|
*
|
|
2259
|
-
* A rendered result
|
|
2260
|
-
*
|
|
2261
|
-
* readbacks to remain in flight. Waiting results still do not advance the
|
|
2262
|
-
* deterministic export cursor.
|
|
2261
|
+
* A rendered result carries a `readback` promise; calling again while it is pending keeps
|
|
2262
|
+
* two or three readbacks in flight. Waiting results do not advance the cursor.
|
|
2263
2263
|
* @returns {any}
|
|
2264
2264
|
*/
|
|
2265
2265
|
beginExportFrame() {
|
|
@@ -2270,20 +2270,17 @@ export class WebEffectRegistry {
|
|
|
2270
2270
|
return takeFromExternrefTable0(ret[0]);
|
|
2271
2271
|
}
|
|
2272
2272
|
/**
|
|
2273
|
-
* Renders the next export frame and presents it on this renderer's
|
|
2274
|
-
*
|
|
2275
|
-
* page captures the canvas with `new VideoFrame(canvas)` and hands that to
|
|
2276
|
-
* its encoder, so no frame is mapped or copied into script.
|
|
2273
|
+
* Renders the next export frame and presents it on this renderer's canvas instead of
|
|
2274
|
+
* reading it back (experimental): the page captures it with `new VideoFrame(canvas)`.
|
|
2277
2275
|
*
|
|
2278
|
-
* The canvas must be sized to the export (`resizeSurface`) and
|
|
2279
|
-
*
|
|
2280
|
-
*
|
|
2281
|
-
* `
|
|
2282
|
-
* results `beginExportFrame` returns.
|
|
2276
|
+
* The canvas must be sized to the export (`resizeSurface`) and serve only this export.
|
|
2277
|
+
* Capture it in the same task, before the next call replaces the drawing buffer. Returns
|
|
2278
|
+
* `{kind: "rendered", index, timeTicks}`, or the `waiting` and `complete` results of
|
|
2279
|
+
* `beginExportFrame`.
|
|
2283
2280
|
*
|
|
2284
2281
|
* # Errors
|
|
2285
|
-
* Returns an error without a loaded project, a running export, or a
|
|
2286
|
-
*
|
|
2282
|
+
* Returns an error without a loaded project, a running export, or a canvas, or when
|
|
2283
|
+
* rendering or presentation fails.
|
|
2287
2284
|
* @returns {any}
|
|
2288
2285
|
*/
|
|
2289
2286
|
beginExportPresent() {
|
|
@@ -2296,25 +2293,18 @@ export class WebEffectRegistry {
|
|
|
2296
2293
|
/**
|
|
2297
2294
|
* Starts a deterministic export over a half-open timeline range.
|
|
2298
2295
|
*
|
|
2299
|
-
* Resets the audio renderer
|
|
2300
|
-
*
|
|
2301
|
-
*
|
|
2302
|
-
*
|
|
2303
|
-
* silence and advances nothing (`audioMissingSources` names the
|
|
2304
|
-
* sources), so rendering it again once they are uploaded continues
|
|
2305
|
-
* exactly as an uninterrupted export does.
|
|
2306
|
-
*
|
|
2307
|
-
* Export renders offscreen at [`QualityProfile::export`] and never touches
|
|
2308
|
-
* the presentation surface, so its output is independent of the canvas,
|
|
2309
|
-
* its size, and whatever the browser compositor is doing.
|
|
2296
|
+
* Resets the audio renderer so export audio inherits no preview DSP state, and keeps it
|
|
2297
|
+
* exact until `endExport`. Until then, an audio block missing a source mixes silence and
|
|
2298
|
+
* advances nothing (`audioMissingSources` names them), so re-rendering it after upload
|
|
2299
|
+
* continues exactly.
|
|
2310
2300
|
*
|
|
2311
|
-
*
|
|
2312
|
-
* `hevc`, `vp9`, `av1
|
|
2313
|
-
*
|
|
2301
|
+
* Renders offscreen at [`QualityProfile::export`], independent of the canvas. Frames are
|
|
2302
|
+
* packed with the chroma siting of `codec` (`h264`, `hevc`, `vp9`, `av1`;
|
|
2303
|
+
* [`alpha2_media::YuvEncoding::export`]).
|
|
2314
2304
|
*
|
|
2315
2305
|
* # Errors
|
|
2316
|
-
* Returns an error without a loaded project, for an empty range, an
|
|
2317
|
-
*
|
|
2306
|
+
* Returns an error without a loaded project, for an empty range, an invalid frame rate, or
|
|
2307
|
+
* an unknown codec.
|
|
2318
2308
|
* @param {bigint} start_ticks
|
|
2319
2309
|
* @param {bigint} end_ticks
|
|
2320
2310
|
* @param {number} rate_num
|
|
@@ -2346,15 +2336,14 @@ export class WebEffectRegistry {
|
|
|
2346
2336
|
}
|
|
2347
2337
|
}
|
|
2348
2338
|
/**
|
|
2349
|
-
*
|
|
2350
|
-
*
|
|
2351
|
-
*
|
|
2352
|
-
* `
|
|
2353
|
-
* (this one), `renderer.cpu` and `effects.runtime`, as the native host
|
|
2354
|
-
* names them.
|
|
2339
|
+
* The shared capability report JSON (`alpha2-capabilities`) with runtime `browser`.
|
|
2340
|
+
* `decode` and `encode` are `null` for the page to fill; `features` names only
|
|
2341
|
+
* `renderer.gpu`, `renderer.cpu`, `effects.runtime`, and on WebGL2
|
|
2342
|
+
* `uploads.webgl2-bitmap` (unavailable where frames upload as CPU pixels).
|
|
2355
2343
|
*
|
|
2356
2344
|
* # Errors
|
|
2357
|
-
* Returns an error if the report cannot be serialized
|
|
2345
|
+
* Returns an error if the report cannot be serialized, or on WebGL2 when the upload probe
|
|
2346
|
+
* throws.
|
|
2358
2347
|
* @returns {string}
|
|
2359
2348
|
*/
|
|
2360
2349
|
capabilityReport() {
|
|
@@ -2406,18 +2395,15 @@ export class WebEffectRegistry {
|
|
|
2406
2395
|
wasm.webeffectregistry_clearFrames(this.__wbg_ptr);
|
|
2407
2396
|
}
|
|
2408
2397
|
/**
|
|
2409
|
-
* Parses one JSON effect definition and compiles it on this binding's
|
|
2410
|
-
*
|
|
2411
|
-
*
|
|
2412
|
-
* with the shader's diagnostics.
|
|
2398
|
+
* Parses one JSON effect definition and compiles it on this binding's device. The promise
|
|
2399
|
+
* resolves to the compiled effect for [`Self::register_compiled_effect`], or rejects with
|
|
2400
|
+
* the shader's diagnostics.
|
|
2413
2401
|
*
|
|
2414
|
-
*
|
|
2415
|
-
*
|
|
2416
|
-
* renders, uploads, compiles other effects, and may be freed meanwhile.
|
|
2402
|
+
* Returns once the shader and pipeline are created; while the browser compiles, the
|
|
2403
|
+
* binding stays fully usable and may be freed.
|
|
2417
2404
|
*
|
|
2418
2405
|
* # Errors
|
|
2419
|
-
* Throws `EFFECT_ERROR` for a definition the engine refuses before
|
|
2420
|
-
* compiling it.
|
|
2406
|
+
* Throws `EFFECT_ERROR` for a definition the engine refuses before compiling.
|
|
2421
2407
|
* @param {string} json
|
|
2422
2408
|
* @returns {Promise<any>}
|
|
2423
2409
|
*/
|
|
@@ -2431,16 +2417,14 @@ export class WebEffectRegistry {
|
|
|
2431
2417
|
return takeFromExternrefTable0(ret[0]);
|
|
2432
2418
|
}
|
|
2433
2419
|
/**
|
|
2434
|
-
* Creates the renderer
|
|
2435
|
-
*
|
|
2436
|
-
*
|
|
2437
|
-
*
|
|
2438
|
-
* packs export frames in wasm, single-threaded, drawing what the native
|
|
2439
|
-
* CPU renderer draws byte for byte. Runtime WGSL effects are refused.
|
|
2420
|
+
* Creates the CPU renderer, for a browser with no WebGPU adapter or WebGL2 context, or on
|
|
2421
|
+
* request. It presents preview frames on `canvas`'s 2D context (`OffscreenCanvas`, page
|
|
2422
|
+
* canvas, or `undefined` for none) and packs export frames in wasm, single-threaded,
|
|
2423
|
+
* byte-identical to the native CPU renderer. Runtime WGSL effects are refused.
|
|
2440
2424
|
*
|
|
2441
2425
|
* # Errors
|
|
2442
|
-
* Rejects (`INVALID_INPUT`) a canvas
|
|
2443
|
-
*
|
|
2426
|
+
* Rejects (`INVALID_INPUT`) a canvas with no 2D context, such as one already holding a
|
|
2427
|
+
* WebGL or WebGPU context.
|
|
2444
2428
|
* @param {any} canvas
|
|
2445
2429
|
* @returns {WebCpuRenderer}
|
|
2446
2430
|
*/
|
|
@@ -2452,25 +2436,38 @@ export class WebEffectRegistry {
|
|
|
2452
2436
|
return WebCpuRenderer.__wrap(ret[0]);
|
|
2453
2437
|
}
|
|
2454
2438
|
/**
|
|
2455
|
-
* Creates a worker-owned renderer
|
|
2439
|
+
* Creates a worker-owned renderer for an `OffscreenCanvas`.
|
|
2440
|
+
*
|
|
2441
|
+
* Tries browser WebGPU first, then WebGL2. On WebGPU the device opens before the canvas is
|
|
2442
|
+
* bound, so a failure leaves the canvas free for another context kind (such as the CPU
|
|
2443
|
+
* renderer's 2D one). `options.softwareAdapter` is `"allow"` (default) or `"refuse"`;
|
|
2444
|
+
* refused, a software adapter (WebGPU fallback, `SwiftShader`, llvmpipe, WARP) is skipped
|
|
2445
|
+
* and the call rejects before binding the canvas if nothing else is offered.
|
|
2456
2446
|
*
|
|
2457
|
-
*
|
|
2458
|
-
*
|
|
2447
|
+
* # Errors
|
|
2448
|
+
* Rejects `GPU_INIT_FAILED` when no device opens or only a refused software adapter is
|
|
2449
|
+
* offered; `GPU_DEVICE_LOST` when the canvas's WebGL context is lost and not restored;
|
|
2450
|
+
* `INVALID_INPUT` for a canvas that takes no GPU surface or bad options.
|
|
2459
2451
|
* @param {OffscreenCanvas} canvas
|
|
2452
|
+
* @param {any | null} [options]
|
|
2460
2453
|
* @returns {Promise<WebEffectRegistry>}
|
|
2461
2454
|
*/
|
|
2462
|
-
static createForCanvas(canvas) {
|
|
2463
|
-
const ret = wasm.webeffectregistry_createForCanvas(canvas);
|
|
2455
|
+
static createForCanvas(canvas, options) {
|
|
2456
|
+
const ret = wasm.webeffectregistry_createForCanvas(canvas, isLikeNone(options) ? 0 : addToExternrefTable0(options));
|
|
2464
2457
|
return ret;
|
|
2465
2458
|
}
|
|
2466
2459
|
/**
|
|
2467
|
-
* Creates a renderer
|
|
2468
|
-
*
|
|
2460
|
+
* Creates a renderer presenting directly to a main-thread HTML canvas, as
|
|
2461
|
+
* [`Self::create_for_canvas`] does for an `OffscreenCanvas`, with the same `options`.
|
|
2462
|
+
*
|
|
2463
|
+
* # Errors
|
|
2464
|
+
* As [`Self::create_for_canvas`].
|
|
2469
2465
|
* @param {HTMLCanvasElement} canvas
|
|
2466
|
+
* @param {any | null} [options]
|
|
2470
2467
|
* @returns {Promise<WebEffectRegistry>}
|
|
2471
2468
|
*/
|
|
2472
|
-
static createForHtmlCanvas(canvas) {
|
|
2473
|
-
const ret = wasm.webeffectregistry_createForHtmlCanvas(canvas);
|
|
2469
|
+
static createForHtmlCanvas(canvas, options) {
|
|
2470
|
+
const ret = wasm.webeffectregistry_createForHtmlCanvas(canvas, isLikeNone(options) ? 0 : addToExternrefTable0(options));
|
|
2474
2471
|
return ret;
|
|
2475
2472
|
}
|
|
2476
2473
|
/**
|
|
@@ -2482,11 +2479,9 @@ export class WebEffectRegistry {
|
|
|
2482
2479
|
return ret;
|
|
2483
2480
|
}
|
|
2484
2481
|
/**
|
|
2485
|
-
*
|
|
2486
|
-
*
|
|
2487
|
-
*
|
|
2488
|
-
* after which it refuses every readback. A frame the GPU rejected for an
|
|
2489
|
-
* error is not that: it failed alone, and the binding renders on.
|
|
2482
|
+
* Whether the owning worker must recreate this binding: its device or context was lost,
|
|
2483
|
+
* or the GPU stopped running work, after which every readback is refused. A frame the GPU
|
|
2484
|
+
* rejected with an error is not a loss; the binding renders on.
|
|
2490
2485
|
* @returns {boolean}
|
|
2491
2486
|
*/
|
|
2492
2487
|
get deviceLost() {
|
|
@@ -2524,20 +2519,15 @@ export class WebEffectRegistry {
|
|
|
2524
2519
|
/**
|
|
2525
2520
|
* Renders the next export frame and resolves with its pixels.
|
|
2526
2521
|
*
|
|
2527
|
-
*
|
|
2528
|
-
* `
|
|
2529
|
-
*
|
|
2530
|
-
*
|
|
2531
|
-
*
|
|
2532
|
-
* width, height, format: "I420", colorSpace, layout, pixels }`, where
|
|
2533
|
-
* `pixels` holds the planes with padded rows at the offsets and strides
|
|
2534
|
-
* `layout` gives. Waiting never advances the cursor, so a retry after
|
|
2535
|
-
* uploading cannot skip a timestamp.
|
|
2522
|
+
* Resolves to `{ kind: "complete" }`; to `{ kind: "waiting", timeTicks, missingSources,
|
|
2523
|
+
* missingFrames }` when a source is missing (`missingFrames` as `renderAt` reports it); or
|
|
2524
|
+
* to `{ kind: "rendered", index, timeTicks, width, height, format: "I420", colorSpace,
|
|
2525
|
+
* layout, pixels }` with padded planes at `layout`'s offsets and strides. Waiting never
|
|
2526
|
+
* advances the cursor.
|
|
2536
2527
|
*
|
|
2537
2528
|
* # Errors
|
|
2538
|
-
* Returns an error without a running export or
|
|
2539
|
-
*
|
|
2540
|
-
* times out, the device is lost, or the mapping fails.
|
|
2529
|
+
* Returns an error without a running export or loaded project. The promise rejects with a
|
|
2530
|
+
* `failure` when the readback times out, the device is lost, or the mapping fails.
|
|
2541
2531
|
* @returns {Promise<any>}
|
|
2542
2532
|
*/
|
|
2543
2533
|
exportFrame() {
|
|
@@ -2548,19 +2538,16 @@ export class WebEffectRegistry {
|
|
|
2548
2538
|
return takeFromExternrefTable0(ret[0]);
|
|
2549
2539
|
}
|
|
2550
2540
|
/**
|
|
2551
|
-
* Completed and total frame counts for the running export
|
|
2552
|
-
*
|
|
2541
|
+
* Completed and total frame counts for the running export and the range it covers, as
|
|
2542
|
+
* JSON.
|
|
2553
2543
|
*
|
|
2554
|
-
* `effectiveRange` is the requested range widened to the frame grid
|
|
2555
|
-
*
|
|
2556
|
-
* `
|
|
2557
|
-
*
|
|
2558
|
-
* output's zero, and `frames` the sample count. Every host takes its
|
|
2559
|
-
* audio from these, never from the request.
|
|
2544
|
+
* `effectiveRange` is the requested range widened to the frame grid; its start is the
|
|
2545
|
+
* output's zero. `audioWindow` is the project-rate samples the export's audio covers:
|
|
2546
|
+
* `startSample` (a decimal string) at the output's zero, and `frames`. Hosts take audio
|
|
2547
|
+
* from these, never from the request.
|
|
2560
2548
|
*
|
|
2561
2549
|
* # Errors
|
|
2562
|
-
* Returns an error when no export is running
|
|
2563
|
-
* not fit in samples.
|
|
2550
|
+
* Returns an error when no export is running or the range does not fit in samples.
|
|
2564
2551
|
* @returns {string}
|
|
2565
2552
|
*/
|
|
2566
2553
|
exportProgress() {
|
|
@@ -2582,9 +2569,8 @@ export class WebEffectRegistry {
|
|
|
2582
2569
|
}
|
|
2583
2570
|
}
|
|
2584
2571
|
/**
|
|
2585
|
-
* Exact clip/source/timestamp requests from the same
|
|
2586
|
-
*
|
|
2587
|
-
* clip IDs. Tick values are strings so JavaScript can preserve i64.
|
|
2572
|
+
* Exact clip/source/timestamp requests from the same snapshot `renderAt` uses. Hosts keep
|
|
2573
|
+
* separate decoder cursors per clip ID. Tick values are strings to preserve i64.
|
|
2588
2574
|
* @param {bigint} time_ticks
|
|
2589
2575
|
* @returns {string}
|
|
2590
2576
|
*/
|
|
@@ -2607,9 +2593,8 @@ export class WebEffectRegistry {
|
|
|
2607
2593
|
}
|
|
2608
2594
|
}
|
|
2609
2595
|
/**
|
|
2610
|
-
* Whether the loaded project declares `source_id` an HDR (PQ or HLG)
|
|
2611
|
-
*
|
|
2612
|
-
* [`Self::upload_yuv_frame`].
|
|
2596
|
+
* Whether the loaded project declares `source_id` an HDR (PQ or HLG) source, whose frames
|
|
2597
|
+
* must go through [`Self::upload_yuv_frame`].
|
|
2613
2598
|
* @param {string} source_id
|
|
2614
2599
|
* @returns {boolean}
|
|
2615
2600
|
*/
|
|
@@ -2620,10 +2605,8 @@ export class WebEffectRegistry {
|
|
|
2620
2605
|
return ret !== 0;
|
|
2621
2606
|
}
|
|
2622
2607
|
/**
|
|
2623
|
-
* Whether the still `sourceId` is still the upload `generation` names.
|
|
2624
|
-
*
|
|
2625
|
-
* limit on how many it keeps), so a host that skips uploading a still it
|
|
2626
|
-
* uploaded before asks here first.
|
|
2608
|
+
* Whether the still `sourceId` is still the upload `generation` names. The store evicts
|
|
2609
|
+
* stills on its own, so a host checks before skipping a re-upload.
|
|
2627
2610
|
* @param {string} source_id
|
|
2628
2611
|
* @param {bigint} generation
|
|
2629
2612
|
* @returns {boolean}
|
|
@@ -2637,20 +2620,13 @@ export class WebEffectRegistry {
|
|
|
2637
2620
|
/**
|
|
2638
2621
|
* Loads and validates a versioned project document.
|
|
2639
2622
|
*
|
|
2640
|
-
*
|
|
2641
|
-
*
|
|
2642
|
-
*
|
|
2643
|
-
*
|
|
2644
|
-
*
|
|
2645
|
-
* all, and a source's new declared color (`color_metadata`) its own.
|
|
2646
|
-
* Raw uploads and audio remain reusable. Sources that are gone or
|
|
2647
|
-
* relocated lose theirs, and all audio goes when the project sample rate
|
|
2648
|
-
* changes. Media that changes under an unchanged locator needs a new
|
|
2649
|
-
* source ID.
|
|
2623
|
+
* Uploaded frames and audio are kept for every source whose ID and locator are unchanged,
|
|
2624
|
+
* so an edit needs no re-decode. Presentation frames are invalidated by a new canvas size
|
|
2625
|
+
* or color pipeline (`settings.color`), or per source by new declared color
|
|
2626
|
+
* (`color_metadata`). All audio is dropped when the project sample rate changes. Media
|
|
2627
|
+
* that changes under an unchanged locator needs a new source ID.
|
|
2650
2628
|
*
|
|
2651
|
-
* Loading ends a running export (`endExport`)
|
|
2652
|
-
* project it began with, so its next step is refused rather than
|
|
2653
|
-
* rendering this one.
|
|
2629
|
+
* Loading ends a running export (`endExport`), so its next step is refused.
|
|
2654
2630
|
* @param {string} json
|
|
2655
2631
|
*/
|
|
2656
2632
|
loadProject(json) {
|
|
@@ -2662,11 +2638,26 @@ export class WebEffectRegistry {
|
|
|
2662
2638
|
}
|
|
2663
2639
|
}
|
|
2664
2640
|
/**
|
|
2665
|
-
*
|
|
2666
|
-
*
|
|
2667
|
-
*
|
|
2668
|
-
*
|
|
2669
|
-
*
|
|
2641
|
+
* After a loss ([`Self::device_lost`]), what the renderer's submission times say about it,
|
|
2642
|
+
* as JSON `{ hung, gpuMs, watchdogMs, timeTicks, frameIndex, effects, predictedMs }`.
|
|
2643
|
+
* `hung` means the longest recent submission ran at least half the GPU watchdog, so the
|
|
2644
|
+
* loss was most likely this work's and rerunning it would stop the GPU again. `undefined`
|
|
2645
|
+
* before any loss.
|
|
2646
|
+
* @returns {string | undefined}
|
|
2647
|
+
*/
|
|
2648
|
+
get lossReport() {
|
|
2649
|
+
const ret = wasm.webeffectregistry_lossReport(this.__wbg_ptr);
|
|
2650
|
+
let v1;
|
|
2651
|
+
if (ret[0] !== 0) {
|
|
2652
|
+
v1 = getStringFromWasm0(ret[0], ret[1]);
|
|
2653
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
2654
|
+
}
|
|
2655
|
+
return v1;
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* The loudness measured since metering started as JSON (`LoudnessReport` in
|
|
2659
|
+
* `alpha2/loudness`), or `null` while off. `limiterThreshold` (or `null`) is the master
|
|
2660
|
+
* limiter it measured in front of, which `planLoudnessNormalization` keeps the mix under.
|
|
2670
2661
|
* @returns {string}
|
|
2671
2662
|
*/
|
|
2672
2663
|
loudnessReport() {
|
|
@@ -2695,8 +2686,8 @@ export class WebEffectRegistry {
|
|
|
2695
2686
|
}
|
|
2696
2687
|
}
|
|
2697
2688
|
/**
|
|
2698
|
-
* The loaded project's render size at the preview scale, `[width,
|
|
2699
|
-
*
|
|
2689
|
+
* The loaded project's render size at the preview scale, `[width, height]`: what
|
|
2690
|
+
* `renderAt` renders and the surface should be.
|
|
2700
2691
|
*
|
|
2701
2692
|
* # Errors
|
|
2702
2693
|
* Fails when no project is loaded.
|
|
@@ -2712,12 +2703,12 @@ export class WebEffectRegistry {
|
|
|
2712
2703
|
return v1;
|
|
2713
2704
|
}
|
|
2714
2705
|
/**
|
|
2715
|
-
* Adds an effect [`Self::compile_effect`] compiled on this binding and
|
|
2716
|
-
*
|
|
2706
|
+
* Adds an effect [`Self::compile_effect`] compiled on this binding and returns its
|
|
2707
|
+
* `id@version`. The compiled effect is consumed either way.
|
|
2717
2708
|
*
|
|
2718
2709
|
* # Errors
|
|
2719
|
-
* Throws `EFFECT_ERROR` for an effect compiled by another binding, one
|
|
2720
|
-
*
|
|
2710
|
+
* Throws `EFFECT_ERROR` for an effect compiled by another binding, one registered while it
|
|
2711
|
+
* compiled, or a full registry.
|
|
2721
2712
|
* @param {CompiledEffect} compiled
|
|
2722
2713
|
* @returns {string}
|
|
2723
2714
|
*/
|
|
@@ -2768,8 +2759,8 @@ export class WebEffectRegistry {
|
|
|
2768
2759
|
return ret !== 0;
|
|
2769
2760
|
}
|
|
2770
2761
|
/**
|
|
2771
|
-
* Releases exactly one uploaded generation
|
|
2772
|
-
*
|
|
2762
|
+
* Releases exactly one uploaded generation, leaving any newer texture under the same
|
|
2763
|
+
* source and timestamp.
|
|
2773
2764
|
* @param {bigint} generation
|
|
2774
2765
|
* @returns {boolean}
|
|
2775
2766
|
*/
|
|
@@ -2790,12 +2781,10 @@ export class WebEffectRegistry {
|
|
|
2790
2781
|
return ret !== 0;
|
|
2791
2782
|
}
|
|
2792
2783
|
/**
|
|
2793
|
-
*
|
|
2794
|
-
*
|
|
2795
|
-
*
|
|
2796
|
-
*
|
|
2797
|
-
* is released; later work allocates again what it needs. An export
|
|
2798
|
-
* calls it when its byte budget stops it submitting.
|
|
2784
|
+
* Destroys GPU memory kept only for reuse (idle pooled textures and buffers, kept graph
|
|
2785
|
+
* results) so the browser frees it now rather than at garbage collection, and returns the
|
|
2786
|
+
* bytes destroyed. Nothing a render or readback holds is released. An export calls it
|
|
2787
|
+
* when its byte budget stops it submitting.
|
|
2799
2788
|
* @returns {number}
|
|
2800
2789
|
*/
|
|
2801
2790
|
releaseIdleMemory() {
|
|
@@ -2803,9 +2792,8 @@ export class WebEffectRegistry {
|
|
|
2803
2792
|
return ret;
|
|
2804
2793
|
}
|
|
2805
2794
|
/**
|
|
2806
|
-
* Releases every uploaded frame and the still of one source
|
|
2807
|
-
*
|
|
2808
|
-
* already retired stay until they are released.
|
|
2795
|
+
* Releases every uploaded frame and the still of one source whose media changed under the
|
|
2796
|
+
* same ID and locator. Retired generations stay until released.
|
|
2809
2797
|
* @param {string} source_id
|
|
2810
2798
|
* @returns {boolean}
|
|
2811
2799
|
*/
|
|
@@ -2818,12 +2806,10 @@ export class WebEffectRegistry {
|
|
|
2818
2806
|
/**
|
|
2819
2807
|
* Evaluates and presents one project frame on the worker-owned canvas.
|
|
2820
2808
|
*
|
|
2821
|
-
* Returns JSON `{ requestedTimeTicks, presentedTimeTicks, missingSources,
|
|
2822
|
-
*
|
|
2823
|
-
*
|
|
2824
|
-
*
|
|
2825
|
-
* frame equals the one presented last (see `Player::render_at`): nothing
|
|
2826
|
-
* was rendered or presented, and the canvas still shows it.
|
|
2809
|
+
* Returns JSON `{ requestedTimeTicks, presentedTimeTicks, missingSources, missingFrames,
|
|
2810
|
+
* repeated, unchanged }`. `presentedTimeTicks` is `null` until a frame is presented;
|
|
2811
|
+
* `missingFrames` gives the exact source time each missing source was needed at;
|
|
2812
|
+
* `unchanged` means the frame equals the last one, so nothing was rendered or presented.
|
|
2827
2813
|
* @param {bigint} time_ticks
|
|
2828
2814
|
* @returns {string}
|
|
2829
2815
|
*/
|
|
@@ -2846,16 +2832,12 @@ export class WebEffectRegistry {
|
|
|
2846
2832
|
}
|
|
2847
2833
|
}
|
|
2848
2834
|
/**
|
|
2849
|
-
* Mixes one project audio block of at most `audioMaxBlock` samples per
|
|
2850
|
-
*
|
|
2851
|
-
*
|
|
2852
|
-
*
|
|
2853
|
-
* Channels are returned end to end. Call `audioStatus` for the sources
|
|
2854
|
-
* that were missing from the mix.
|
|
2835
|
+
* Mixes one project audio block of at most `audioMaxBlock` samples per channel and returns
|
|
2836
|
+
* its planar samples, channels end to end. Missing sources are reported by
|
|
2837
|
+
* `audioMissingSources`.
|
|
2855
2838
|
*
|
|
2856
2839
|
* # Errors
|
|
2857
|
-
* Rejects (`INVALID_INPUT`, not fatal) more than `audioMaxBlock` frames
|
|
2858
|
-
* naming the limit.
|
|
2840
|
+
* Rejects (`INVALID_INPUT`, not fatal) more than `audioMaxBlock` frames.
|
|
2859
2841
|
* @param {bigint} start_sample
|
|
2860
2842
|
* @param {number} frames
|
|
2861
2843
|
* @param {boolean} playing
|
|
@@ -2918,18 +2900,14 @@ export class WebEffectRegistry {
|
|
|
2918
2900
|
return ret >>> 0;
|
|
2919
2901
|
}
|
|
2920
2902
|
/**
|
|
2921
|
-
* Chooses what `renderAudio` does, outside an export, with a block that
|
|
2922
|
-
*
|
|
2923
|
-
*
|
|
2924
|
-
*
|
|
2925
|
-
*
|
|
2926
|
-
*
|
|
2927
|
-
*
|
|
2928
|
-
*
|
|
2929
|
-
* not what a fresh renderer mixes, so loudness measurements and other
|
|
2930
|
-
* output that must repeat stay exact. From `beginExport` to `endExport`
|
|
2931
|
-
* the renderer is exact whatever is chosen. Choosing another policy than
|
|
2932
|
-
* the current one resets the audio, as `resetAudio` does.
|
|
2903
|
+
* Chooses what `renderAudio` does, outside an export, with a block that does not start
|
|
2904
|
+
* where the previous one ended.
|
|
2905
|
+
*
|
|
2906
|
+
* `"exact"` (default) resets and replays the settling history, mixing what a fresh
|
|
2907
|
+
* renderer would. `"continue-small-gaps"` is for live preview: a jump of at most
|
|
2908
|
+
* `audioMaxBlock` samples continues from the previous state instead of replaying up to
|
|
2909
|
+
* 30 s, so its output is not reproducible. Exports are always exact. Changing the policy
|
|
2910
|
+
* resets the audio, as `resetAudio` does.
|
|
2933
2911
|
*
|
|
2934
2912
|
* # Errors
|
|
2935
2913
|
* Rejects any other policy name (`INVALID_INPUT`, not fatal).
|
|
@@ -2944,10 +2922,9 @@ export class WebEffectRegistry {
|
|
|
2944
2922
|
}
|
|
2945
2923
|
}
|
|
2946
2924
|
/**
|
|
2947
|
-
* Starts (from empty) or stops measuring
|
|
2948
|
-
*
|
|
2949
|
-
*
|
|
2950
|
-
* authored; a block a source was missing from is not measured.
|
|
2925
|
+
* Starts (from empty) or stops measuring loudness of the mix before the master limiter,
|
|
2926
|
+
* over subsequent `renderAudio` blocks. Starting removes the normalization gain so the mix
|
|
2927
|
+
* is measured as authored; blocks with a missing source are not measured.
|
|
2951
2928
|
*
|
|
2952
2929
|
* # Errors
|
|
2953
2930
|
* Returns an error without an audio renderer.
|
|
@@ -2960,15 +2937,13 @@ export class WebEffectRegistry {
|
|
|
2960
2937
|
}
|
|
2961
2938
|
}
|
|
2962
2939
|
/**
|
|
2963
|
-
* Applies a static gain
|
|
2964
|
-
*
|
|
2965
|
-
*
|
|
2966
|
-
* returns before rendering its audio; the gain stays until it is set
|
|
2967
|
-
* again, so set zero for audio after it that is not normalized.
|
|
2940
|
+
* Applies a static gain in dB after the master gain and before the limiter; zero or
|
|
2941
|
+
* `setLoudnessMetering(true)` removes it. A normalized export sets the gain
|
|
2942
|
+
* `planLoudnessNormalization` returns; it persists until set again.
|
|
2968
2943
|
*
|
|
2969
2944
|
* # Errors
|
|
2970
|
-
* Returns an error without an audio renderer, or for a gain that is not
|
|
2971
|
-
*
|
|
2945
|
+
* Returns an error without an audio renderer, or for a gain that is not finite or whose
|
|
2946
|
+
* factor overflows a 32-bit float (`INVALID_INPUT`).
|
|
2972
2947
|
* @param {number} gain_db
|
|
2973
2948
|
*/
|
|
2974
2949
|
setNormalizationGainDb(gain_db) {
|
|
@@ -2978,21 +2953,17 @@ export class WebEffectRegistry {
|
|
|
2978
2953
|
}
|
|
2979
2954
|
}
|
|
2980
2955
|
/**
|
|
2981
|
-
* Enables or disables per-pass GPU/CPU timing
|
|
2982
|
-
*
|
|
2983
|
-
* Disabled by default: timing reads a clock per pass and allocates GPU
|
|
2984
|
-
* timestamp resources, which is profiling cost rather than rendering work.
|
|
2985
|
-
* Every other field of `diagnostics()` is always available.
|
|
2956
|
+
* Enables or disables per-pass GPU/CPU timing in `diagnostics()`. Off by default because
|
|
2957
|
+
* it reads a clock per pass and allocates GPU timestamp resources.
|
|
2986
2958
|
* @param {boolean} enabled
|
|
2987
2959
|
*/
|
|
2988
2960
|
setPassTiming(enabled) {
|
|
2989
2961
|
wasm.webeffectregistry_setPassTiming(this.__wbg_ptr, enabled);
|
|
2990
2962
|
}
|
|
2991
2963
|
/**
|
|
2992
|
-
* Renders preview frames at `scale` times the project
|
|
2993
|
-
*
|
|
2994
|
-
*
|
|
2995
|
-
* next `renderAt` presents. Size the surface to `previewSize` after it.
|
|
2964
|
+
* Renders preview frames at `scale` times the project size from now on (default 0.5).
|
|
2965
|
+
* Drops the held frame so the next `renderAt` presents; resize the surface to
|
|
2966
|
+
* `previewSize` afterwards.
|
|
2996
2967
|
*
|
|
2997
2968
|
* # Errors
|
|
2998
2969
|
* Rejects a scale that is not finite, above 0 and at most 8.
|
|
@@ -3005,11 +2976,9 @@ export class WebEffectRegistry {
|
|
|
3005
2976
|
}
|
|
3006
2977
|
}
|
|
3007
2978
|
/**
|
|
3008
|
-
* Lets rendered results (each clip's finished picture and the frame)
|
|
3009
|
-
*
|
|
3010
|
-
*
|
|
3011
|
-
* sources whose upload is reused are found again: a still, or a frame the
|
|
3012
|
-
* page uploads once and draws at several times.
|
|
2979
|
+
* Lets rendered results (each clip's finished picture and the frame) use up to `bytes` of
|
|
2980
|
+
* GPU memory for reuse when a frame repeats; zero (the default) disables it. Only results
|
|
2981
|
+
* from reused uploads hit: a still, or a frame uploaded once and drawn at several times.
|
|
3013
2982
|
*
|
|
3014
2983
|
* # Errors
|
|
3015
2984
|
* Rejects a negative or non-finite budget.
|
|
@@ -3022,16 +2991,14 @@ export class WebEffectRegistry {
|
|
|
3022
2991
|
}
|
|
3023
2992
|
}
|
|
3024
2993
|
/**
|
|
3025
|
-
* Sets the cache budget for live, image, and retired generations (default
|
|
3026
|
-
*
|
|
3027
|
-
*
|
|
3028
|
-
*
|
|
3029
|
-
*
|
|
3030
|
-
* or alias that would
|
|
3031
|
-
* `RESOURCE_LIMIT` (`failure.stage` `working-set-over-budget`,
|
|
3032
|
-
* `failure.requestedBytes` the
|
|
3033
|
-
* refill could make the frame fit. Renderer pools and submitted GPU work
|
|
3034
|
-
* have separate lifetime/budget accounting.
|
|
2994
|
+
* Sets the cache budget for live, image, and retired generations (default 1 GiB); aliases
|
|
2995
|
+
* count once and the oldest generations go first. A new frame larger than the budget is
|
|
2996
|
+
* kept alone.
|
|
2997
|
+
*
|
|
2998
|
+
* While an export frame waits for its sources, those it shows are pinned. The budget
|
|
2999
|
+
* evicts everything else first, and an upload or alias that would push them over is
|
|
3000
|
+
* refused with `RESOURCE_LIMIT` (`failure.stage` `working-set-over-budget`,
|
|
3001
|
+
* `failure.requestedBytes` the minimum the frame needs).
|
|
3035
3002
|
* @param {number} bytes
|
|
3036
3003
|
*/
|
|
3037
3004
|
setUploadedFrameBudget(bytes) {
|
|
@@ -3041,8 +3008,7 @@ export class WebEffectRegistry {
|
|
|
3041
3008
|
}
|
|
3042
3009
|
}
|
|
3043
3010
|
/**
|
|
3044
|
-
* The color metadata the loaded project declares for `source_id`, as
|
|
3045
|
-
* JSON, or `undefined` when it declares none.
|
|
3011
|
+
* The color metadata the loaded project declares for `source_id`, as JSON, or `undefined`.
|
|
3046
3012
|
* @param {string} source_id
|
|
3047
3013
|
* @returns {string | undefined}
|
|
3048
3014
|
*/
|
|
@@ -3058,10 +3024,8 @@ export class WebEffectRegistry {
|
|
|
3058
3024
|
return v2;
|
|
3059
3025
|
}
|
|
3060
3026
|
/**
|
|
3061
|
-
*
|
|
3062
|
-
*
|
|
3063
|
-
* releases the wasm object borrow immediately, allowing edits while waiting.
|
|
3064
|
-
* WebGL submits synchronously through wgpu-core and uses its own retention.
|
|
3027
|
+
* Resolves when submitted WebGPU preview work completes, so the host can pace frames. The
|
|
3028
|
+
* returned promise releases the wasm borrow at once, allowing edits while waiting.
|
|
3065
3029
|
* @returns {Promise<any>}
|
|
3066
3030
|
*/
|
|
3067
3031
|
submittedWorkDone() {
|
|
@@ -3069,9 +3033,8 @@ export class WebEffectRegistry {
|
|
|
3069
3033
|
return ret;
|
|
3070
3034
|
}
|
|
3071
3035
|
/**
|
|
3072
|
-
* Whether decoded `VideoFrame`
|
|
3073
|
-
*
|
|
3074
|
-
* `uploadPresentedVideoFrame`.
|
|
3036
|
+
* Whether decoded `VideoFrame`s can be imported without CPU copies. Both backends can,
|
|
3037
|
+
* directly or through a canvas bitmap (see `uploadPresentedVideoFrame`).
|
|
3075
3038
|
* @returns {boolean}
|
|
3076
3039
|
*/
|
|
3077
3040
|
get supportsExternalVideoFrame() {
|
|
@@ -3079,11 +3042,27 @@ export class WebEffectRegistry {
|
|
|
3079
3042
|
return ret !== 0;
|
|
3080
3043
|
}
|
|
3081
3044
|
/**
|
|
3082
|
-
*
|
|
3083
|
-
*
|
|
3084
|
-
*
|
|
3085
|
-
*
|
|
3086
|
-
|
|
3045
|
+
* How frames rendered since the last call were split into GPU submissions to stay under
|
|
3046
|
+
* the watchdog budget, as JSON `{ frames, splitFrames, maxPerFrame, maxPredictedMs }` (the
|
|
3047
|
+
* native host's `performance.gpuSubmissions`). Resets the counts.
|
|
3048
|
+
* @returns {string}
|
|
3049
|
+
*/
|
|
3050
|
+
takeGpuSubmissionStats() {
|
|
3051
|
+
let deferred1_0;
|
|
3052
|
+
let deferred1_1;
|
|
3053
|
+
try {
|
|
3054
|
+
const ret = wasm.webeffectregistry_takeGpuSubmissionStats(this.__wbg_ptr);
|
|
3055
|
+
deferred1_0 = ret[0];
|
|
3056
|
+
deferred1_1 = ret[1];
|
|
3057
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
3058
|
+
} finally {
|
|
3059
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
/**
|
|
3063
|
+
* Discards `source_id`'s audio that ends before `ticks`, a time on that source's own
|
|
3064
|
+
* timeline. A source two clips read at different times is trimmed only below what both
|
|
3065
|
+
* need. Call it as playback moves on, a few seconds behind the earliest time still mixed.
|
|
3087
3066
|
* @param {string} source_id
|
|
3088
3067
|
* @param {bigint} ticks
|
|
3089
3068
|
*/
|
|
@@ -3093,10 +3072,9 @@ export class WebEffectRegistry {
|
|
|
3093
3072
|
wasm.webeffectregistry_trimAudioBefore(this.__wbg_ptr, ptr0, len0, ticks);
|
|
3094
3073
|
}
|
|
3095
3074
|
/**
|
|
3096
|
-
* Releases `source_id`'s
|
|
3097
|
-
*
|
|
3098
|
-
*
|
|
3099
|
-
* is trimmed only below what both still need.
|
|
3075
|
+
* Releases `source_id`'s video frames older than `media_time_ticks`, a time on that
|
|
3076
|
+
* source's own timeline. A source two clips read at different times is trimmed only below
|
|
3077
|
+
* what both need.
|
|
3100
3078
|
* @param {string} source_id
|
|
3101
3079
|
* @param {bigint} media_time_ticks
|
|
3102
3080
|
*/
|
|
@@ -3131,23 +3109,15 @@ export class WebEffectRegistry {
|
|
|
3131
3109
|
/**
|
|
3132
3110
|
* Uploads project-rate planar audio for one source.
|
|
3133
3111
|
*
|
|
3134
|
-
* `start_sample` is the
|
|
3135
|
-
*
|
|
3136
|
-
*
|
|
3137
|
-
*
|
|
3138
|
-
*
|
|
3139
|
-
* `samples` holds each plane end to end; the engine folds them into the
|
|
3140
|
-
* project's channels by speaker. An upload replaces the windows it
|
|
3141
|
-
* overlaps, which is what a seek needs, and joins the ones of the same
|
|
3142
|
-
* speakers it meets at either end into one; any other is a window of
|
|
3143
|
-
* its own.
|
|
3112
|
+
* `start_sample` is the first sample's index in the source at the project rate. `layout`
|
|
3113
|
+
* names each plane's speaker: an array of `FFmpeg` channel names in plane order
|
|
3114
|
+
* (`["FC", "FL", "FR"]`, `"UNK"` for none), or a channel count for `FFmpeg`'s default
|
|
3115
|
+
* layout (3 is 2.1, 4 is 4.0); 1 to 24 planes. `samples` holds the planes end to end. An
|
|
3116
|
+
* upload replaces windows it overlaps and joins same-speaker windows it meets.
|
|
3144
3117
|
*
|
|
3145
|
-
* The mixer reads a window only where it holds every sample a block
|
|
3146
|
-
*
|
|
3147
|
-
* the
|
|
3148
|
-
* runs to the source's end, so past it the source is silent: pass it
|
|
3149
|
-
* with a whole decoded source, whose clips may end exactly at its end
|
|
3150
|
-
* and read an interpolation sample or two beyond.
|
|
3118
|
+
* The mixer reads a window only where it holds every sample a block needs, so a host
|
|
3119
|
+
* decoding past a source's end uploads zeros there. Alternatively pass `ends_source` with
|
|
3120
|
+
* an upload that runs to the source's end, so the source is silent after it.
|
|
3151
3121
|
* @param {string} source_id
|
|
3152
3122
|
* @param {bigint} start_sample
|
|
3153
3123
|
* @param {number} sample_rate
|
|
@@ -3164,10 +3134,36 @@ export class WebEffectRegistry {
|
|
|
3164
3134
|
}
|
|
3165
3135
|
}
|
|
3166
3136
|
/**
|
|
3167
|
-
* [`Self::upload_presented_video_frame`] for a
|
|
3168
|
-
*
|
|
3169
|
-
*
|
|
3170
|
-
*
|
|
3137
|
+
* [`Self::upload_presented_video_frame`] for a frame the engine should convert from planes
|
|
3138
|
+
* (HDR, or declared color) but the browser decodes only without planes. The browser's
|
|
3139
|
+
* conversion (and tone mapping) imports it, drawn as SDR BT.709.
|
|
3140
|
+
*
|
|
3141
|
+
* The source is then degraded: `renderAt` lists it in `degradedSources`, and any export
|
|
3142
|
+
* frame showing it is refused with `PLANAR_DECODE_UNAVAILABLE`, so browser and native
|
|
3143
|
+
* exports never differ by the browser's conversion. A planar or presented upload of the
|
|
3144
|
+
* source clears this. Always closes `frame`.
|
|
3145
|
+
* @param {string} source_id
|
|
3146
|
+
* @param {bigint} media_time_ticks
|
|
3147
|
+
* @param {VideoFrame} frame
|
|
3148
|
+
* @param {number} output_width
|
|
3149
|
+
* @param {number} output_height
|
|
3150
|
+
* @param {number} rotation_degrees
|
|
3151
|
+
* @param {boolean} mirror
|
|
3152
|
+
* @returns {any}
|
|
3153
|
+
*/
|
|
3154
|
+
uploadDegradedVideoFrame(source_id, media_time_ticks, frame, output_width, output_height, rotation_degrees, mirror) {
|
|
3155
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3156
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3157
|
+
const ret = wasm.webeffectregistry_uploadDegradedVideoFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, frame, output_width, output_height, rotation_degrees, mirror);
|
|
3158
|
+
if (ret[2]) {
|
|
3159
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3160
|
+
}
|
|
3161
|
+
return takeFromExternrefTable0(ret[0]);
|
|
3162
|
+
}
|
|
3163
|
+
/**
|
|
3164
|
+
* [`Self::upload_presented_video_frame`] for a bitmap from
|
|
3165
|
+
* `createImageBitmap(frame, { premultiplyAlpha: "none" })`, skipping the canvas draw where
|
|
3166
|
+
* `videoFrameCopy` is `"bitmap"`. Always closes `bitmap`; HDR sources are refused.
|
|
3171
3167
|
* @param {string} source_id
|
|
3172
3168
|
* @param {bigint} media_time_ticks
|
|
3173
3169
|
* @param {ImageBitmap} bitmap
|
|
@@ -3187,10 +3183,9 @@ export class WebEffectRegistry {
|
|
|
3187
3183
|
return takeFromExternrefTable0(ret[0]);
|
|
3188
3184
|
}
|
|
3189
3185
|
/**
|
|
3190
|
-
* Like [`Self::upload_presented_rgba_frame`], for premultiplied
|
|
3191
|
-
*
|
|
3192
|
-
*
|
|
3193
|
-
* as far as the intermediate format holds them.
|
|
3186
|
+
* Like [`Self::upload_presented_rgba_frame`], for premultiplied linear-light RGBA half
|
|
3187
|
+
* floats (as bits) in BT.709 primaries, as `OpenEXR` sources arrive. Values outside
|
|
3188
|
+
* `0.0..=1.0` are kept as far as the intermediate format allows.
|
|
3194
3189
|
* @param {string} source_id
|
|
3195
3190
|
* @param {bigint} media_time_ticks
|
|
3196
3191
|
* @param {number} width
|
|
@@ -3212,8 +3207,7 @@ export class WebEffectRegistry {
|
|
|
3212
3207
|
return takeFromExternrefTable0(ret[0]);
|
|
3213
3208
|
}
|
|
3214
3209
|
/**
|
|
3215
|
-
* Like [`Self::upload_presented_linear_frame`], for a still shown at
|
|
3216
|
-
* every time.
|
|
3210
|
+
* Like [`Self::upload_presented_linear_frame`], for a still shown at every time.
|
|
3217
3211
|
* @param {string} source_id
|
|
3218
3212
|
* @param {number} width
|
|
3219
3213
|
* @param {number} height
|
|
@@ -3234,11 +3228,10 @@ export class WebEffectRegistry {
|
|
|
3234
3228
|
return takeFromExternrefTable0(ret[0]);
|
|
3235
3229
|
}
|
|
3236
3230
|
/**
|
|
3237
|
-
* Uploads
|
|
3238
|
-
*
|
|
3239
|
-
*
|
|
3240
|
-
*
|
|
3241
|
-
* providers' frames arrive this way.
|
|
3231
|
+
* Uploads RGBA8 pixels at their own size and presents them into the output as the engine
|
|
3232
|
+
* presents every source (contained, on the GPU), so a page never scales a source itself.
|
|
3233
|
+
* `premultiplied` says whether color is already multiplied by alpha. Extension providers'
|
|
3234
|
+
* frames arrive this way.
|
|
3242
3235
|
* @param {string} source_id
|
|
3243
3236
|
* @param {bigint} media_time_ticks
|
|
3244
3237
|
* @param {number} width
|
|
@@ -3261,8 +3254,7 @@ export class WebEffectRegistry {
|
|
|
3261
3254
|
return takeFromExternrefTable0(ret[0]);
|
|
3262
3255
|
}
|
|
3263
3256
|
/**
|
|
3264
|
-
* Like [`Self::upload_presented_rgba_frame`], for a still shown at every
|
|
3265
|
-
* time.
|
|
3257
|
+
* Like [`Self::upload_presented_rgba_frame`], for a still shown at every time.
|
|
3266
3258
|
* @param {string} source_id
|
|
3267
3259
|
* @param {number} width
|
|
3268
3260
|
* @param {number} height
|
|
@@ -3284,22 +3276,17 @@ export class WebEffectRegistry {
|
|
|
3284
3276
|
return takeFromExternrefTable0(ret[0]);
|
|
3285
3277
|
}
|
|
3286
3278
|
/**
|
|
3287
|
-
* Imports a decoded `VideoFrame` without
|
|
3288
|
-
*
|
|
3289
|
-
*
|
|
3290
|
-
* mirrored left to right when `mirror` is set, then turned clockwise by
|
|
3291
|
-
* `rotation_degrees`: how its stream says it is shown upright.
|
|
3279
|
+
* Imports a decoded `VideoFrame` without a CPU readback, then applies contain placement,
|
|
3280
|
+
* rotation, filtering, and alpha premultiplication in a GPU pass. The frame is mirrored
|
|
3281
|
+
* left to right when `mirror` is set, then turned clockwise by `rotation_degrees`.
|
|
3292
3282
|
*
|
|
3293
|
-
* Browser WebGPU copies the frame
|
|
3294
|
-
* browser does not take a `VideoFrame` (Firefox)
|
|
3295
|
-
* reused 2D canvas's bitmap. WebGL2 always uploads that bitmap.
|
|
3283
|
+
* Browser WebGPU copies the frame directly, or through a reused 2D canvas bitmap where the
|
|
3284
|
+
* browser does not take a `VideoFrame` (Firefox). WebGL2 always uploads the bitmap.
|
|
3296
3285
|
* `videoFrameCopy` says which.
|
|
3297
3286
|
*
|
|
3298
|
-
* Both
|
|
3299
|
-
*
|
|
3300
|
-
*
|
|
3301
|
-
* whatever the project's HDR policy: its planes go to
|
|
3302
|
-
* [`Self::upload_yuv_frame`], which converts them as the project says.
|
|
3287
|
+
* Both paths use the page's own color conversion, so an HDR frame (PQ or HLG, by the
|
|
3288
|
+
* project's declared color for the source, else the frame's `colorSpace`) is refused with
|
|
3289
|
+
* `INVALID_INPUT`; send its planes to [`Self::upload_yuv_frame`] instead.
|
|
3303
3290
|
* @param {string} source_id
|
|
3304
3291
|
* @param {bigint} media_time_ticks
|
|
3305
3292
|
* @param {VideoFrame} frame
|
|
@@ -3319,10 +3306,8 @@ export class WebEffectRegistry {
|
|
|
3319
3306
|
return takeFromExternrefTable0(ret[0]);
|
|
3320
3307
|
}
|
|
3321
3308
|
/**
|
|
3322
|
-
* Uploads tightly packed premultiplied RGBA8 pixels.
|
|
3323
|
-
*
|
|
3324
|
-
* This compatibility path is used by WebGL2, whose wgpu backend cannot
|
|
3325
|
-
* import a browser `VideoFrame` directly.
|
|
3309
|
+
* Uploads tightly packed premultiplied RGBA8 pixels. Used by WebGL2, whose wgpu backend
|
|
3310
|
+
* cannot import a `VideoFrame` directly.
|
|
3326
3311
|
* @param {string} source_id
|
|
3327
3312
|
* @param {bigint} media_time_ticks
|
|
3328
3313
|
* @param {number} width
|
|
@@ -3342,8 +3327,7 @@ export class WebEffectRegistry {
|
|
|
3342
3327
|
return takeFromExternrefTable0(ret[0]);
|
|
3343
3328
|
}
|
|
3344
3329
|
/**
|
|
3345
|
-
* Uploads one time-independent still image,
|
|
3346
|
-
* is released. Video uploads continue to require an exact timestamp.
|
|
3330
|
+
* Uploads one time-independent still image, kept until its generation is released.
|
|
3347
3331
|
* @param {string} source_id
|
|
3348
3332
|
* @param {number} width
|
|
3349
3333
|
* @param {number} height
|
|
@@ -3362,14 +3346,11 @@ export class WebEffectRegistry {
|
|
|
3362
3346
|
return takeFromExternrefTable0(ret[0]);
|
|
3363
3347
|
}
|
|
3364
3348
|
/**
|
|
3365
|
-
* Uploads a decoded browser frame as [`Self::upload_presented_video_frame`]
|
|
3366
|
-
*
|
|
3367
|
-
* frame's display size when no project is loaded), and stored under
|
|
3349
|
+
* Uploads a decoded browser frame as [`Self::upload_presented_video_frame`] does, upright,
|
|
3350
|
+
* fitted to the loaded project's size (or the frame's display size with no project), under
|
|
3368
3351
|
* `source_id` at `media_time_ticks`.
|
|
3369
3352
|
*
|
|
3370
|
-
*
|
|
3371
|
-
* returning. An HDR frame is refused, as [`Self::upload_presented_video_frame`]
|
|
3372
|
-
* refuses it.
|
|
3353
|
+
* Takes ownership of `frame` and always closes it. HDR frames are refused.
|
|
3373
3354
|
* @param {string} source_id
|
|
3374
3355
|
* @param {bigint} media_time_ticks
|
|
3375
3356
|
* @param {VideoFrame} frame
|
|
@@ -3385,31 +3366,25 @@ export class WebEffectRegistry {
|
|
|
3385
3366
|
return takeFromExternrefTable0(ret[0]);
|
|
3386
3367
|
}
|
|
3387
3368
|
/**
|
|
3388
|
-
* Uploads a decoded frame's planar YCbCr samples
|
|
3389
|
-
*
|
|
3390
|
-
*
|
|
3369
|
+
* Uploads a decoded frame's planar YCbCr samples as `VideoFrame.copyTo` writes them and
|
|
3370
|
+
* converts them with the engine's shader under the project's color pipeline. This is how
|
|
3371
|
+
* HDR (PQ or HLG) frames reach the engine, since texture copies go through the page's
|
|
3372
|
+
* color conversion.
|
|
3391
3373
|
*
|
|
3392
|
-
*
|
|
3393
|
-
* `
|
|
3394
|
-
*
|
|
3395
|
-
* `
|
|
3396
|
-
*
|
|
3397
|
-
*
|
|
3398
|
-
* `
|
|
3399
|
-
*
|
|
3400
|
-
* metadata as project JSON. `chroma_siting` (`left`, `center`,
|
|
3401
|
-
* `top-left`, or `unspecified`) is where the stream puts its chroma
|
|
3402
|
-
* samples, which `WebCodecs` leaves to the demuxer to know.
|
|
3403
|
-
* `display_width` by `display_height` is the size the visible rectangle
|
|
3404
|
-
* is shown at before it is turned (a `VideoFrame`'s `displayWidth` and
|
|
3405
|
-
* `displayHeight`), which gives the pixel aspect ratio. The frame is
|
|
3406
|
-
* shown mirrored left to right when `mirror` is set, then turned
|
|
3374
|
+
* `format` is a `WebCodecs` pixel format: `I420`, `I422`, or `I444` at 8, 10 (`P10`), or
|
|
3375
|
+
* 12 bits (`P12`), the same with alpha (`I420A`, `I420AP10`, ...), or `NV12`. Samples
|
|
3376
|
+
* above eight bits are 16-bit words with the value in the low bits. `layout` is
|
|
3377
|
+
* `[offset, stride]` per plane, `visible` is `[x, y, width, height]`, and `color` is the
|
|
3378
|
+
* frame's color metadata as project JSON. `chroma_siting` is `left`, `center`, `top-left`,
|
|
3379
|
+
* or `unspecified` (`WebCodecs` leaves it to the demuxer). `display_width` by
|
|
3380
|
+
* `display_height` is the visible rectangle's display size before rotation, which gives
|
|
3381
|
+
* the pixel aspect ratio. The frame is mirrored when `mirror` is set, then turned
|
|
3407
3382
|
* clockwise by `rotation_degrees`.
|
|
3408
3383
|
*
|
|
3409
3384
|
* # Errors
|
|
3410
|
-
* Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout
|
|
3411
|
-
*
|
|
3412
|
-
*
|
|
3385
|
+
* Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout or plane that does
|
|
3386
|
+
* not fit the data, a bad size or rotation, and an HDR frame the project's color pipeline
|
|
3387
|
+
* refuses.
|
|
3413
3388
|
* @param {string} source_id
|
|
3414
3389
|
* @param {bigint} media_time_ticks
|
|
3415
3390
|
* @param {string} format
|
|
@@ -3466,9 +3441,8 @@ export class WebEffectRegistry {
|
|
|
3466
3441
|
return ret >>> 0;
|
|
3467
3442
|
}
|
|
3468
3443
|
/**
|
|
3469
|
-
* How [`Self::upload_presented_video_frame`] copies a frame: `"direct"`,
|
|
3470
|
-
*
|
|
3471
|
-
* or `"canvas"` on WebGL2.
|
|
3444
|
+
* How [`Self::upload_presented_video_frame`] copies a frame: `"direct"`, `"bitmap"` (once
|
|
3445
|
+
* WebGPU refused a frame), `"untried"`, or `"canvas"` on WebGL2.
|
|
3472
3446
|
* @returns {string}
|
|
3473
3447
|
*/
|
|
3474
3448
|
get videoFrameCopy() {
|
|
@@ -3487,12 +3461,12 @@ export class WebEffectRegistry {
|
|
|
3487
3461
|
if (Symbol.dispose) WebEffectRegistry.prototype[Symbol.dispose] = WebEffectRegistry.prototype.free;
|
|
3488
3462
|
|
|
3489
3463
|
/**
|
|
3490
|
-
* Checks that `bytes` hold face `face_index` of a font the engine
|
|
3491
|
-
*
|
|
3464
|
+
* Checks that `bytes` hold face `face_index` of a font the engine can draw with, as
|
|
3465
|
+
* registering it would.
|
|
3492
3466
|
*
|
|
3493
3467
|
* # Errors
|
|
3494
|
-
* Rejects bytes the
|
|
3495
|
-
*
|
|
3468
|
+
* Rejects bytes the font parser refuses, with its reason (for example a WOFF container named
|
|
3469
|
+
* `.ttf`).
|
|
3496
3470
|
* @param {Uint8Array} bytes
|
|
3497
3471
|
* @param {number} face_index
|
|
3498
3472
|
*/
|
|
@@ -3506,13 +3480,11 @@ export function checkFont(bytes, face_index) {
|
|
|
3506
3480
|
}
|
|
3507
3481
|
|
|
3508
3482
|
/**
|
|
3509
|
-
* Checks that `cube` is a `.cube` 3D LUT the engine
|
|
3510
|
-
*
|
|
3511
|
-
* it is imported rather than at every load.
|
|
3483
|
+
* Checks that `cube` is a `.cube` 3D LUT the engine accepts, as `registerLut3d` parses it,
|
|
3484
|
+
* without a renderer, so a host can refuse a file at import time.
|
|
3512
3485
|
*
|
|
3513
3486
|
* # Errors
|
|
3514
|
-
* Rejects text the
|
|
3515
|
-
* one-dimensional table, an unsupported directive, a missing sample).
|
|
3487
|
+
* Rejects text the parser refuses, with its line and reason.
|
|
3516
3488
|
* @param {string} cube
|
|
3517
3489
|
*/
|
|
3518
3490
|
export function checkLut3d(cube) {
|
|
@@ -3525,8 +3497,8 @@ export function checkLut3d(cube) {
|
|
|
3525
3497
|
}
|
|
3526
3498
|
|
|
3527
3499
|
/**
|
|
3528
|
-
* Returns a color pipeline's identity (JSON `ColorPipeline`)
|
|
3529
|
-
*
|
|
3500
|
+
* Returns a color pipeline's identity (JSON `ColorPipeline`) as a proxy that bakes it in
|
|
3501
|
+
* records it.
|
|
3530
3502
|
*
|
|
3531
3503
|
* # Errors
|
|
3532
3504
|
* Rejects JSON that is not a color pipeline.
|
|
@@ -3555,14 +3527,13 @@ export function colorPipelineFingerprint(pipeline) {
|
|
|
3555
3527
|
}
|
|
3556
3528
|
|
|
3557
3529
|
/**
|
|
3558
|
-
* Compares a found fingerprint with a recorded one (both JSON
|
|
3559
|
-
*
|
|
3560
|
-
* `
|
|
3530
|
+
* Compares a found fingerprint with a recorded one (both JSON `MediaFingerprint`s), returning
|
|
3531
|
+
* a JSON `FingerprintMatch`: `identical`, `consistent`, `mismatch` with its fields, or
|
|
3532
|
+
* `unverified`.
|
|
3561
3533
|
*
|
|
3562
3534
|
* # Errors
|
|
3563
|
-
* Rejects JSON that is not a fingerprint, or
|
|
3564
|
-
*
|
|
3565
|
-
* in uppercase: that is an input error, not other media.
|
|
3535
|
+
* Rejects JSON that is not a fingerprint, or one with a malformed part (such as an uppercase
|
|
3536
|
+
* hash).
|
|
3566
3537
|
* @param {string} recorded
|
|
3567
3538
|
* @param {string} found
|
|
3568
3539
|
* @returns {string}
|
|
@@ -3591,13 +3562,12 @@ export function compareFingerprints(recorded, found) {
|
|
|
3591
3562
|
}
|
|
3592
3563
|
|
|
3593
3564
|
/**
|
|
3594
|
-
* Whether `project`'s media, as `catalog` describes it, is ready for
|
|
3595
|
-
* `
|
|
3596
|
-
*
|
|
3565
|
+
* Whether `project`'s media, as `catalog` describes it, is ready for `purpose` (`preview`,
|
|
3566
|
+
* `preview_proxy`, `thumbnail`, `remote_edit`, `export_original`, or `export_proxy`), as a
|
|
3567
|
+
* JSON `ConformReport`.
|
|
3597
3568
|
*
|
|
3598
3569
|
* # Errors
|
|
3599
|
-
* Rejects an invalid project, catalog (
|
|
3600
|
-
* formed among them), or purpose.
|
|
3570
|
+
* Rejects an invalid project, catalog (including malformed fingerprints), or purpose.
|
|
3601
3571
|
* @param {string} project
|
|
3602
3572
|
* @param {string} catalog
|
|
3603
3573
|
* @param {string} purpose
|
|
@@ -3629,8 +3599,7 @@ export function conformProject(project, catalog, purpose) {
|
|
|
3629
3599
|
}
|
|
3630
3600
|
|
|
3631
3601
|
/**
|
|
3632
|
-
* How many faces the font file `bytes` holds: a
|
|
3633
|
-
* count, else 1. `addFontFile` registers each.
|
|
3602
|
+
* How many faces the font file `bytes` holds: a collection's count, else 1.
|
|
3634
3603
|
* @param {Uint8Array} bytes
|
|
3635
3604
|
* @returns {number}
|
|
3636
3605
|
*/
|
|
@@ -3642,10 +3611,9 @@ export function fontFaceCount(bytes) {
|
|
|
3642
3611
|
}
|
|
3643
3612
|
|
|
3644
3613
|
/**
|
|
3645
|
-
* Returns the family name a caption style's `font_family` must
|
|
3646
|
-
*
|
|
3647
|
-
*
|
|
3648
|
-
* font or the face names no family.
|
|
3614
|
+
* Returns the family name a caption style's `font_family` must use to select face
|
|
3615
|
+
* `face_index` of the font `bytes`, or `undefined` when the bytes are not a font or the face
|
|
3616
|
+
* names no family.
|
|
3649
3617
|
* @param {Uint8Array} bytes
|
|
3650
3618
|
* @param {number} face_index
|
|
3651
3619
|
* @returns {string | undefined}
|
|
@@ -3663,8 +3631,7 @@ export function fontFamily(bytes, face_index) {
|
|
|
3663
3631
|
}
|
|
3664
3632
|
|
|
3665
3633
|
/**
|
|
3666
|
-
*
|
|
3667
|
-
* (`tests/golden/geometry_queries.json`), computed by this module.
|
|
3634
|
+
* Answers to the geometry queries the native tests pin (`tests/golden/geometry_queries.json`).
|
|
3668
3635
|
* @returns {string}
|
|
3669
3636
|
*/
|
|
3670
3637
|
export function geometryParityAnswers() {
|
|
@@ -3709,8 +3676,7 @@ export function hitTest(items_json, time, width, height, x, y) {
|
|
|
3709
3676
|
}
|
|
3710
3677
|
|
|
3711
3678
|
/**
|
|
3712
|
-
* A project's non-fatal diagnostics
|
|
3713
|
-
* issues (`alpha2/project`'s `LintIssue`).
|
|
3679
|
+
* A project's non-fatal diagnostics as a JSON array of `LintIssue`s.
|
|
3714
3680
|
*
|
|
3715
3681
|
* # Errors
|
|
3716
3682
|
* Rejects a document that does not load as a valid project.
|
|
@@ -3803,17 +3769,17 @@ export function nearestPoint(path_json, width, height, x, y) {
|
|
|
3803
3769
|
}
|
|
3804
3770
|
|
|
3805
3771
|
/**
|
|
3806
|
-
* Reads a subtitle file (`format` is `srt` or `webvtt`) into caption cues,
|
|
3807
|
-
*
|
|
3772
|
+
* Reads a subtitle file (`format` is `srt` or `webvtt`) into caption cues, returned as JSON
|
|
3773
|
+
* `{ rows, skipped, notes }`.
|
|
3808
3774
|
*
|
|
3809
|
-
* `rows` holds one caption track's
|
|
3810
|
-
*
|
|
3811
|
-
*
|
|
3812
|
-
*
|
|
3775
|
+
* `rows` holds one caption track's `CaptionCue`s per row, split so no cues overlap within a
|
|
3776
|
+
* row and no row exceeds a caption track's cue limit. `skipped` counts blocks that were not
|
|
3777
|
+
* cues; `notes` counts markup read but not kept (`extraVoices`, `droppedTimestamps`,
|
|
3778
|
+
* `droppedClasses`, `flattened`).
|
|
3813
3779
|
*
|
|
3814
3780
|
* # Errors
|
|
3815
|
-
* Rejects an unknown format, a WebVTT file without its header, and cues that
|
|
3816
|
-
*
|
|
3781
|
+
* Rejects an unknown format, a WebVTT file without its header, and cues that need more
|
|
3782
|
+
* caption tracks than a project holds.
|
|
3817
3783
|
* @param {string} text
|
|
3818
3784
|
* @param {string} format
|
|
3819
3785
|
* @returns {string}
|
|
@@ -3873,15 +3839,14 @@ export function pathLength(path_json, width, height) {
|
|
|
3873
3839
|
}
|
|
3874
3840
|
|
|
3875
3841
|
/**
|
|
3876
|
-
* The gain that brings a measured mix (a `loudnessReport` JSON) to
|
|
3877
|
-
*
|
|
3878
|
-
*
|
|
3879
|
-
* as JSON `{ gainDb, integratedLufs, truePeakDbtp, peakLimited,
|
|
3842
|
+
* The gain that brings a measured mix (a `loudnessReport` JSON) to `target_lufs` without its
|
|
3843
|
+
* true peak passing `ceiling_dbtp` or its sample peak reaching the report's
|
|
3844
|
+
* `limiterThreshold`. Returns JSON `{ gainDb, integratedLufs, truePeakDbtp, peakLimited,
|
|
3880
3845
|
* limiterLimited }`, or `null` for a mix silent below the absolute gate.
|
|
3881
3846
|
*
|
|
3882
3847
|
* # Errors
|
|
3883
|
-
* Rejects a report that is not a JSON object with
|
|
3884
|
-
*
|
|
3848
|
+
* Rejects a report that is not a JSON object with `frames`, or whose `limiterThreshold` is
|
|
3849
|
+
* neither a positive number nor `null`.
|
|
3885
3850
|
* @param {string} report_json
|
|
3886
3851
|
* @param {number} target_lufs
|
|
3887
3852
|
* @param {number} ceiling_dbtp
|
|
@@ -3909,13 +3874,11 @@ export function planLoudnessNormalization(report_json, target_lufs, ceiling_dbtp
|
|
|
3909
3874
|
}
|
|
3910
3875
|
|
|
3911
3876
|
/**
|
|
3912
|
-
* How
|
|
3913
|
-
*
|
|
3914
|
-
*
|
|
3915
|
-
*
|
|
3916
|
-
*
|
|
3917
|
-
* adapters allow past a requested time before they take the last frame at
|
|
3918
|
-
* or before it, as the native host does.
|
|
3877
|
+
* How many ticks after a source time a decoded frame's timestamp may fall and still be the
|
|
3878
|
+
* frame shown there ([`alpha2_time::presentation_slack`]). The stream's timestamps are whole
|
|
3879
|
+
* multiples of `num / den` seconds rounded to `quantum` units (0 for no rounding); an unknown
|
|
3880
|
+
* time base gives zero. Decoder adapters allow this much past a requested time before taking
|
|
3881
|
+
* the last frame at or before it, as the native host does.
|
|
3919
3882
|
* @param {bigint} num
|
|
3920
3883
|
* @param {bigint} den
|
|
3921
3884
|
* @param {bigint} quantum
|
|
@@ -3928,9 +3891,6 @@ export function presentationSlackTicks(num, den, quantum) {
|
|
|
3928
3891
|
|
|
3929
3892
|
/**
|
|
3930
3893
|
* The engine's quality level names, lowest first, as a JSON array.
|
|
3931
|
-
*
|
|
3932
|
-
* An app builds its quality control from this rather than from a list of its
|
|
3933
|
-
* own, so the names a browser offers are the ones the engine resolves.
|
|
3934
3894
|
* @returns {string}
|
|
3935
3895
|
*/
|
|
3936
3896
|
export function qualityLevels() {
|
|
@@ -3981,9 +3941,8 @@ export function resamplePath(path_json, width, height, counts) {
|
|
|
3981
3941
|
}
|
|
3982
3942
|
|
|
3983
3943
|
/**
|
|
3984
|
-
* Resolves a quality level into a stereo audio bitrate in bits per second.
|
|
3985
|
-
*
|
|
3986
|
-
* `codec` is `aac` or `opus`. The native host reads the same engine table.
|
|
3944
|
+
* Resolves a quality level into a stereo audio bitrate in bits per second. `codec` is `aac`
|
|
3945
|
+
* or `opus`.
|
|
3987
3946
|
* @param {string} codec
|
|
3988
3947
|
* @param {string} level
|
|
3989
3948
|
* @returns {number}
|
|
@@ -4001,11 +3960,8 @@ export function resolveAudioBitrate(codec, level) {
|
|
|
4001
3960
|
}
|
|
4002
3961
|
|
|
4003
3962
|
/**
|
|
4004
|
-
* Resolves a quality level into the rate control every sink encodes with
|
|
4005
|
-
*
|
|
4006
|
-
* Returns JSON: `{ "bitrate", "mode", "quantizer" }`. The native host calls
|
|
4007
|
-
* the same engine function, so a browser export and a native export at the
|
|
4008
|
-
* same level and output receive the same numbers.
|
|
3963
|
+
* Resolves a quality level into the rate control every sink encodes with, as JSON
|
|
3964
|
+
* `{ "bitrate", "mode", "quantizer" }`. The native host calls the same engine function.
|
|
4009
3965
|
* @param {string} codec
|
|
4010
3966
|
* @param {number} width
|
|
4011
3967
|
* @param {number} height
|
|
@@ -4038,8 +3994,8 @@ export function resolveRateControl(codec, width, height, frame_rate_num, frame_r
|
|
|
4038
3994
|
}
|
|
4039
3995
|
|
|
4040
3996
|
/**
|
|
4041
|
-
* The unit a stream's first timestamps (in
|
|
4042
|
-
*
|
|
3997
|
+
* The unit a stream's first timestamps (in time base units) are rounded to, or 0 for none
|
|
3998
|
+
* ([`alpha2_time::rounding_quantum`]).
|
|
4043
3999
|
* @param {BigInt64Array} timestamps
|
|
4044
4000
|
* @returns {bigint}
|
|
4045
4001
|
*/
|
|
@@ -4051,7 +4007,16 @@ export function roundingQuantum(timestamps) {
|
|
|
4051
4007
|
}
|
|
4052
4008
|
|
|
4053
4009
|
/**
|
|
4054
|
-
*
|
|
4010
|
+
* Replaces the GPU watchdog, in milliseconds, that losses are classified against (zero
|
|
4011
|
+
* restores the default of 2000). A page has no environment, so tests set it here.
|
|
4012
|
+
* @param {number} milliseconds
|
|
4013
|
+
*/
|
|
4014
|
+
export function setGpuWatchdogMs(milliseconds) {
|
|
4015
|
+
wasm.setGpuWatchdogMs(milliseconds);
|
|
4016
|
+
}
|
|
4017
|
+
|
|
4018
|
+
/**
|
|
4019
|
+
* Each item's normalized bounds as JSON `[{ at, bounds }]`.
|
|
4055
4020
|
*
|
|
4056
4021
|
* # Errors
|
|
4057
4022
|
* Rejects items that are not a valid content tree, or a bad size or time.
|
|
@@ -4083,10 +4048,8 @@ export function shapeBounds(items_json, time, width, height) {
|
|
|
4083
4048
|
}
|
|
4084
4049
|
|
|
4085
4050
|
/**
|
|
4086
|
-
* Installs the panic reporter
|
|
4087
|
-
*
|
|
4088
|
-
* `wasm-bindgen` calls this from the generated initializer, so every entry
|
|
4089
|
-
* point is covered without the host opting in.
|
|
4051
|
+
* Installs the panic reporter when the module is instantiated, so every entry point is
|
|
4052
|
+
* covered without the host opting in.
|
|
4090
4053
|
*/
|
|
4091
4054
|
export function start() {
|
|
4092
4055
|
wasm.start();
|
|
@@ -4160,7 +4123,7 @@ export function trimPath(path_json, width, height, start, end, offset) {
|
|
|
4160
4123
|
|
|
4161
4124
|
/**
|
|
4162
4125
|
* The vector coverage and scene hashes the native tests pin
|
|
4163
|
-
* (`tests/golden/vector_coverage.json`)
|
|
4126
|
+
* (`tests/golden/vector_coverage.json`).
|
|
4164
4127
|
* @returns {string}
|
|
4165
4128
|
*/
|
|
4166
4129
|
export function vectorParityHashes() {
|
|
@@ -4252,40 +4215,48 @@ function __wbg_get_imports() {
|
|
|
4252
4215
|
__wbg_addEventListener_9534e2dc12044ee4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4253
4216
|
arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
4254
4217
|
}, arguments); },
|
|
4255
|
-
|
|
4256
|
-
const ret =
|
|
4218
|
+
__wbg_alpha2BitmapUploadProbe_e4f6696ad3e468c6: function() { return handleError(function () {
|
|
4219
|
+
const ret = alpha2BitmapUploadProbe();
|
|
4257
4220
|
return ret;
|
|
4258
4221
|
}, arguments); },
|
|
4259
|
-
|
|
4222
|
+
__wbg_alpha2Canvas2d_5c0b7c647c1ef267: function() { return handleError(function (arg0) {
|
|
4260
4223
|
const ret = alpha2Canvas2d(arg0);
|
|
4261
4224
|
return ret;
|
|
4262
4225
|
}, arguments); },
|
|
4263
|
-
|
|
4226
|
+
__wbg_alpha2CopyExternalImage_9f7986408170e249: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
4264
4227
|
alpha2CopyExternalImage(arg0, arg1, arg2, arg3 >>> 0, arg4 >>> 0);
|
|
4265
4228
|
}, arguments); },
|
|
4266
|
-
|
|
4229
|
+
__wbg_alpha2FrameBitmap_cd6c6571bdf4400d: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4267
4230
|
const ret = alpha2FrameBitmap(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
4268
4231
|
return ret;
|
|
4269
4232
|
}, arguments); },
|
|
4270
|
-
|
|
4233
|
+
__wbg_alpha2ImagePixels_629029b6bd7af4ba: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4271
4234
|
const ret = alpha2ImagePixels(arg1, arg2 >>> 0, arg3 >>> 0);
|
|
4272
4235
|
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
4273
4236
|
const len1 = WASM_VECTOR_LEN;
|
|
4274
4237
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4275
4238
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4276
4239
|
}, arguments); },
|
|
4277
|
-
|
|
4240
|
+
__wbg_alpha2PutRgba_75c2eb5d9053b3ef: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
4278
4241
|
alpha2PutRgba(arg0, getArrayU8FromWasm0(arg1, arg2), arg3 >>> 0, arg4 >>> 0);
|
|
4279
4242
|
}, arguments); },
|
|
4280
|
-
|
|
4243
|
+
__wbg_alpha2ResizeCanvas_9677cbececcf952e: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4281
4244
|
alpha2ResizeCanvas(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
4282
4245
|
}, arguments); },
|
|
4246
|
+
__wbg_apply_5d9aa7604c2490a8: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4247
|
+
const ret = arg0.apply(arg1, arg2);
|
|
4248
|
+
return ret;
|
|
4249
|
+
}, arguments); },
|
|
4283
4250
|
__wbg_attachShader_74ecf95efc73ee58: function(arg0, arg1, arg2) {
|
|
4284
4251
|
arg0.attachShader(arg1, arg2);
|
|
4285
4252
|
},
|
|
4286
4253
|
__wbg_attachShader_bfb57af27e3c4a25: function(arg0, arg1, arg2) {
|
|
4287
4254
|
arg0.attachShader(arg1, arg2);
|
|
4288
4255
|
},
|
|
4256
|
+
__wbg_beginComputePass_b9a325184985e6ff: function(arg0, arg1) {
|
|
4257
|
+
const ret = arg0.beginComputePass(arg1);
|
|
4258
|
+
return ret;
|
|
4259
|
+
},
|
|
4289
4260
|
__wbg_beginQuery_8c123fa7e7aec2a4: function(arg0, arg1, arg2) {
|
|
4290
4261
|
arg0.beginQuery(arg1 >>> 0, arg2);
|
|
4291
4262
|
},
|
|
@@ -4768,6 +4739,9 @@ function __wbg_get_imports() {
|
|
|
4768
4739
|
__wbg_endQuery_4eea0267f103b625: function(arg0, arg1) {
|
|
4769
4740
|
arg0.endQuery(arg1 >>> 0);
|
|
4770
4741
|
},
|
|
4742
|
+
__wbg_end_82fd0c12ba185009: function(arg0) {
|
|
4743
|
+
arg0.end();
|
|
4744
|
+
},
|
|
4771
4745
|
__wbg_end_b57473834b877409: function(arg0) {
|
|
4772
4746
|
arg0.end();
|
|
4773
4747
|
},
|
|
@@ -5043,6 +5017,16 @@ function __wbg_get_imports() {
|
|
|
5043
5017
|
const ret = result;
|
|
5044
5018
|
return ret;
|
|
5045
5019
|
},
|
|
5020
|
+
__wbg_instanceof_Promise_f6320f682f582ddf: function(arg0) {
|
|
5021
|
+
let result;
|
|
5022
|
+
try {
|
|
5023
|
+
result = arg0 instanceof Promise;
|
|
5024
|
+
} catch (_) {
|
|
5025
|
+
result = false;
|
|
5026
|
+
}
|
|
5027
|
+
const ret = result;
|
|
5028
|
+
return ret;
|
|
5029
|
+
},
|
|
5046
5030
|
__wbg_instanceof_TypeError_2784cf59ac94d11e: function(arg0) {
|
|
5047
5031
|
let result;
|
|
5048
5032
|
try {
|
|
@@ -5586,6 +5570,9 @@ function __wbg_get_imports() {
|
|
|
5586
5570
|
__wbg_set_beginning_of_pass_write_index_e552c5e8b8bbf52f: function(arg0, arg1) {
|
|
5587
5571
|
arg0.beginningOfPassWriteIndex = arg1 >>> 0;
|
|
5588
5572
|
},
|
|
5573
|
+
__wbg_set_beginning_of_pass_write_index_fa9ae10d5d2804ce: function(arg0, arg1) {
|
|
5574
|
+
arg0.beginningOfPassWriteIndex = arg1 >>> 0;
|
|
5575
|
+
},
|
|
5589
5576
|
__wbg_set_bind_group_layouts_458c44ba55100b82: function(arg0, arg1, arg2) {
|
|
5590
5577
|
arg0.bindGroupLayouts = getArrayJsValueViewFromWasm0(arg1, arg2);
|
|
5591
5578
|
},
|
|
@@ -5697,6 +5684,9 @@ function __wbg_get_imports() {
|
|
|
5697
5684
|
__wbg_set_end_of_pass_write_index_8f164f9e60d4ad16: function(arg0, arg1) {
|
|
5698
5685
|
arg0.endOfPassWriteIndex = arg1 >>> 0;
|
|
5699
5686
|
},
|
|
5687
|
+
__wbg_set_end_of_pass_write_index_b54a8e3802b9ae0d: function(arg0, arg1) {
|
|
5688
|
+
arg0.endOfPassWriteIndex = arg1 >>> 0;
|
|
5689
|
+
},
|
|
5700
5690
|
__wbg_set_entries_6f866302103b81e9: function(arg0, arg1, arg2) {
|
|
5701
5691
|
arg0.entries = getArrayJsValueViewFromWasm0(arg1, arg2);
|
|
5702
5692
|
},
|
|
@@ -5763,6 +5753,9 @@ function __wbg_get_imports() {
|
|
|
5763
5753
|
__wbg_set_label_17202740051e9722: function(arg0, arg1, arg2) {
|
|
5764
5754
|
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
5765
5755
|
},
|
|
5756
|
+
__wbg_set_label_17b4858e1eef23dd: function(arg0, arg1, arg2) {
|
|
5757
|
+
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
5758
|
+
},
|
|
5766
5759
|
__wbg_set_label_2fefb39c0e0dbbe8: function(arg0, arg1, arg2) {
|
|
5767
5760
|
arg0.label = getStringFromWasm0(arg1, arg2);
|
|
5768
5761
|
},
|
|
@@ -5913,6 +5906,9 @@ function __wbg_get_imports() {
|
|
|
5913
5906
|
__wbg_set_query_set_f030702f1b69199f: function(arg0, arg1) {
|
|
5914
5907
|
arg0.querySet = arg1;
|
|
5915
5908
|
},
|
|
5909
|
+
__wbg_set_query_set_f9a94586851fdba2: function(arg0, arg1) {
|
|
5910
|
+
arg0.querySet = arg1;
|
|
5911
|
+
},
|
|
5916
5912
|
__wbg_set_r_6ece4d74af63364f: function(arg0, arg1) {
|
|
5917
5913
|
arg0.r = arg1;
|
|
5918
5914
|
},
|
|
@@ -6033,6 +6029,9 @@ function __wbg_get_imports() {
|
|
|
6033
6029
|
__wbg_set_texture_a33be3fe02ac6264: function(arg0, arg1) {
|
|
6034
6030
|
arg0.texture = arg1;
|
|
6035
6031
|
},
|
|
6032
|
+
__wbg_set_timestamp_writes_5f240bbaad97fcaf: function(arg0, arg1) {
|
|
6033
|
+
arg0.timestampWrites = arg1;
|
|
6034
|
+
},
|
|
6036
6035
|
__wbg_set_timestamp_writes_de6a09f299b71b76: function(arg0, arg1) {
|
|
6037
6036
|
arg0.timestampWrites = arg1;
|
|
6038
6037
|
},
|
|
@@ -6466,47 +6465,47 @@ function __wbg_get_imports() {
|
|
|
6466
6465
|
arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
|
|
6467
6466
|
}, arguments); },
|
|
6468
6467
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
6469
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
6468
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3932, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6470
6469
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_);
|
|
6471
6470
|
return ret;
|
|
6472
6471
|
},
|
|
6473
6472
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
6474
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
6473
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 230, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
6475
6474
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___web_sys_9e2ae0ace5131457___features__gen_Event__Event______true_);
|
|
6476
6475
|
return ret;
|
|
6477
6476
|
},
|
|
6478
6477
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
6479
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUCompilationInfo")], shim_idx:
|
|
6478
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUCompilationInfo")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6480
6479
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_);
|
|
6481
6480
|
return ret;
|
|
6482
6481
|
},
|
|
6483
6482
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
6484
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
6485
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6483
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6484
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232);
|
|
6486
6485
|
return ret;
|
|
6487
6486
|
},
|
|
6488
6487
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
6489
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
6488
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 1711, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
6490
6489
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
|
|
6491
6490
|
return ret;
|
|
6492
6491
|
},
|
|
6493
6492
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
6494
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
6495
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6493
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 1711, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
6494
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234);
|
|
6496
6495
|
return ret;
|
|
6497
6496
|
},
|
|
6498
6497
|
__wbindgen_generic_0000000000000007: function(arg0, arg1) {
|
|
6499
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
6500
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6498
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6499
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235);
|
|
6501
6500
|
return ret;
|
|
6502
6501
|
},
|
|
6503
6502
|
__wbindgen_generic_0000000000000008: function(arg0, arg1) {
|
|
6504
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
6505
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6503
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 1708, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6504
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236);
|
|
6506
6505
|
return ret;
|
|
6507
6506
|
},
|
|
6508
6507
|
__wbindgen_generic_0000000000000009: function(arg0, arg1) {
|
|
6509
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
6508
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 232, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
6510
6509
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke_______true_);
|
|
6511
6510
|
return ret;
|
|
6512
6511
|
},
|
|
@@ -6573,8 +6572,9 @@ function __wbg_get_imports() {
|
|
|
6573
6572
|
return {
|
|
6574
6573
|
__proto__: null,
|
|
6575
6574
|
"./alpha2_wasm_bg.js": import0,
|
|
6576
|
-
"./snippets/alpha2-wasm-
|
|
6577
|
-
"./snippets/alpha2-wasm-
|
|
6575
|
+
"./snippets/alpha2-wasm-1313375d424845c0/inline1.js": import1,
|
|
6576
|
+
"./snippets/alpha2-wasm-1313375d424845c0/inline1.js": import2,
|
|
6577
|
+
"./snippets/alpha2-wasm-1313375d424845c0/inline1.js": import3,
|
|
6578
6578
|
};
|
|
6579
6579
|
}
|
|
6580
6580
|
|
|
@@ -6590,8 +6590,8 @@ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46
|
|
|
6590
6590
|
wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_(arg0, arg1, arg2);
|
|
6591
6591
|
}
|
|
6592
6592
|
|
|
6593
|
-
function
|
|
6594
|
-
wasm.
|
|
6593
|
+
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234(arg0, arg1, arg2) {
|
|
6594
|
+
wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__234(arg0, arg1, arg2);
|
|
6595
6595
|
}
|
|
6596
6596
|
|
|
6597
6597
|
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_(arg0, arg1, arg2) {
|
|
@@ -6608,22 +6608,22 @@ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bin
|
|
|
6608
6608
|
}
|
|
6609
6609
|
}
|
|
6610
6610
|
|
|
6611
|
-
function
|
|
6612
|
-
const ret = wasm.
|
|
6611
|
+
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232(arg0, arg1, arg2) {
|
|
6612
|
+
const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__232(arg0, arg1, arg2);
|
|
6613
6613
|
if (ret[1]) {
|
|
6614
6614
|
throw takeFromExternrefTable0(ret[0]);
|
|
6615
6615
|
}
|
|
6616
6616
|
}
|
|
6617
6617
|
|
|
6618
|
-
function
|
|
6619
|
-
const ret = wasm.
|
|
6618
|
+
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235(arg0, arg1, arg2) {
|
|
6619
|
+
const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__235(arg0, arg1, arg2);
|
|
6620
6620
|
if (ret[1]) {
|
|
6621
6621
|
throw takeFromExternrefTable0(ret[0]);
|
|
6622
6622
|
}
|
|
6623
6623
|
}
|
|
6624
6624
|
|
|
6625
|
-
function
|
|
6626
|
-
const ret = wasm.
|
|
6625
|
+
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236(arg0, arg1, arg2) {
|
|
6626
|
+
const ret = wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__236(arg0, arg1, arg2);
|
|
6627
6627
|
if (ret[1]) {
|
|
6628
6628
|
throw takeFromExternrefTable0(ret[0]);
|
|
6629
6629
|
}
|