alpha2 0.4.3 → 0.4.5
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 +2 -1
- package/THIRD_PARTY_NOTICES.md +66 -0
- package/dist/effects.d.ts +17 -2
- package/dist/mediabunny.d.ts +59 -4
- package/dist/mediabunny.js +85 -4
- package/dist/robustness.d.ts +12 -4
- package/dist/robustness.js +8 -3
- package/dist/worker.d.ts +38 -3
- package/dist/worker.js +75 -14
- package/package.json +1 -1
- package/wasm/alpha2_audio_worklet.wasm +0 -0
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +559 -5
- package/wasm/alpha2_wasm.js +1284 -31
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +81 -4
- package/wasm/snippets/alpha2-wasm-57b04ecc6db57e1f/inline0.js +37 -0
- /package/wasm/snippets/{alpha2-wasm-6632ebab0576cb8c/inline0.js → alpha2-wasm-57b04ecc6db57e1f/inline1.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-6632ebab0576cb8c/inline1.js → alpha2-wasm-57b04ecc6db57e1f/inline2.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-6632ebab0576cb8c/inline2.js → alpha2-wasm-57b04ecc6db57e1f/inline3.js} +0 -0
package/wasm/alpha2_wasm.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* @ts-self-types="./alpha2_wasm.d.ts" */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import * as
|
|
2
|
+
import { alpha2Canvas2d, alpha2ImagePixels, alpha2PutRgba, alpha2ResizeCanvas } from './snippets/alpha2-wasm-57b04ecc6db57e1f/inline0.js';
|
|
3
|
+
import { alpha2BitmapUploadsPremultiplied, alpha2FrameBitmap } from './snippets/alpha2-wasm-57b04ecc6db57e1f/inline2.js';
|
|
4
|
+
import { alpha2CopyExternalImage } from './snippets/alpha2-wasm-57b04ecc6db57e1f/inline3.js';
|
|
5
|
+
import * as import1 from "./snippets/alpha2-wasm-57b04ecc6db57e1f/inline1.js"
|
|
6
|
+
import * as import2 from "./snippets/alpha2-wasm-57b04ecc6db57e1f/inline1.js"
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
/**
|
|
@@ -762,6 +763,1199 @@ export class WaveformResult {
|
|
|
762
763
|
}
|
|
763
764
|
if (Symbol.dispose) WaveformResult.prototype[Symbol.dispose] = WaveformResult.prototype.free;
|
|
764
765
|
|
|
766
|
+
/**
|
|
767
|
+
* The browser renderer that draws on the CPU, for a page with no GPU.
|
|
768
|
+
*
|
|
769
|
+
* It answers the calls `WebEffectRegistry` answers for preview, export,
|
|
770
|
+
* text and audio, and draws the same pictures as the engine's native CPU
|
|
771
|
+
* renderer, byte for byte. Effects registered at run time are refused.
|
|
772
|
+
*/
|
|
773
|
+
export class WebCpuRenderer {
|
|
774
|
+
static __wrap(ptr) {
|
|
775
|
+
const obj = Object.create(WebCpuRenderer.prototype);
|
|
776
|
+
obj.__wbg_ptr = ptr;
|
|
777
|
+
WebCpuRendererFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
778
|
+
return obj;
|
|
779
|
+
}
|
|
780
|
+
__destroy_into_raw() {
|
|
781
|
+
const ptr = this.__wbg_ptr;
|
|
782
|
+
this.__wbg_ptr = 0;
|
|
783
|
+
WebCpuRendererFinalization.unregister(this);
|
|
784
|
+
return ptr;
|
|
785
|
+
}
|
|
786
|
+
free() {
|
|
787
|
+
const ptr = this.__destroy_into_raw();
|
|
788
|
+
wasm.__wbg_webcpurenderer_free(ptr, 0);
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* Appends an OpenType font to the fallback stack text draws with.
|
|
792
|
+
*
|
|
793
|
+
* # Errors
|
|
794
|
+
* Returns an error for malformed font bytes.
|
|
795
|
+
* @param {string} family
|
|
796
|
+
* @param {Uint8Array} bytes
|
|
797
|
+
* @param {number} face_index
|
|
798
|
+
*/
|
|
799
|
+
addFont(family, bytes, face_index) {
|
|
800
|
+
const ptr0 = passStringToWasm0(family, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
801
|
+
const len0 = WASM_VECTOR_LEN;
|
|
802
|
+
const ptr1 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
803
|
+
const len1 = WASM_VECTOR_LEN;
|
|
804
|
+
const ret = wasm.webcpurenderer_addFont(this.__wbg_ptr, ptr0, len0, ptr1, len1, face_index);
|
|
805
|
+
if (ret[1]) {
|
|
806
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* `WebEffectRegistry.aliasVideoFrame`.
|
|
811
|
+
*
|
|
812
|
+
* # Errors
|
|
813
|
+
* Refuses an alias that would make the export frame's sources outgrow
|
|
814
|
+
* the uploaded-frame budget.
|
|
815
|
+
* @param {string} source_id
|
|
816
|
+
* @param {bigint} existing_media_time_ticks
|
|
817
|
+
* @param {bigint} requested_media_time_ticks
|
|
818
|
+
* @returns {boolean}
|
|
819
|
+
*/
|
|
820
|
+
aliasVideoFrame(source_id, existing_media_time_ticks, requested_media_time_ticks) {
|
|
821
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
822
|
+
const len0 = WASM_VECTOR_LEN;
|
|
823
|
+
const ret = wasm.webcpurenderer_aliasVideoFrame(this.__wbg_ptr, ptr0, len0, existing_media_time_ticks, requested_media_time_ticks);
|
|
824
|
+
if (ret[2]) {
|
|
825
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
826
|
+
}
|
|
827
|
+
return ret[0] !== 0;
|
|
828
|
+
}
|
|
829
|
+
/**
|
|
830
|
+
* Channel count of every mixed block.
|
|
831
|
+
* @returns {number}
|
|
832
|
+
*/
|
|
833
|
+
audioChannels() {
|
|
834
|
+
const ret = wasm.webcpurenderer_audioChannels(this.__wbg_ptr);
|
|
835
|
+
return ret >>> 0;
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* The most samples per channel one `renderAudio` call mixes.
|
|
839
|
+
* @returns {number}
|
|
840
|
+
*/
|
|
841
|
+
get audioMaxBlock() {
|
|
842
|
+
const ret = wasm.webcpurenderer_audioMaxBlock(this.__wbg_ptr);
|
|
843
|
+
return ret >>> 0;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Sources the most recent `renderAudio` call could not mix, as JSON.
|
|
847
|
+
*
|
|
848
|
+
* # Errors
|
|
849
|
+
* Returns an error if the list cannot be serialized.
|
|
850
|
+
* @returns {string}
|
|
851
|
+
*/
|
|
852
|
+
audioMissingSources() {
|
|
853
|
+
let deferred2_0;
|
|
854
|
+
let deferred2_1;
|
|
855
|
+
try {
|
|
856
|
+
const ret = wasm.webcpurenderer_audioMissingSources(this.__wbg_ptr);
|
|
857
|
+
var ptr1 = ret[0];
|
|
858
|
+
var len1 = ret[1];
|
|
859
|
+
if (ret[3]) {
|
|
860
|
+
ptr1 = 0; len1 = 0;
|
|
861
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
862
|
+
}
|
|
863
|
+
deferred2_0 = ptr1;
|
|
864
|
+
deferred2_1 = len1;
|
|
865
|
+
return getStringFromWasm0(ptr1, len1);
|
|
866
|
+
} finally {
|
|
867
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* `WebEffectRegistry.audioNeeds`.
|
|
872
|
+
*
|
|
873
|
+
* # Errors
|
|
874
|
+
* Fails without a project, or for a window out of range.
|
|
875
|
+
* @param {bigint} start_sample
|
|
876
|
+
* @param {number} frames
|
|
877
|
+
* @returns {string}
|
|
878
|
+
*/
|
|
879
|
+
audioNeeds(start_sample, frames) {
|
|
880
|
+
let deferred2_0;
|
|
881
|
+
let deferred2_1;
|
|
882
|
+
try {
|
|
883
|
+
const ret = wasm.webcpurenderer_audioNeeds(this.__wbg_ptr, start_sample, frames);
|
|
884
|
+
var ptr1 = ret[0];
|
|
885
|
+
var len1 = ret[1];
|
|
886
|
+
if (ret[3]) {
|
|
887
|
+
ptr1 = 0; len1 = 0;
|
|
888
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
889
|
+
}
|
|
890
|
+
deferred2_0 = ptr1;
|
|
891
|
+
deferred2_1 = len1;
|
|
892
|
+
return getStringFromWasm0(ptr1, len1);
|
|
893
|
+
} finally {
|
|
894
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Allocated audio sample bytes.
|
|
899
|
+
* @returns {number}
|
|
900
|
+
*/
|
|
901
|
+
audioRetainedBytes() {
|
|
902
|
+
const ret = wasm.webcpurenderer_audioRetainedBytes(this.__wbg_ptr);
|
|
903
|
+
return ret >>> 0;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Total retained audio samples across every source.
|
|
907
|
+
* @returns {number}
|
|
908
|
+
*/
|
|
909
|
+
audioRetainedFrames() {
|
|
910
|
+
const ret = wasm.webcpurenderer_audioRetainedFrames(this.__wbg_ptr);
|
|
911
|
+
return ret >>> 0;
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* One source's retained audio windows, as JSON.
|
|
915
|
+
*
|
|
916
|
+
* # Errors
|
|
917
|
+
* Returns an error if the windows cannot be serialized.
|
|
918
|
+
* @param {string} source_id
|
|
919
|
+
* @returns {string}
|
|
920
|
+
*/
|
|
921
|
+
audioRetainedWindows(source_id) {
|
|
922
|
+
let deferred3_0;
|
|
923
|
+
let deferred3_1;
|
|
924
|
+
try {
|
|
925
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
926
|
+
const len0 = WASM_VECTOR_LEN;
|
|
927
|
+
const ret = wasm.webcpurenderer_audioRetainedWindows(this.__wbg_ptr, ptr0, len0);
|
|
928
|
+
var ptr2 = ret[0];
|
|
929
|
+
var len2 = ret[1];
|
|
930
|
+
if (ret[3]) {
|
|
931
|
+
ptr2 = 0; len2 = 0;
|
|
932
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
933
|
+
}
|
|
934
|
+
deferred3_0 = ptr2;
|
|
935
|
+
deferred3_1 = len2;
|
|
936
|
+
return getStringFromWasm0(ptr2, len2);
|
|
937
|
+
} finally {
|
|
938
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Project sample rate used by uploads and mixed blocks.
|
|
943
|
+
* @returns {number}
|
|
944
|
+
*/
|
|
945
|
+
audioSampleRate() {
|
|
946
|
+
const ret = wasm.webcpurenderer_audioSampleRate(this.__wbg_ptr);
|
|
947
|
+
return ret >>> 0;
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* `WebEffectRegistry.beginExportAt`: one exact timeline timestamp at
|
|
951
|
+
* export quality, drawn on the CPU, its `readback` already settled.
|
|
952
|
+
*
|
|
953
|
+
* # Errors
|
|
954
|
+
* Returns an error without a loaded project, for an unknown codec or an
|
|
955
|
+
* odd size, an effect that does not draw on the CPU (`EFFECT_ERROR`),
|
|
956
|
+
* or when the frame cannot be drawn.
|
|
957
|
+
* @param {bigint} time_ticks
|
|
958
|
+
* @param {string} codec
|
|
959
|
+
* @returns {any}
|
|
960
|
+
*/
|
|
961
|
+
beginExportAt(time_ticks, codec) {
|
|
962
|
+
const ptr0 = passStringToWasm0(codec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
963
|
+
const len0 = WASM_VECTOR_LEN;
|
|
964
|
+
const ret = wasm.webcpurenderer_beginExportAt(this.__wbg_ptr, time_ticks, ptr0, len0);
|
|
965
|
+
if (ret[2]) {
|
|
966
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
967
|
+
}
|
|
968
|
+
return takeFromExternrefTable0(ret[0]);
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* `WebEffectRegistry.beginExportFrame`: its `readback` is already
|
|
972
|
+
* settled.
|
|
973
|
+
*
|
|
974
|
+
* # Errors
|
|
975
|
+
* As [`Self::export_frame`].
|
|
976
|
+
* @returns {any}
|
|
977
|
+
*/
|
|
978
|
+
beginExportFrame() {
|
|
979
|
+
const ret = wasm.webcpurenderer_beginExportFrame(this.__wbg_ptr);
|
|
980
|
+
if (ret[2]) {
|
|
981
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
982
|
+
}
|
|
983
|
+
return takeFromExternrefTable0(ret[0]);
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* `WebEffectRegistry.beginExport`, drawing on the CPU.
|
|
987
|
+
*
|
|
988
|
+
* # Errors
|
|
989
|
+
* Returns an error without a loaded project, for an empty range, an
|
|
990
|
+
* invalid frame rate, or an unknown codec.
|
|
991
|
+
* @param {bigint} start_ticks
|
|
992
|
+
* @param {bigint} end_ticks
|
|
993
|
+
* @param {number} rate_num
|
|
994
|
+
* @param {number} rate_den
|
|
995
|
+
* @param {string} codec
|
|
996
|
+
*/
|
|
997
|
+
beginExport(start_ticks, end_ticks, rate_num, rate_den, codec) {
|
|
998
|
+
const ptr0 = passStringToWasm0(codec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
999
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1000
|
+
const ret = wasm.webcpurenderer_beginExport(this.__wbg_ptr, start_ticks, end_ticks, rate_num, rate_den, ptr0, len0);
|
|
1001
|
+
if (ret[1]) {
|
|
1002
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
/**
|
|
1006
|
+
* The engine's effect and transition authoring catalog: every built-in
|
|
1007
|
+
* draws on the CPU.
|
|
1008
|
+
* @returns {string}
|
|
1009
|
+
*/
|
|
1010
|
+
builtinCatalog() {
|
|
1011
|
+
let deferred1_0;
|
|
1012
|
+
let deferred1_1;
|
|
1013
|
+
try {
|
|
1014
|
+
const ret = wasm.webcpurenderer_builtinCatalog(this.__wbg_ptr);
|
|
1015
|
+
deferred1_0 = ret[0];
|
|
1016
|
+
deferred1_1 = ret[1];
|
|
1017
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1018
|
+
} finally {
|
|
1019
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* What this renderer can do, in the shared capability report's JSON
|
|
1024
|
+
* with runtime `browser`: its "GPU" is the CPU (backend `cpu`),
|
|
1025
|
+
* `features` says `renderer.cpu` is available, `renderer.gpu` is not,
|
|
1026
|
+
* and runtime effects (`effects.runtime`) do not run.
|
|
1027
|
+
*
|
|
1028
|
+
* # Errors
|
|
1029
|
+
* Returns an error if the report cannot be serialized.
|
|
1030
|
+
* @returns {string}
|
|
1031
|
+
*/
|
|
1032
|
+
capabilityReport() {
|
|
1033
|
+
let deferred2_0;
|
|
1034
|
+
let deferred2_1;
|
|
1035
|
+
try {
|
|
1036
|
+
const ret = wasm.webcpurenderer_capabilityReport(this.__wbg_ptr);
|
|
1037
|
+
var ptr1 = ret[0];
|
|
1038
|
+
var len1 = ret[1];
|
|
1039
|
+
if (ret[3]) {
|
|
1040
|
+
ptr1 = 0; len1 = 0;
|
|
1041
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1042
|
+
}
|
|
1043
|
+
deferred2_0 = ptr1;
|
|
1044
|
+
deferred2_1 = len1;
|
|
1045
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1046
|
+
} finally {
|
|
1047
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
/**
|
|
1051
|
+
* Drops every source's retained audio.
|
|
1052
|
+
*/
|
|
1053
|
+
clearAudioSources() {
|
|
1054
|
+
wasm.webcpurenderer_clearAudioSources(this.__wbg_ptr);
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Releases every effect resource.
|
|
1058
|
+
*/
|
|
1059
|
+
clearEffectResources() {
|
|
1060
|
+
wasm.webcpurenderer_clearEffectResources(this.__wbg_ptr);
|
|
1061
|
+
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Does nothing: no runtime effect registers here.
|
|
1064
|
+
*/
|
|
1065
|
+
clearEffects() {
|
|
1066
|
+
wasm.webcpurenderer_clearEffects(this.__wbg_ptr);
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Drops every font, and the text drawn with them.
|
|
1070
|
+
*/
|
|
1071
|
+
clearFonts() {
|
|
1072
|
+
wasm.webcpurenderer_clearFonts(this.__wbg_ptr);
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Releases all uploaded frames, images, and retired generations.
|
|
1076
|
+
*/
|
|
1077
|
+
clearFrames() {
|
|
1078
|
+
wasm.webcpurenderer_clearFrames(this.__wbg_ptr);
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* Refused: a runtime effect is WGSL, which only a GPU runs.
|
|
1082
|
+
*
|
|
1083
|
+
* # Errors
|
|
1084
|
+
* Always rejects with `EFFECT_ERROR`.
|
|
1085
|
+
* @param {string} json
|
|
1086
|
+
* @returns {Promise<any>}
|
|
1087
|
+
*/
|
|
1088
|
+
compileEffect(json) {
|
|
1089
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1090
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1091
|
+
const ret = wasm.webcpurenderer_compileEffect(this.__wbg_ptr, ptr0, len0);
|
|
1092
|
+
if (ret[2]) {
|
|
1093
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1094
|
+
}
|
|
1095
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* Always `false`: the CPU renderer has no device to lose.
|
|
1099
|
+
* @returns {boolean}
|
|
1100
|
+
*/
|
|
1101
|
+
get deviceLost() {
|
|
1102
|
+
const ret = wasm.webcpurenderer_deviceLost(this.__wbg_ptr);
|
|
1103
|
+
return ret !== 0;
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* A JSON snapshot for developer tooling: what the CPU renderer drew,
|
|
1107
|
+
* its result cache, and the frames it holds.
|
|
1108
|
+
*
|
|
1109
|
+
* # Errors
|
|
1110
|
+
* Returns an error if the snapshot cannot be serialized.
|
|
1111
|
+
* @returns {string}
|
|
1112
|
+
*/
|
|
1113
|
+
diagnostics() {
|
|
1114
|
+
let deferred2_0;
|
|
1115
|
+
let deferred2_1;
|
|
1116
|
+
try {
|
|
1117
|
+
const ret = wasm.webcpurenderer_diagnostics(this.__wbg_ptr);
|
|
1118
|
+
var ptr1 = ret[0];
|
|
1119
|
+
var len1 = ret[1];
|
|
1120
|
+
if (ret[3]) {
|
|
1121
|
+
ptr1 = 0; len1 = 0;
|
|
1122
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1123
|
+
}
|
|
1124
|
+
deferred2_0 = ptr1;
|
|
1125
|
+
deferred2_1 = len1;
|
|
1126
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1127
|
+
} finally {
|
|
1128
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Ends the current export.
|
|
1133
|
+
*/
|
|
1134
|
+
endExport() {
|
|
1135
|
+
wasm.webcpurenderer_endExport(this.__wbg_ptr);
|
|
1136
|
+
}
|
|
1137
|
+
/**
|
|
1138
|
+
* `WebEffectRegistry.exportFrame`: the next export frame, drawn on the
|
|
1139
|
+
* CPU before the call returns.
|
|
1140
|
+
*
|
|
1141
|
+
* # Errors
|
|
1142
|
+
* Returns an error without a running export or a loaded project, or
|
|
1143
|
+
* when the frame cannot be drawn.
|
|
1144
|
+
* @returns {Promise<any>}
|
|
1145
|
+
*/
|
|
1146
|
+
exportFrame() {
|
|
1147
|
+
const ret = wasm.webcpurenderer_exportFrame(this.__wbg_ptr);
|
|
1148
|
+
if (ret[2]) {
|
|
1149
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1150
|
+
}
|
|
1151
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* `WebEffectRegistry.exportProgress`.
|
|
1155
|
+
*
|
|
1156
|
+
* # Errors
|
|
1157
|
+
* Returns an error when no export is running.
|
|
1158
|
+
* @returns {string}
|
|
1159
|
+
*/
|
|
1160
|
+
exportProgress() {
|
|
1161
|
+
let deferred2_0;
|
|
1162
|
+
let deferred2_1;
|
|
1163
|
+
try {
|
|
1164
|
+
const ret = wasm.webcpurenderer_exportProgress(this.__wbg_ptr);
|
|
1165
|
+
var ptr1 = ret[0];
|
|
1166
|
+
var len1 = ret[1];
|
|
1167
|
+
if (ret[3]) {
|
|
1168
|
+
ptr1 = 0; len1 = 0;
|
|
1169
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1170
|
+
}
|
|
1171
|
+
deferred2_0 = ptr1;
|
|
1172
|
+
deferred2_1 = len1;
|
|
1173
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1174
|
+
} finally {
|
|
1175
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* `WebEffectRegistry.frameNeeds`.
|
|
1180
|
+
*
|
|
1181
|
+
* # Errors
|
|
1182
|
+
* Fails without a project, or when the frame cannot be evaluated.
|
|
1183
|
+
* @param {bigint} time_ticks
|
|
1184
|
+
* @returns {string}
|
|
1185
|
+
*/
|
|
1186
|
+
frameNeeds(time_ticks) {
|
|
1187
|
+
let deferred2_0;
|
|
1188
|
+
let deferred2_1;
|
|
1189
|
+
try {
|
|
1190
|
+
const ret = wasm.webcpurenderer_frameNeeds(this.__wbg_ptr, time_ticks);
|
|
1191
|
+
var ptr1 = ret[0];
|
|
1192
|
+
var len1 = ret[1];
|
|
1193
|
+
if (ret[3]) {
|
|
1194
|
+
ptr1 = 0; len1 = 0;
|
|
1195
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1196
|
+
}
|
|
1197
|
+
deferred2_0 = ptr1;
|
|
1198
|
+
deferred2_1 = len1;
|
|
1199
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1200
|
+
} finally {
|
|
1201
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
1204
|
+
/**
|
|
1205
|
+
* Whether the loaded project declares `source_id` an HDR source.
|
|
1206
|
+
* @param {string} source_id
|
|
1207
|
+
* @returns {boolean}
|
|
1208
|
+
*/
|
|
1209
|
+
hdrSource(source_id) {
|
|
1210
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1211
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1212
|
+
const ret = wasm.webcpurenderer_hdrSource(this.__wbg_ptr, ptr0, len0);
|
|
1213
|
+
return ret !== 0;
|
|
1214
|
+
}
|
|
1215
|
+
/**
|
|
1216
|
+
* Whether the still `sourceId` is still the upload `generation` names.
|
|
1217
|
+
* @param {string} source_id
|
|
1218
|
+
* @param {bigint} generation
|
|
1219
|
+
* @returns {boolean}
|
|
1220
|
+
*/
|
|
1221
|
+
holdsImage(source_id, generation) {
|
|
1222
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1223
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1224
|
+
const ret = wasm.webcpurenderer_holdsImage(this.__wbg_ptr, ptr0, len0, generation);
|
|
1225
|
+
return ret !== 0;
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Loads and validates a versioned project document, keeping uploads
|
|
1229
|
+
* as `WebEffectRegistry.loadProject` does, and ends a running export.
|
|
1230
|
+
*
|
|
1231
|
+
* # Errors
|
|
1232
|
+
* Rejects a document the engine refuses.
|
|
1233
|
+
* @param {string} json
|
|
1234
|
+
*/
|
|
1235
|
+
loadProject(json) {
|
|
1236
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1237
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1238
|
+
const ret = wasm.webcpurenderer_loadProject(this.__wbg_ptr, ptr0, len0);
|
|
1239
|
+
if (ret[1]) {
|
|
1240
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* `WebEffectRegistry.loudnessReport`.
|
|
1245
|
+
* @returns {string}
|
|
1246
|
+
*/
|
|
1247
|
+
loudnessReport() {
|
|
1248
|
+
let deferred1_0;
|
|
1249
|
+
let deferred1_1;
|
|
1250
|
+
try {
|
|
1251
|
+
const ret = wasm.webcpurenderer_loudnessReport(this.__wbg_ptr);
|
|
1252
|
+
deferred1_0 = ret[0];
|
|
1253
|
+
deferred1_1 = ret[1];
|
|
1254
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1255
|
+
} finally {
|
|
1256
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* The loaded project's render size at the preview scale.
|
|
1261
|
+
*
|
|
1262
|
+
* # Errors
|
|
1263
|
+
* Fails when no project is loaded.
|
|
1264
|
+
* @returns {Uint32Array}
|
|
1265
|
+
*/
|
|
1266
|
+
get previewSize() {
|
|
1267
|
+
const ret = wasm.webcpurenderer_previewSize(this.__wbg_ptr);
|
|
1268
|
+
if (ret[3]) {
|
|
1269
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1270
|
+
}
|
|
1271
|
+
var v1 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
|
|
1272
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1273
|
+
return v1;
|
|
1274
|
+
}
|
|
1275
|
+
/**
|
|
1276
|
+
* Refused, as [`Self::compile_effect`] is.
|
|
1277
|
+
*
|
|
1278
|
+
* # Errors
|
|
1279
|
+
* Always throws `EFFECT_ERROR`.
|
|
1280
|
+
* @param {CompiledEffect} compiled
|
|
1281
|
+
* @returns {string}
|
|
1282
|
+
*/
|
|
1283
|
+
registerCompiledEffect(compiled) {
|
|
1284
|
+
let deferred3_0;
|
|
1285
|
+
let deferred3_1;
|
|
1286
|
+
try {
|
|
1287
|
+
_assertClass(compiled, CompiledEffect);
|
|
1288
|
+
var ptr0 = compiled.__destroy_into_raw();
|
|
1289
|
+
const ret = wasm.webcpurenderer_registerCompiledEffect(this.__wbg_ptr, ptr0);
|
|
1290
|
+
var ptr2 = ret[0];
|
|
1291
|
+
var len2 = ret[1];
|
|
1292
|
+
if (ret[3]) {
|
|
1293
|
+
ptr2 = 0; len2 = 0;
|
|
1294
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1295
|
+
}
|
|
1296
|
+
deferred3_0 = ptr2;
|
|
1297
|
+
deferred3_1 = len2;
|
|
1298
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1299
|
+
} finally {
|
|
1300
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Parses and keeps one `.cube` 3D LUT resource.
|
|
1305
|
+
*
|
|
1306
|
+
* # Errors
|
|
1307
|
+
* Rejects a cube the engine's parser refuses.
|
|
1308
|
+
* @param {string} id
|
|
1309
|
+
* @param {string} cube
|
|
1310
|
+
*/
|
|
1311
|
+
registerLut3d(id, cube) {
|
|
1312
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1313
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1314
|
+
const ptr1 = passStringToWasm0(cube, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1315
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1316
|
+
const ret = wasm.webcpurenderer_registerLut3d(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1317
|
+
if (ret[1]) {
|
|
1318
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* Drops one source's retained audio.
|
|
1323
|
+
* @param {string} source_id
|
|
1324
|
+
* @returns {boolean}
|
|
1325
|
+
*/
|
|
1326
|
+
releaseAudioSource(source_id) {
|
|
1327
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1328
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1329
|
+
const ret = wasm.webcpurenderer_releaseAudioSource(this.__wbg_ptr, ptr0, len0);
|
|
1330
|
+
return ret !== 0;
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Releases exactly one uploaded generation.
|
|
1334
|
+
* @param {bigint} generation
|
|
1335
|
+
* @returns {boolean}
|
|
1336
|
+
*/
|
|
1337
|
+
releaseFrameGeneration(generation) {
|
|
1338
|
+
const ret = wasm.webcpurenderer_releaseFrameGeneration(this.__wbg_ptr, generation);
|
|
1339
|
+
return ret !== 0;
|
|
1340
|
+
}
|
|
1341
|
+
/**
|
|
1342
|
+
* Releases an uploaded frame.
|
|
1343
|
+
* @param {string} source_id
|
|
1344
|
+
* @param {bigint} media_time_ticks
|
|
1345
|
+
* @returns {boolean}
|
|
1346
|
+
*/
|
|
1347
|
+
releaseFrame(source_id, media_time_ticks) {
|
|
1348
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1349
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1350
|
+
const ret = wasm.webcpurenderer_releaseFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks);
|
|
1351
|
+
return ret !== 0;
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Lets go of the drawn results kept for reuse and returns their bytes.
|
|
1355
|
+
* @returns {number}
|
|
1356
|
+
*/
|
|
1357
|
+
releaseIdleMemory() {
|
|
1358
|
+
const ret = wasm.webcpurenderer_releaseIdleMemory(this.__wbg_ptr);
|
|
1359
|
+
return ret;
|
|
1360
|
+
}
|
|
1361
|
+
/**
|
|
1362
|
+
* Releases every uploaded frame and the still of one source.
|
|
1363
|
+
* @param {string} source_id
|
|
1364
|
+
* @returns {boolean}
|
|
1365
|
+
*/
|
|
1366
|
+
releaseSourceFrames(source_id) {
|
|
1367
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1368
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1369
|
+
const ret = wasm.webcpurenderer_releaseSourceFrames(this.__wbg_ptr, ptr0, len0);
|
|
1370
|
+
return ret !== 0;
|
|
1371
|
+
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Draws one project frame at the preview quality and puts it on the
|
|
1374
|
+
* canvas's 2D context, scaled to the canvas, answering the JSON
|
|
1375
|
+
* `WebEffectRegistry.renderAt` answers. A frame equal to the one shown
|
|
1376
|
+
* is neither drawn nor put (`unchanged`).
|
|
1377
|
+
*
|
|
1378
|
+
* # Errors
|
|
1379
|
+
* Fails without a project, or when the frame cannot be drawn.
|
|
1380
|
+
* @param {bigint} time_ticks
|
|
1381
|
+
* @returns {string}
|
|
1382
|
+
*/
|
|
1383
|
+
renderAt(time_ticks) {
|
|
1384
|
+
let deferred2_0;
|
|
1385
|
+
let deferred2_1;
|
|
1386
|
+
try {
|
|
1387
|
+
const ret = wasm.webcpurenderer_renderAt(this.__wbg_ptr, time_ticks);
|
|
1388
|
+
var ptr1 = ret[0];
|
|
1389
|
+
var len1 = ret[1];
|
|
1390
|
+
if (ret[3]) {
|
|
1391
|
+
ptr1 = 0; len1 = 0;
|
|
1392
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1393
|
+
}
|
|
1394
|
+
deferred2_0 = ptr1;
|
|
1395
|
+
deferred2_1 = len1;
|
|
1396
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1397
|
+
} finally {
|
|
1398
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* `WebEffectRegistry.renderAudio`: the same mix, with no GPU.
|
|
1403
|
+
*
|
|
1404
|
+
* # Errors
|
|
1405
|
+
* As `WebEffectRegistry.renderAudio`.
|
|
1406
|
+
* @param {bigint} start_sample
|
|
1407
|
+
* @param {number} frames
|
|
1408
|
+
* @param {boolean} playing
|
|
1409
|
+
* @returns {Float32Array}
|
|
1410
|
+
*/
|
|
1411
|
+
renderAudio(start_sample, frames, playing) {
|
|
1412
|
+
const ret = wasm.webcpurenderer_renderAudio(this.__wbg_ptr, start_sample, frames, playing);
|
|
1413
|
+
if (ret[3]) {
|
|
1414
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1415
|
+
}
|
|
1416
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
1417
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1418
|
+
return v1;
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* Which renderer this is: `"cpu"`.
|
|
1422
|
+
* @returns {string}
|
|
1423
|
+
*/
|
|
1424
|
+
get renderer() {
|
|
1425
|
+
let deferred1_0;
|
|
1426
|
+
let deferred1_1;
|
|
1427
|
+
try {
|
|
1428
|
+
const ret = wasm.webcpurenderer_renderer(this.__wbg_ptr);
|
|
1429
|
+
deferred1_0 = ret[0];
|
|
1430
|
+
deferred1_1 = ret[1];
|
|
1431
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1432
|
+
} finally {
|
|
1433
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Clears every processor history after a seek or a transport stop.
|
|
1438
|
+
*/
|
|
1439
|
+
resetAudio() {
|
|
1440
|
+
wasm.webcpurenderer_resetAudio(this.__wbg_ptr);
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Drops the held preview frame after a seek.
|
|
1444
|
+
*/
|
|
1445
|
+
resetPlayer() {
|
|
1446
|
+
wasm.webcpurenderer_resetPlayer(this.__wbg_ptr);
|
|
1447
|
+
}
|
|
1448
|
+
/**
|
|
1449
|
+
* Sizes the canvas to `width` by `height`, which preview frames are
|
|
1450
|
+
* scaled to fill, and drops the held frame.
|
|
1451
|
+
*
|
|
1452
|
+
* # Errors
|
|
1453
|
+
* Fails without a canvas, or for a zero or oversized dimension.
|
|
1454
|
+
* @param {number} width
|
|
1455
|
+
* @param {number} height
|
|
1456
|
+
*/
|
|
1457
|
+
resizeSurface(width, height) {
|
|
1458
|
+
const ret = wasm.webcpurenderer_resizeSurface(this.__wbg_ptr, width, height);
|
|
1459
|
+
if (ret[1]) {
|
|
1460
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
/**
|
|
1464
|
+
* Replaced generations still awaiting explicit release.
|
|
1465
|
+
* @returns {number}
|
|
1466
|
+
*/
|
|
1467
|
+
get retiredFrameCount() {
|
|
1468
|
+
const ret = wasm.webcpurenderer_retiredFrameCount(this.__wbg_ptr);
|
|
1469
|
+
return ret >>> 0;
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* `WebEffectRegistry.setAudioContinuity`.
|
|
1473
|
+
*
|
|
1474
|
+
* # Errors
|
|
1475
|
+
* Rejects any other policy name.
|
|
1476
|
+
* @param {string} policy
|
|
1477
|
+
*/
|
|
1478
|
+
setAudioContinuity(policy) {
|
|
1479
|
+
const ptr0 = passStringToWasm0(policy, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1480
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1481
|
+
const ret = wasm.webcpurenderer_setAudioContinuity(this.__wbg_ptr, ptr0, len0);
|
|
1482
|
+
if (ret[1]) {
|
|
1483
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* `WebEffectRegistry.setLoudnessMetering`.
|
|
1488
|
+
*
|
|
1489
|
+
* # Errors
|
|
1490
|
+
* Returns an error without an audio renderer.
|
|
1491
|
+
* @param {boolean} enabled
|
|
1492
|
+
*/
|
|
1493
|
+
setLoudnessMetering(enabled) {
|
|
1494
|
+
const ret = wasm.webcpurenderer_setLoudnessMetering(this.__wbg_ptr, enabled);
|
|
1495
|
+
if (ret[1]) {
|
|
1496
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
/**
|
|
1500
|
+
* `WebEffectRegistry.setNormalizationGainDb`.
|
|
1501
|
+
*
|
|
1502
|
+
* # Errors
|
|
1503
|
+
* As `WebEffectRegistry.setNormalizationGainDb`.
|
|
1504
|
+
* @param {number} gain_db
|
|
1505
|
+
*/
|
|
1506
|
+
setNormalizationGainDb(gain_db) {
|
|
1507
|
+
const ret = wasm.webcpurenderer_setNormalizationGainDb(this.__wbg_ptr, gain_db);
|
|
1508
|
+
if (ret[1]) {
|
|
1509
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Does nothing: the CPU renderer times nothing per pass.
|
|
1514
|
+
* @param {boolean} _enabled
|
|
1515
|
+
*/
|
|
1516
|
+
setPassTiming(_enabled) {
|
|
1517
|
+
wasm.webcpurenderer_setPassTiming(this.__wbg_ptr, _enabled);
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Renders preview frames at `scale` times the project's size from now
|
|
1521
|
+
* on (0.5 until set).
|
|
1522
|
+
*
|
|
1523
|
+
* # Errors
|
|
1524
|
+
* Rejects a scale that is not finite, above 0 and at most 8.
|
|
1525
|
+
* @param {number} scale
|
|
1526
|
+
*/
|
|
1527
|
+
setPreviewScale(scale) {
|
|
1528
|
+
const ret = wasm.webcpurenderer_setPreviewScale(this.__wbg_ptr, scale);
|
|
1529
|
+
if (ret[1]) {
|
|
1530
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
/**
|
|
1534
|
+
* Lets drawn results occupy up to `bytes` of wasm memory to be found
|
|
1535
|
+
* again when a frame repeats; zero, the default, turns that off.
|
|
1536
|
+
*
|
|
1537
|
+
* # Errors
|
|
1538
|
+
* Rejects a negative or non-finite budget.
|
|
1539
|
+
* @param {number} bytes
|
|
1540
|
+
*/
|
|
1541
|
+
setResultCacheBudget(bytes) {
|
|
1542
|
+
const ret = wasm.webcpurenderer_setResultCacheBudget(this.__wbg_ptr, bytes);
|
|
1543
|
+
if (ret[1]) {
|
|
1544
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
/**
|
|
1548
|
+
* Sets the byte budget of uploaded frames (default 256 MiB, wasm
|
|
1549
|
+
* memory), as `WebEffectRegistry.setUploadedFrameBudget` does.
|
|
1550
|
+
*
|
|
1551
|
+
* # Errors
|
|
1552
|
+
* Rejects a negative or non-finite budget.
|
|
1553
|
+
* @param {number} bytes
|
|
1554
|
+
*/
|
|
1555
|
+
setUploadedFrameBudget(bytes) {
|
|
1556
|
+
const ret = wasm.webcpurenderer_setUploadedFrameBudget(this.__wbg_ptr, bytes);
|
|
1557
|
+
if (ret[1]) {
|
|
1558
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* The color the loaded project declares for `source_id`, as JSON.
|
|
1563
|
+
* @param {string} source_id
|
|
1564
|
+
* @returns {string | undefined}
|
|
1565
|
+
*/
|
|
1566
|
+
sourceColorMetadata(source_id) {
|
|
1567
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1568
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1569
|
+
const ret = wasm.webcpurenderer_sourceColorMetadata(this.__wbg_ptr, ptr0, len0);
|
|
1570
|
+
let v2;
|
|
1571
|
+
if (ret[0] !== 0) {
|
|
1572
|
+
v2 = getStringFromWasm0(ret[0], ret[1]);
|
|
1573
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1574
|
+
}
|
|
1575
|
+
return v2;
|
|
1576
|
+
}
|
|
1577
|
+
/**
|
|
1578
|
+
* A promise that resolves at once: the CPU renderer's work is done when
|
|
1579
|
+
* its call returns.
|
|
1580
|
+
* @returns {Promise<any>}
|
|
1581
|
+
*/
|
|
1582
|
+
submittedWorkDone() {
|
|
1583
|
+
const ret = wasm.webcpurenderer_submittedWorkDone(this.__wbg_ptr);
|
|
1584
|
+
return ret;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* `true`: decoded `VideoFrame`s are taken, as planes (`uploadYuvFrame`)
|
|
1588
|
+
* or through a 2D canvas.
|
|
1589
|
+
* @returns {boolean}
|
|
1590
|
+
*/
|
|
1591
|
+
get supportsExternalVideoFrame() {
|
|
1592
|
+
const ret = wasm.webcpurenderer_supportsExternalVideoFrame(this.__wbg_ptr);
|
|
1593
|
+
return ret !== 0;
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Discards `source_id`'s retained audio that ends before `ticks`.
|
|
1597
|
+
* @param {string} source_id
|
|
1598
|
+
* @param {bigint} ticks
|
|
1599
|
+
*/
|
|
1600
|
+
trimAudioBefore(source_id, ticks) {
|
|
1601
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1602
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1603
|
+
wasm.webcpurenderer_trimAudioBefore(this.__wbg_ptr, ptr0, len0, ticks);
|
|
1604
|
+
}
|
|
1605
|
+
/**
|
|
1606
|
+
* Releases `source_id`'s video frames older than `media_time_ticks`.
|
|
1607
|
+
* @param {string} source_id
|
|
1608
|
+
* @param {bigint} media_time_ticks
|
|
1609
|
+
*/
|
|
1610
|
+
trimFramesBefore(source_id, media_time_ticks) {
|
|
1611
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1612
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1613
|
+
wasm.webcpurenderer_trimFramesBefore(this.__wbg_ptr, ptr0, len0, media_time_ticks);
|
|
1614
|
+
}
|
|
1615
|
+
/**
|
|
1616
|
+
* Releases one effect resource.
|
|
1617
|
+
* @param {string} id
|
|
1618
|
+
* @returns {boolean}
|
|
1619
|
+
*/
|
|
1620
|
+
unregisterEffectResource(id) {
|
|
1621
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1622
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1623
|
+
const ret = wasm.webcpurenderer_unregisterEffectResource(this.__wbg_ptr, ptr0, len0);
|
|
1624
|
+
return ret !== 0;
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* `false`: no runtime effect registers here.
|
|
1628
|
+
* @param {string} _id
|
|
1629
|
+
* @param {number} _version
|
|
1630
|
+
* @returns {boolean}
|
|
1631
|
+
*/
|
|
1632
|
+
unregisterEffect(_id, _version) {
|
|
1633
|
+
const ptr0 = passStringToWasm0(_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1634
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1635
|
+
const ret = wasm.webcpurenderer_unregisterEffect(this.__wbg_ptr, ptr0, len0, _version);
|
|
1636
|
+
return ret !== 0;
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* `WebEffectRegistry.uploadAudioBlock`.
|
|
1640
|
+
*
|
|
1641
|
+
* # Errors
|
|
1642
|
+
* As `WebEffectRegistry.uploadAudioBlock`.
|
|
1643
|
+
* @param {string} source_id
|
|
1644
|
+
* @param {bigint} start_sample
|
|
1645
|
+
* @param {number} sample_rate
|
|
1646
|
+
* @param {any} layout
|
|
1647
|
+
* @param {Float32Array} samples
|
|
1648
|
+
* @param {boolean | null} [ends_source]
|
|
1649
|
+
*/
|
|
1650
|
+
uploadAudioBlock(source_id, start_sample, sample_rate, layout, samples, ends_source) {
|
|
1651
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1652
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1653
|
+
const ret = wasm.webcpurenderer_uploadAudioBlock(this.__wbg_ptr, ptr0, len0, start_sample, sample_rate, layout, samples, isLikeNone(ends_source) ? 0xFFFFFF : ends_source ? 1 : 0);
|
|
1654
|
+
if (ret[1]) {
|
|
1655
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
/**
|
|
1659
|
+
* [`Self::upload_presented_video_frame`] for a bitmap made with
|
|
1660
|
+
* `premultiplyAlpha: "none"`. Always closes `bitmap`.
|
|
1661
|
+
*
|
|
1662
|
+
* # Errors
|
|
1663
|
+
* As [`Self::upload_presented_video_frame`].
|
|
1664
|
+
* @param {string} source_id
|
|
1665
|
+
* @param {bigint} media_time_ticks
|
|
1666
|
+
* @param {ImageBitmap} bitmap
|
|
1667
|
+
* @param {number} output_width
|
|
1668
|
+
* @param {number} output_height
|
|
1669
|
+
* @param {number} rotation_degrees
|
|
1670
|
+
* @param {boolean} mirror
|
|
1671
|
+
* @returns {any}
|
|
1672
|
+
*/
|
|
1673
|
+
uploadPresentedImageBitmap(source_id, media_time_ticks, bitmap, output_width, output_height, rotation_degrees, mirror) {
|
|
1674
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1675
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1676
|
+
const ret = wasm.webcpurenderer_uploadPresentedImageBitmap(this.__wbg_ptr, ptr0, len0, media_time_ticks, bitmap, output_width, output_height, rotation_degrees, mirror);
|
|
1677
|
+
if (ret[2]) {
|
|
1678
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1679
|
+
}
|
|
1680
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* `WebEffectRegistry.uploadPresentedLinearFrame`.
|
|
1684
|
+
*
|
|
1685
|
+
* # Errors
|
|
1686
|
+
* Rejects pixels that do not hold the size, and a bad output size.
|
|
1687
|
+
* @param {string} source_id
|
|
1688
|
+
* @param {bigint} media_time_ticks
|
|
1689
|
+
* @param {number} width
|
|
1690
|
+
* @param {number} height
|
|
1691
|
+
* @param {Uint16Array} pixels
|
|
1692
|
+
* @param {number} output_width
|
|
1693
|
+
* @param {number} output_height
|
|
1694
|
+
* @returns {any}
|
|
1695
|
+
*/
|
|
1696
|
+
uploadPresentedLinearFrame(source_id, media_time_ticks, width, height, pixels, output_width, output_height) {
|
|
1697
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1698
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1699
|
+
const ptr1 = passArray16ToWasm0(pixels, wasm.__wbindgen_malloc);
|
|
1700
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1701
|
+
const ret = wasm.webcpurenderer_uploadPresentedLinearFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, width, height, ptr1, len1, output_width, output_height);
|
|
1702
|
+
if (ret[2]) {
|
|
1703
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1704
|
+
}
|
|
1705
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* `WebEffectRegistry.uploadPresentedLinearImage`.
|
|
1709
|
+
*
|
|
1710
|
+
* # Errors
|
|
1711
|
+
* As [`Self::upload_presented_linear_frame`].
|
|
1712
|
+
* @param {string} source_id
|
|
1713
|
+
* @param {number} width
|
|
1714
|
+
* @param {number} height
|
|
1715
|
+
* @param {Uint16Array} pixels
|
|
1716
|
+
* @param {number} output_width
|
|
1717
|
+
* @param {number} output_height
|
|
1718
|
+
* @returns {any}
|
|
1719
|
+
*/
|
|
1720
|
+
uploadPresentedLinearImage(source_id, width, height, pixels, output_width, output_height) {
|
|
1721
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1722
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1723
|
+
const ptr1 = passArray16ToWasm0(pixels, wasm.__wbindgen_malloc);
|
|
1724
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1725
|
+
const ret = wasm.webcpurenderer_uploadPresentedLinearImage(this.__wbg_ptr, ptr0, len0, width, height, ptr1, len1, output_width, output_height);
|
|
1726
|
+
if (ret[2]) {
|
|
1727
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1728
|
+
}
|
|
1729
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1730
|
+
}
|
|
1731
|
+
/**
|
|
1732
|
+
* `WebEffectRegistry.uploadPresentedRgbaFrame`.
|
|
1733
|
+
*
|
|
1734
|
+
* # Errors
|
|
1735
|
+
* Rejects pixels that do not hold the size, and a bad output size.
|
|
1736
|
+
* @param {string} source_id
|
|
1737
|
+
* @param {bigint} media_time_ticks
|
|
1738
|
+
* @param {number} width
|
|
1739
|
+
* @param {number} height
|
|
1740
|
+
* @param {Uint8Array} pixels
|
|
1741
|
+
* @param {boolean} premultiplied
|
|
1742
|
+
* @param {number} output_width
|
|
1743
|
+
* @param {number} output_height
|
|
1744
|
+
* @returns {any}
|
|
1745
|
+
*/
|
|
1746
|
+
uploadPresentedRgbaFrame(source_id, media_time_ticks, width, height, pixels, premultiplied, output_width, output_height) {
|
|
1747
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1748
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1749
|
+
const ptr1 = passArray8ToWasm0(pixels, wasm.__wbindgen_malloc);
|
|
1750
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1751
|
+
const ret = wasm.webcpurenderer_uploadPresentedRgbaFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, width, height, ptr1, len1, premultiplied, output_width, output_height);
|
|
1752
|
+
if (ret[2]) {
|
|
1753
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1754
|
+
}
|
|
1755
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* `WebEffectRegistry.uploadPresentedRgbaImage`.
|
|
1759
|
+
*
|
|
1760
|
+
* # Errors
|
|
1761
|
+
* As [`Self::upload_presented_rgba_frame`].
|
|
1762
|
+
* @param {string} source_id
|
|
1763
|
+
* @param {number} width
|
|
1764
|
+
* @param {number} height
|
|
1765
|
+
* @param {Uint8Array} pixels
|
|
1766
|
+
* @param {boolean} premultiplied
|
|
1767
|
+
* @param {number} output_width
|
|
1768
|
+
* @param {number} output_height
|
|
1769
|
+
* @returns {any}
|
|
1770
|
+
*/
|
|
1771
|
+
uploadPresentedRgbaImage(source_id, width, height, pixels, premultiplied, output_width, output_height) {
|
|
1772
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1773
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1774
|
+
const ptr1 = passArray8ToWasm0(pixels, wasm.__wbindgen_malloc);
|
|
1775
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1776
|
+
const ret = wasm.webcpurenderer_uploadPresentedRgbaImage(this.__wbg_ptr, ptr0, len0, width, height, ptr1, len1, premultiplied, output_width, output_height);
|
|
1777
|
+
if (ret[2]) {
|
|
1778
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1779
|
+
}
|
|
1780
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1781
|
+
}
|
|
1782
|
+
/**
|
|
1783
|
+
* `WebEffectRegistry.uploadPresentedVideoFrame`, the frame read through
|
|
1784
|
+
* a 2D canvas (the browser's conversion, as WebGL2's is). Always closes
|
|
1785
|
+
* `frame`; an HDR source's frame is refused (`uploadYuvFrame` takes it).
|
|
1786
|
+
*
|
|
1787
|
+
* # Errors
|
|
1788
|
+
* Rejects an HDR source's frame, a bad placement, and a frame the
|
|
1789
|
+
* browser cannot read.
|
|
1790
|
+
* @param {string} source_id
|
|
1791
|
+
* @param {bigint} media_time_ticks
|
|
1792
|
+
* @param {VideoFrame} frame
|
|
1793
|
+
* @param {number} output_width
|
|
1794
|
+
* @param {number} output_height
|
|
1795
|
+
* @param {number} rotation_degrees
|
|
1796
|
+
* @param {boolean} mirror
|
|
1797
|
+
* @returns {any}
|
|
1798
|
+
*/
|
|
1799
|
+
uploadPresentedVideoFrame(source_id, media_time_ticks, frame, output_width, output_height, rotation_degrees, mirror) {
|
|
1800
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1801
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1802
|
+
const ret = wasm.webcpurenderer_uploadPresentedVideoFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, frame, output_width, output_height, rotation_degrees, mirror);
|
|
1803
|
+
if (ret[2]) {
|
|
1804
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1805
|
+
}
|
|
1806
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* `WebEffectRegistry.uploadRgbaFrame`: premultiplied RGBA8 kept at its
|
|
1810
|
+
* own size.
|
|
1811
|
+
*
|
|
1812
|
+
* # Errors
|
|
1813
|
+
* Rejects pixels that do not hold the size.
|
|
1814
|
+
* @param {string} source_id
|
|
1815
|
+
* @param {bigint} media_time_ticks
|
|
1816
|
+
* @param {number} width
|
|
1817
|
+
* @param {number} height
|
|
1818
|
+
* @param {Uint8Array} pixels
|
|
1819
|
+
* @returns {any}
|
|
1820
|
+
*/
|
|
1821
|
+
uploadRgbaFrame(source_id, media_time_ticks, width, height, pixels) {
|
|
1822
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1823
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1824
|
+
const ptr1 = passArray8ToWasm0(pixels, wasm.__wbindgen_malloc);
|
|
1825
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1826
|
+
const ret = wasm.webcpurenderer_uploadRgbaFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, width, height, ptr1, len1);
|
|
1827
|
+
if (ret[2]) {
|
|
1828
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1829
|
+
}
|
|
1830
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* `WebEffectRegistry.uploadRgbaImage`: a still, premultiplied RGBA8 kept
|
|
1834
|
+
* at its own size.
|
|
1835
|
+
*
|
|
1836
|
+
* # Errors
|
|
1837
|
+
* Rejects pixels that do not hold the size.
|
|
1838
|
+
* @param {string} source_id
|
|
1839
|
+
* @param {number} width
|
|
1840
|
+
* @param {number} height
|
|
1841
|
+
* @param {Uint8Array} pixels
|
|
1842
|
+
* @returns {any}
|
|
1843
|
+
*/
|
|
1844
|
+
uploadRgbaImage(source_id, width, height, pixels) {
|
|
1845
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1846
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1847
|
+
const ptr1 = passArray8ToWasm0(pixels, wasm.__wbindgen_malloc);
|
|
1848
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1849
|
+
const ret = wasm.webcpurenderer_uploadRgbaImage(this.__wbg_ptr, ptr0, len0, width, height, ptr1, len1);
|
|
1850
|
+
if (ret[2]) {
|
|
1851
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1852
|
+
}
|
|
1853
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* `WebEffectRegistry.uploadVideoFrame`: the frame read through a 2D
|
|
1857
|
+
* canvas, fitted to the loaded project. Always closes `frame`.
|
|
1858
|
+
*
|
|
1859
|
+
* # Errors
|
|
1860
|
+
* Rejects an HDR source's frame and a frame the browser cannot read.
|
|
1861
|
+
* @param {string} source_id
|
|
1862
|
+
* @param {bigint} media_time_ticks
|
|
1863
|
+
* @param {VideoFrame} frame
|
|
1864
|
+
* @returns {any}
|
|
1865
|
+
*/
|
|
1866
|
+
uploadVideoFrame(source_id, media_time_ticks, frame) {
|
|
1867
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1868
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1869
|
+
const ret = wasm.webcpurenderer_uploadVideoFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, frame);
|
|
1870
|
+
if (ret[2]) {
|
|
1871
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1872
|
+
}
|
|
1873
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1874
|
+
}
|
|
1875
|
+
/**
|
|
1876
|
+
* `WebEffectRegistry.uploadYuvFrame`: a decoded frame's planes, as
|
|
1877
|
+
* `VideoFrame.copyTo` writes them, kept as they are and converted under
|
|
1878
|
+
* the project's color pipeline when a frame first draws them.
|
|
1879
|
+
*
|
|
1880
|
+
* # Errors
|
|
1881
|
+
* Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout
|
|
1882
|
+
* or plane that does not fit the data, a bad size or rotation, and an
|
|
1883
|
+
* HDR frame when the project's color pipeline refuses HDR sources.
|
|
1884
|
+
* @param {string} source_id
|
|
1885
|
+
* @param {bigint} media_time_ticks
|
|
1886
|
+
* @param {string} format
|
|
1887
|
+
* @param {number} coded_width
|
|
1888
|
+
* @param {number} coded_height
|
|
1889
|
+
* @param {Uint8Array} data
|
|
1890
|
+
* @param {Uint32Array} layout
|
|
1891
|
+
* @param {Uint32Array} visible
|
|
1892
|
+
* @param {number} display_width
|
|
1893
|
+
* @param {number} display_height
|
|
1894
|
+
* @param {string} color
|
|
1895
|
+
* @param {string} chroma_siting
|
|
1896
|
+
* @param {number} output_width
|
|
1897
|
+
* @param {number} output_height
|
|
1898
|
+
* @param {number} rotation_degrees
|
|
1899
|
+
* @param {boolean} mirror
|
|
1900
|
+
* @returns {any}
|
|
1901
|
+
*/
|
|
1902
|
+
uploadYuvFrame(source_id, media_time_ticks, format, coded_width, coded_height, data, layout, visible, display_width, display_height, color, chroma_siting, output_width, output_height, rotation_degrees, mirror) {
|
|
1903
|
+
const ptr0 = passStringToWasm0(source_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1904
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1905
|
+
const ptr1 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1906
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1907
|
+
const ptr2 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1908
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1909
|
+
const ptr3 = passArray32ToWasm0(layout, wasm.__wbindgen_malloc);
|
|
1910
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1911
|
+
const ptr4 = passArray32ToWasm0(visible, wasm.__wbindgen_malloc);
|
|
1912
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1913
|
+
const ptr5 = passStringToWasm0(color, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1914
|
+
const len5 = WASM_VECTOR_LEN;
|
|
1915
|
+
const ptr6 = passStringToWasm0(chroma_siting, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1916
|
+
const len6 = WASM_VECTOR_LEN;
|
|
1917
|
+
const ret = wasm.webcpurenderer_uploadYuvFrame(this.__wbg_ptr, ptr0, len0, media_time_ticks, ptr1, len1, coded_width, coded_height, ptr2, len2, ptr3, len3, ptr4, len4, display_width, display_height, ptr5, len5, ptr6, len6, output_width, output_height, rotation_degrees, mirror);
|
|
1918
|
+
if (ret[2]) {
|
|
1919
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1920
|
+
}
|
|
1921
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1922
|
+
}
|
|
1923
|
+
/**
|
|
1924
|
+
* Bytes the uploaded frames hold, their pictures counted once drawn.
|
|
1925
|
+
* @returns {bigint}
|
|
1926
|
+
*/
|
|
1927
|
+
get uploadedFrameBytes() {
|
|
1928
|
+
const ret = wasm.webcpurenderer_uploadedFrameBytes(this.__wbg_ptr);
|
|
1929
|
+
return BigInt.asUintN(64, ret);
|
|
1930
|
+
}
|
|
1931
|
+
/**
|
|
1932
|
+
* Frames the binding holds.
|
|
1933
|
+
* @returns {number}
|
|
1934
|
+
*/
|
|
1935
|
+
get uploadedFrameCount() {
|
|
1936
|
+
const ret = wasm.webcpurenderer_uploadedFrameCount(this.__wbg_ptr);
|
|
1937
|
+
return ret >>> 0;
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* `"canvas"`: frames passed as `VideoFrame`s are read through a 2D
|
|
1941
|
+
* canvas.
|
|
1942
|
+
* @returns {string}
|
|
1943
|
+
*/
|
|
1944
|
+
get videoFrameCopy() {
|
|
1945
|
+
let deferred1_0;
|
|
1946
|
+
let deferred1_1;
|
|
1947
|
+
try {
|
|
1948
|
+
const ret = wasm.webcpurenderer_videoFrameCopy(this.__wbg_ptr);
|
|
1949
|
+
deferred1_0 = ret[0];
|
|
1950
|
+
deferred1_1 = ret[1];
|
|
1951
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1952
|
+
} finally {
|
|
1953
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
if (Symbol.dispose) WebCpuRenderer.prototype[Symbol.dispose] = WebCpuRenderer.prototype.free;
|
|
1958
|
+
|
|
765
1959
|
/**
|
|
766
1960
|
* WebGPU-owned runtime effect registry for worker hosts.
|
|
767
1961
|
*/
|
|
@@ -1071,7 +2265,9 @@ export class WebEffectRegistry {
|
|
|
1071
2265
|
* What this renderer can do, as the shared capability report's JSON
|
|
1072
2266
|
* (`alpha2-capabilities`) with runtime `browser`. Decoding, encoding,
|
|
1073
2267
|
* and page features are the page's to add: `decode` and `encode` are
|
|
1074
|
-
* `null
|
|
2268
|
+
* `null`, and `features` names only the renderer's own: `renderer.gpu`
|
|
2269
|
+
* (this one), `renderer.cpu` and `effects.runtime`, as the native host
|
|
2270
|
+
* names them.
|
|
1075
2271
|
*
|
|
1076
2272
|
* # Errors
|
|
1077
2273
|
* Returns an error if the report cannot be serialized.
|
|
@@ -1150,6 +2346,27 @@ export class WebEffectRegistry {
|
|
|
1150
2346
|
}
|
|
1151
2347
|
return takeFromExternrefTable0(ret[0]);
|
|
1152
2348
|
}
|
|
2349
|
+
/**
|
|
2350
|
+
* Creates the renderer that draws on the CPU, for a browser that offers
|
|
2351
|
+
* no WebGPU adapter and no WebGL2 context, or a page that asks for it.
|
|
2352
|
+
* It needs no GPU: it presents preview frames on `canvas`'s 2D context
|
|
2353
|
+
* (an `OffscreenCanvas` or a page canvas, `undefined` for none) and
|
|
2354
|
+
* packs export frames in wasm, single-threaded, drawing what the native
|
|
2355
|
+
* CPU renderer draws byte for byte. Runtime WGSL effects are refused.
|
|
2356
|
+
*
|
|
2357
|
+
* # Errors
|
|
2358
|
+
* Rejects (`INVALID_INPUT`) a canvas that has no 2D context, such as
|
|
2359
|
+
* one that already holds a WebGL or WebGPU context.
|
|
2360
|
+
* @param {any} canvas
|
|
2361
|
+
* @returns {WebCpuRenderer}
|
|
2362
|
+
*/
|
|
2363
|
+
static createCpu(canvas) {
|
|
2364
|
+
const ret = wasm.webeffectregistry_createCpu(canvas);
|
|
2365
|
+
if (ret[2]) {
|
|
2366
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2367
|
+
}
|
|
2368
|
+
return WebCpuRenderer.__wrap(ret[0]);
|
|
2369
|
+
}
|
|
1153
2370
|
/**
|
|
1154
2371
|
* Creates a worker-owned renderer compatible with an `OffscreenCanvas`.
|
|
1155
2372
|
*
|
|
@@ -1569,6 +2786,22 @@ export class WebEffectRegistry {
|
|
|
1569
2786
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1570
2787
|
return v1;
|
|
1571
2788
|
}
|
|
2789
|
+
/**
|
|
2790
|
+
* Which renderer this is: `"gpu"` (WebGPU or WebGL2).
|
|
2791
|
+
* @returns {string}
|
|
2792
|
+
*/
|
|
2793
|
+
get renderer() {
|
|
2794
|
+
let deferred1_0;
|
|
2795
|
+
let deferred1_1;
|
|
2796
|
+
try {
|
|
2797
|
+
const ret = wasm.webeffectregistry_renderer(this.__wbg_ptr);
|
|
2798
|
+
deferred1_0 = ret[0];
|
|
2799
|
+
deferred1_1 = ret[1];
|
|
2800
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
2801
|
+
} finally {
|
|
2802
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
1572
2805
|
/**
|
|
1573
2806
|
* Clears every processor history after a seek or a transport stop.
|
|
1574
2807
|
*/
|
|
@@ -2922,17 +4155,34 @@ function __wbg_get_imports() {
|
|
|
2922
4155
|
__wbg_addEventListener_9534e2dc12044ee4: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
2923
4156
|
arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3);
|
|
2924
4157
|
}, arguments); },
|
|
2925
|
-
|
|
4158
|
+
__wbg_alpha2BitmapUploadsPremultiplied_11d638014bcd9db6: function() { return handleError(function () {
|
|
2926
4159
|
const ret = alpha2BitmapUploadsPremultiplied();
|
|
2927
4160
|
return ret;
|
|
2928
4161
|
}, arguments); },
|
|
2929
|
-
|
|
4162
|
+
__wbg_alpha2Canvas2d_7c53224793d83297: function() { return handleError(function (arg0) {
|
|
4163
|
+
const ret = alpha2Canvas2d(arg0);
|
|
4164
|
+
return ret;
|
|
4165
|
+
}, arguments); },
|
|
4166
|
+
__wbg_alpha2CopyExternalImage_85d06101809c56a3: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
2930
4167
|
alpha2CopyExternalImage(arg0, arg1, arg2, arg3 >>> 0, arg4 >>> 0);
|
|
2931
4168
|
}, arguments); },
|
|
2932
|
-
|
|
4169
|
+
__wbg_alpha2FrameBitmap_8b4ad7a0a0c77797: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2933
4170
|
const ret = alpha2FrameBitmap(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
2934
4171
|
return ret;
|
|
2935
4172
|
}, arguments); },
|
|
4173
|
+
__wbg_alpha2ImagePixels_01c946ed0a5a2aff: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4174
|
+
const ret = alpha2ImagePixels(arg1, arg2 >>> 0, arg3 >>> 0);
|
|
4175
|
+
const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
|
|
4176
|
+
const len1 = WASM_VECTOR_LEN;
|
|
4177
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4178
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4179
|
+
}, arguments); },
|
|
4180
|
+
__wbg_alpha2PutRgba_3c12864b6d5b5ea1: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
4181
|
+
alpha2PutRgba(arg0, getArrayU8FromWasm0(arg1, arg2), arg3 >>> 0, arg4 >>> 0);
|
|
4182
|
+
}, arguments); },
|
|
4183
|
+
__wbg_alpha2ResizeCanvas_48bb58d4d55717f1: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4184
|
+
alpha2ResizeCanvas(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
4185
|
+
}, arguments); },
|
|
2936
4186
|
__wbg_attachShader_74ecf95efc73ee58: function(arg0, arg1, arg2) {
|
|
2937
4187
|
arg0.attachShader(arg1, arg2);
|
|
2938
4188
|
},
|
|
@@ -5119,47 +6369,47 @@ function __wbg_get_imports() {
|
|
|
5119
6369
|
arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
|
|
5120
6370
|
}, arguments); },
|
|
5121
6371
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
5122
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
6372
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3759, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
5123
6373
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_);
|
|
5124
6374
|
return ret;
|
|
5125
6375
|
},
|
|
5126
6376
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
5127
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx:
|
|
6377
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 353, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
5128
6378
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___web_sys_9e2ae0ace5131457___features__gen_Event__Event______true_);
|
|
5129
6379
|
return ret;
|
|
5130
6380
|
},
|
|
5131
6381
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
5132
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUCompilationInfo")], shim_idx:
|
|
6382
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUCompilationInfo")], shim_idx: 1537, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
5133
6383
|
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_);
|
|
5134
6384
|
return ret;
|
|
5135
6385
|
},
|
|
5136
6386
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
5137
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
5138
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6387
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 1537, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6388
|
+
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__220);
|
|
5139
6389
|
return ret;
|
|
5140
6390
|
},
|
|
5141
6391
|
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
5142
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
6392
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 1540, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
5143
6393
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
|
|
5144
6394
|
return ret;
|
|
5145
6395
|
},
|
|
5146
6396
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
5147
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx:
|
|
5148
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6397
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 1540, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
6398
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__222);
|
|
5149
6399
|
return ret;
|
|
5150
6400
|
},
|
|
5151
6401
|
__wbindgen_generic_0000000000000007: function(arg0, arg1) {
|
|
5152
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
5153
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6402
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 1537, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6403
|
+
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__223);
|
|
5154
6404
|
return ret;
|
|
5155
6405
|
},
|
|
5156
6406
|
__wbindgen_generic_0000000000000008: function(arg0, arg1) {
|
|
5157
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
5158
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6407
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 1537, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
6408
|
+
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__224);
|
|
5159
6409
|
return ret;
|
|
5160
6410
|
},
|
|
5161
6411
|
__wbindgen_generic_0000000000000009: function(arg0, arg1) {
|
|
5162
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
6412
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 355, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
5163
6413
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke_______true_);
|
|
5164
6414
|
return ret;
|
|
5165
6415
|
},
|
|
@@ -5226,8 +6476,8 @@ function __wbg_get_imports() {
|
|
|
5226
6476
|
return {
|
|
5227
6477
|
__proto__: null,
|
|
5228
6478
|
"./alpha2_wasm_bg.js": import0,
|
|
5229
|
-
"./snippets/alpha2-wasm-
|
|
5230
|
-
"./snippets/alpha2-wasm-
|
|
6479
|
+
"./snippets/alpha2-wasm-57b04ecc6db57e1f/inline1.js": import1,
|
|
6480
|
+
"./snippets/alpha2-wasm-57b04ecc6db57e1f/inline1.js": import2,
|
|
5231
6481
|
};
|
|
5232
6482
|
}
|
|
5233
6483
|
|
|
@@ -5243,8 +6493,8 @@ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46
|
|
|
5243
6493
|
wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_(arg0, arg1, arg2);
|
|
5244
6494
|
}
|
|
5245
6495
|
|
|
5246
|
-
function
|
|
5247
|
-
wasm.
|
|
6496
|
+
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__222(arg0, arg1, arg2) {
|
|
6497
|
+
wasm.wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__222(arg0, arg1, arg2);
|
|
5248
6498
|
}
|
|
5249
6499
|
|
|
5250
6500
|
function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_(arg0, arg1, arg2) {
|
|
@@ -5261,22 +6511,22 @@ function wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bin
|
|
|
5261
6511
|
}
|
|
5262
6512
|
}
|
|
5263
6513
|
|
|
5264
|
-
function
|
|
5265
|
-
const ret = wasm.
|
|
6514
|
+
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__220(arg0, arg1, arg2) {
|
|
6515
|
+
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__220(arg0, arg1, arg2);
|
|
5266
6516
|
if (ret[1]) {
|
|
5267
6517
|
throw takeFromExternrefTable0(ret[0]);
|
|
5268
6518
|
}
|
|
5269
6519
|
}
|
|
5270
6520
|
|
|
5271
|
-
function
|
|
5272
|
-
const ret = wasm.
|
|
6521
|
+
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__223(arg0, arg1, arg2) {
|
|
6522
|
+
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__223(arg0, arg1, arg2);
|
|
5273
6523
|
if (ret[1]) {
|
|
5274
6524
|
throw takeFromExternrefTable0(ret[0]);
|
|
5275
6525
|
}
|
|
5276
6526
|
}
|
|
5277
6527
|
|
|
5278
|
-
function
|
|
5279
|
-
const ret = wasm.
|
|
6528
|
+
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__224(arg0, arg1, arg2) {
|
|
6529
|
+
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__224(arg0, arg1, arg2);
|
|
5280
6530
|
if (ret[1]) {
|
|
5281
6531
|
throw takeFromExternrefTable0(ret[0]);
|
|
5282
6532
|
}
|
|
@@ -5411,6 +6661,9 @@ const WaveformBuilderFinalization = (typeof FinalizationRegistry === 'undefined'
|
|
|
5411
6661
|
const WaveformResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5412
6662
|
? { register: () => {}, unregister: () => {} }
|
|
5413
6663
|
: new FinalizationRegistry(ptr => wasm.__wbg_waveformresult_free(ptr, 1));
|
|
6664
|
+
const WebCpuRendererFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
6665
|
+
? { register: () => {}, unregister: () => {} }
|
|
6666
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_webcpurenderer_free(ptr, 1));
|
|
5414
6667
|
const WebEffectRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5415
6668
|
? { register: () => {}, unregister: () => {} }
|
|
5416
6669
|
: new FinalizationRegistry(ptr => wasm.__wbg_webeffectregistry_free(ptr, 1));
|