libbitsub 1.4.1 → 1.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 +2 -0
- package/dist/ts/webgpu-renderer.d.ts.map +1 -1
- package/dist/ts/webgpu-renderer.js +20 -15
- package/dist/ts/webgpu-renderer.js.map +1 -1
- package/package.json +3 -3
- package/pkg/README.md +2 -0
- package/pkg/libbitsub.d.ts +317 -296
- package/pkg/libbitsub.js +403 -405
- package/pkg/libbitsub_bg.wasm +0 -0
- package/pkg/package.json +1 -1
package/pkg/libbitsub.d.ts
CHANGED
|
@@ -1,243 +1,264 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* PGS subtitle parser and renderer exposed to JavaScript.
|
|
6
|
+
*/
|
|
4
7
|
export class PgsParser {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
8
|
+
free(): void;
|
|
9
|
+
[Symbol.dispose](): void;
|
|
10
|
+
/**
|
|
11
|
+
* Clear the internal cache.
|
|
12
|
+
*/
|
|
13
|
+
clearCache(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Find the display set index for a given timestamp in milliseconds.
|
|
16
|
+
*/
|
|
17
|
+
findIndexAtTimestamp(time_ms: number): number;
|
|
18
|
+
/**
|
|
19
|
+
* Get all timestamps in milliseconds as a Float64Array.
|
|
20
|
+
*/
|
|
21
|
+
getTimestamps(): Float64Array;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new PGS parser.
|
|
24
|
+
*/
|
|
25
|
+
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Parse a PGS file from binary data.
|
|
28
|
+
* Returns the number of display sets parsed.
|
|
29
|
+
*/
|
|
30
|
+
parse(data: Uint8Array): number;
|
|
31
|
+
/**
|
|
32
|
+
* Render subtitle at the given index and return RGBA data.
|
|
33
|
+
* Returns null if index is invalid or no subtitle data.
|
|
34
|
+
*/
|
|
35
|
+
renderAtIndex(index: number): SubtitleFrame | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Get the number of display sets.
|
|
38
|
+
*/
|
|
39
|
+
readonly count: number;
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Unified render result for both formats.
|
|
44
|
+
*/
|
|
39
45
|
export class RenderResult {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
46
|
+
private constructor();
|
|
47
|
+
free(): void;
|
|
48
|
+
[Symbol.dispose](): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get composition height at index.
|
|
51
|
+
*/
|
|
52
|
+
getCompositionHeight(index: number): number;
|
|
53
|
+
/**
|
|
54
|
+
* Get composition RGBA data at index.
|
|
55
|
+
*/
|
|
56
|
+
getCompositionRgba(index: number): Uint8Array;
|
|
57
|
+
/**
|
|
58
|
+
* Get composition width at index.
|
|
59
|
+
*/
|
|
60
|
+
getCompositionWidth(index: number): number;
|
|
61
|
+
/**
|
|
62
|
+
* Get composition X position at index.
|
|
63
|
+
*/
|
|
64
|
+
getCompositionX(index: number): number;
|
|
65
|
+
/**
|
|
66
|
+
* Get composition Y position at index.
|
|
67
|
+
*/
|
|
68
|
+
getCompositionY(index: number): number;
|
|
69
|
+
/**
|
|
70
|
+
* Get the number of composition elements.
|
|
71
|
+
*/
|
|
72
|
+
readonly compositionCount: number;
|
|
73
|
+
readonly screenHeight: number;
|
|
74
|
+
readonly screenWidth: number;
|
|
69
75
|
}
|
|
70
76
|
|
|
77
|
+
/**
|
|
78
|
+
* A single subtitle composition element.
|
|
79
|
+
*/
|
|
71
80
|
export class SubtitleComposition {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
private constructor();
|
|
82
|
+
free(): void;
|
|
83
|
+
[Symbol.dispose](): void;
|
|
84
|
+
/**
|
|
85
|
+
* Get RGBA pixel data as Uint8Array.
|
|
86
|
+
*/
|
|
87
|
+
getRgba(): Uint8Array;
|
|
88
|
+
readonly height: number;
|
|
89
|
+
readonly width: number;
|
|
90
|
+
readonly x: number;
|
|
91
|
+
readonly y: number;
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
/**
|
|
86
95
|
* Subtitle format type.
|
|
87
96
|
*/
|
|
88
97
|
export enum SubtitleFormat {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
/**
|
|
99
|
+
* PGS (Blu-ray) subtitle format
|
|
100
|
+
*/
|
|
101
|
+
Pgs = 0,
|
|
102
|
+
/**
|
|
103
|
+
* VobSub (DVD) subtitle format
|
|
104
|
+
*/
|
|
105
|
+
VobSub = 1,
|
|
97
106
|
}
|
|
98
107
|
|
|
108
|
+
/**
|
|
109
|
+
* A complete subtitle frame with all compositions.
|
|
110
|
+
*/
|
|
99
111
|
export class SubtitleFrame {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
private constructor();
|
|
113
|
+
free(): void;
|
|
114
|
+
[Symbol.dispose](): void;
|
|
115
|
+
/**
|
|
116
|
+
* Get a composition by index.
|
|
117
|
+
*/
|
|
118
|
+
getComposition(index: number): SubtitleComposition | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Get the number of compositions.
|
|
121
|
+
*/
|
|
122
|
+
readonly compositionCount: number;
|
|
123
|
+
readonly height: number;
|
|
124
|
+
readonly width: number;
|
|
113
125
|
}
|
|
114
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Unified subtitle renderer for both PGS and VobSub formats.
|
|
129
|
+
*/
|
|
115
130
|
export class SubtitleRenderer {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
131
|
+
free(): void;
|
|
132
|
+
[Symbol.dispose](): void;
|
|
133
|
+
/**
|
|
134
|
+
* Clear internal caches.
|
|
135
|
+
*/
|
|
136
|
+
clearCache(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Dispose of all resources.
|
|
139
|
+
*/
|
|
140
|
+
dispose(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Find the subtitle index for a given timestamp in milliseconds.
|
|
143
|
+
*/
|
|
144
|
+
findIndexAtTimestamp(time_ms: number): number;
|
|
145
|
+
/**
|
|
146
|
+
* Get all timestamps in milliseconds.
|
|
147
|
+
*/
|
|
148
|
+
getTimestamps(): Float64Array;
|
|
149
|
+
/**
|
|
150
|
+
* Load PGS subtitle data.
|
|
151
|
+
*/
|
|
152
|
+
loadPgs(data: Uint8Array): number;
|
|
153
|
+
/**
|
|
154
|
+
* Load VobSub subtitle data from IDX and SUB.
|
|
155
|
+
*/
|
|
156
|
+
loadVobSub(idx_content: string, sub_data: Uint8Array): void;
|
|
157
|
+
/**
|
|
158
|
+
* Load VobSub from SUB file only.
|
|
159
|
+
*/
|
|
160
|
+
loadVobSubOnly(sub_data: Uint8Array): void;
|
|
161
|
+
/**
|
|
162
|
+
* Create a new subtitle renderer.
|
|
163
|
+
*/
|
|
164
|
+
constructor();
|
|
165
|
+
/**
|
|
166
|
+
* Render subtitle at the given index.
|
|
167
|
+
* Returns a unified RenderResult or null.
|
|
168
|
+
*/
|
|
169
|
+
renderAtIndex(index: number): RenderResult | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* Render subtitle at the given timestamp in seconds.
|
|
172
|
+
*/
|
|
173
|
+
renderAtTimestamp(time_seconds: number): RenderResult | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Get the number of subtitle entries.
|
|
176
|
+
*/
|
|
177
|
+
readonly count: number;
|
|
178
|
+
/**
|
|
179
|
+
* Get the current subtitle format.
|
|
180
|
+
*/
|
|
181
|
+
readonly format: SubtitleFormat | undefined;
|
|
167
182
|
}
|
|
168
183
|
|
|
184
|
+
/**
|
|
185
|
+
* A VobSub subtitle frame.
|
|
186
|
+
*/
|
|
169
187
|
export class VobSubFrame {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
188
|
+
private constructor();
|
|
189
|
+
free(): void;
|
|
190
|
+
[Symbol.dispose](): void;
|
|
191
|
+
/**
|
|
192
|
+
* Get RGBA pixel data as Uint8Array.
|
|
193
|
+
*/
|
|
194
|
+
getRgba(): Uint8Array;
|
|
195
|
+
readonly height: number;
|
|
196
|
+
readonly screenHeight: number;
|
|
197
|
+
readonly screenWidth: number;
|
|
198
|
+
readonly width: number;
|
|
199
|
+
readonly x: number;
|
|
200
|
+
readonly y: number;
|
|
183
201
|
}
|
|
184
202
|
|
|
203
|
+
/**
|
|
204
|
+
* VobSub subtitle parser and renderer exposed to JavaScript.
|
|
205
|
+
*/
|
|
185
206
|
export class VobSubParser {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
207
|
+
free(): void;
|
|
208
|
+
[Symbol.dispose](): void;
|
|
209
|
+
/**
|
|
210
|
+
* Clear the internal cache.
|
|
211
|
+
*/
|
|
212
|
+
clearCache(): void;
|
|
213
|
+
/**
|
|
214
|
+
* Dispose of all resources.
|
|
215
|
+
*/
|
|
216
|
+
dispose(): void;
|
|
217
|
+
/**
|
|
218
|
+
* Find the subtitle index for a given timestamp in milliseconds.
|
|
219
|
+
* Returns -1 if no subtitle should be displayed at this time.
|
|
220
|
+
*/
|
|
221
|
+
findIndexAtTimestamp(time_ms: number): number;
|
|
222
|
+
/**
|
|
223
|
+
* Get all timestamps in milliseconds as a Float64Array.
|
|
224
|
+
*/
|
|
225
|
+
getTimestamps(): Float64Array;
|
|
226
|
+
/**
|
|
227
|
+
* Load VobSub from IDX content and SUB data.
|
|
228
|
+
*/
|
|
229
|
+
loadFromData(idx_content: string, sub_data: Uint8Array): void;
|
|
230
|
+
/**
|
|
231
|
+
* Load VobSub from SUB file only (scans for timestamps).
|
|
232
|
+
*/
|
|
233
|
+
loadFromSubOnly(sub_data: Uint8Array): void;
|
|
234
|
+
/**
|
|
235
|
+
* Create a new VobSub parser.
|
|
236
|
+
*/
|
|
237
|
+
constructor();
|
|
238
|
+
/**
|
|
239
|
+
* Render subtitle at the given index and return RGBA data.
|
|
240
|
+
*/
|
|
241
|
+
renderAtIndex(index: number): VobSubFrame | undefined;
|
|
242
|
+
/**
|
|
243
|
+
* Enable or disable debanding.
|
|
244
|
+
*/
|
|
245
|
+
setDebandEnabled(enabled: boolean): void;
|
|
246
|
+
/**
|
|
247
|
+
* Set the deband sample range in pixels (default: 15).
|
|
248
|
+
*/
|
|
249
|
+
setDebandRange(range: number): void;
|
|
250
|
+
/**
|
|
251
|
+
* Set the deband threshold (0.0-255.0, default: 64.0).
|
|
252
|
+
*/
|
|
253
|
+
setDebandThreshold(threshold: number): void;
|
|
254
|
+
/**
|
|
255
|
+
* Get the number of subtitle entries.
|
|
256
|
+
*/
|
|
257
|
+
readonly count: number;
|
|
258
|
+
/**
|
|
259
|
+
* Check if debanding is enabled.
|
|
260
|
+
*/
|
|
261
|
+
readonly debandEnabled: boolean;
|
|
241
262
|
}
|
|
242
263
|
|
|
243
264
|
/**
|
|
@@ -248,96 +269,96 @@ export function init(): void;
|
|
|
248
269
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
249
270
|
|
|
250
271
|
export interface InitOutput {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
272
|
+
readonly memory: WebAssembly.Memory;
|
|
273
|
+
readonly __wbg_pgsparser_free: (a: number, b: number) => void;
|
|
274
|
+
readonly __wbg_renderresult_free: (a: number, b: number) => void;
|
|
275
|
+
readonly __wbg_subtitlecomposition_free: (a: number, b: number) => void;
|
|
276
|
+
readonly __wbg_subtitlerenderer_free: (a: number, b: number) => void;
|
|
277
|
+
readonly __wbg_vobsubframe_free: (a: number, b: number) => void;
|
|
278
|
+
readonly __wbg_vobsubparser_free: (a: number, b: number) => void;
|
|
279
|
+
readonly init: () => void;
|
|
280
|
+
readonly pgsparser_clearCache: (a: number) => void;
|
|
281
|
+
readonly pgsparser_count: (a: number) => number;
|
|
282
|
+
readonly pgsparser_findIndexAtTimestamp: (a: number, b: number) => number;
|
|
283
|
+
readonly pgsparser_getTimestamps: (a: number) => any;
|
|
284
|
+
readonly pgsparser_new: () => number;
|
|
285
|
+
readonly pgsparser_parse: (a: number, b: number, c: number) => number;
|
|
286
|
+
readonly pgsparser_renderAtIndex: (a: number, b: number) => number;
|
|
287
|
+
readonly renderresult_compositionCount: (a: number) => number;
|
|
288
|
+
readonly renderresult_getCompositionHeight: (a: number, b: number) => number;
|
|
289
|
+
readonly renderresult_getCompositionRgba: (a: number, b: number) => any;
|
|
290
|
+
readonly renderresult_getCompositionWidth: (a: number, b: number) => number;
|
|
291
|
+
readonly renderresult_getCompositionX: (a: number, b: number) => number;
|
|
292
|
+
readonly renderresult_getCompositionY: (a: number, b: number) => number;
|
|
293
|
+
readonly renderresult_screenHeight: (a: number) => number;
|
|
294
|
+
readonly renderresult_screenWidth: (a: number) => number;
|
|
295
|
+
readonly subtitlecomposition_getRgba: (a: number) => any;
|
|
296
|
+
readonly subtitlecomposition_height: (a: number) => number;
|
|
297
|
+
readonly subtitlecomposition_width: (a: number) => number;
|
|
298
|
+
readonly subtitlecomposition_x: (a: number) => number;
|
|
299
|
+
readonly subtitlecomposition_y: (a: number) => number;
|
|
300
|
+
readonly subtitleframe_getComposition: (a: number, b: number) => number;
|
|
301
|
+
readonly subtitlerenderer_clearCache: (a: number) => void;
|
|
302
|
+
readonly subtitlerenderer_count: (a: number) => number;
|
|
303
|
+
readonly subtitlerenderer_dispose: (a: number) => void;
|
|
304
|
+
readonly subtitlerenderer_findIndexAtTimestamp: (a: number, b: number) => number;
|
|
305
|
+
readonly subtitlerenderer_format: (a: number) => number;
|
|
306
|
+
readonly subtitlerenderer_getTimestamps: (a: number) => any;
|
|
307
|
+
readonly subtitlerenderer_loadPgs: (a: number, b: number, c: number) => number;
|
|
308
|
+
readonly subtitlerenderer_loadVobSub: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
309
|
+
readonly subtitlerenderer_loadVobSubOnly: (a: number, b: number, c: number) => void;
|
|
310
|
+
readonly subtitlerenderer_new: () => number;
|
|
311
|
+
readonly subtitlerenderer_renderAtIndex: (a: number, b: number) => number;
|
|
312
|
+
readonly subtitlerenderer_renderAtTimestamp: (a: number, b: number) => number;
|
|
313
|
+
readonly vobsubframe_getRgba: (a: number) => any;
|
|
314
|
+
readonly vobsubframe_height: (a: number) => number;
|
|
315
|
+
readonly vobsubframe_screenHeight: (a: number) => number;
|
|
316
|
+
readonly vobsubframe_screenWidth: (a: number) => number;
|
|
317
|
+
readonly vobsubframe_width: (a: number) => number;
|
|
318
|
+
readonly vobsubframe_x: (a: number) => number;
|
|
319
|
+
readonly vobsubframe_y: (a: number) => number;
|
|
320
|
+
readonly vobsubparser_clearCache: (a: number) => void;
|
|
321
|
+
readonly vobsubparser_count: (a: number) => number;
|
|
322
|
+
readonly vobsubparser_debandEnabled: (a: number) => number;
|
|
323
|
+
readonly vobsubparser_dispose: (a: number) => void;
|
|
324
|
+
readonly vobsubparser_findIndexAtTimestamp: (a: number, b: number) => number;
|
|
325
|
+
readonly vobsubparser_getTimestamps: (a: number) => any;
|
|
326
|
+
readonly vobsubparser_loadFromData: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
327
|
+
readonly vobsubparser_loadFromSubOnly: (a: number, b: number, c: number) => void;
|
|
328
|
+
readonly vobsubparser_new: () => number;
|
|
329
|
+
readonly vobsubparser_renderAtIndex: (a: number, b: number) => number;
|
|
330
|
+
readonly vobsubparser_setDebandEnabled: (a: number, b: number) => void;
|
|
331
|
+
readonly vobsubparser_setDebandRange: (a: number, b: number) => void;
|
|
332
|
+
readonly vobsubparser_setDebandThreshold: (a: number, b: number) => void;
|
|
333
|
+
readonly __wbg_subtitleframe_free: (a: number, b: number) => void;
|
|
334
|
+
readonly subtitleframe_width: (a: number) => number;
|
|
335
|
+
readonly subtitleframe_height: (a: number) => number;
|
|
336
|
+
readonly subtitleframe_compositionCount: (a: number) => number;
|
|
337
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
338
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
339
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
340
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
341
|
+
readonly __wbindgen_start: () => void;
|
|
321
342
|
}
|
|
322
343
|
|
|
323
344
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
324
345
|
|
|
325
346
|
/**
|
|
326
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
327
|
-
* a precompiled `WebAssembly.Module`.
|
|
328
|
-
*
|
|
329
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
330
|
-
*
|
|
331
|
-
* @returns {InitOutput}
|
|
332
|
-
*/
|
|
347
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
348
|
+
* a precompiled `WebAssembly.Module`.
|
|
349
|
+
*
|
|
350
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
351
|
+
*
|
|
352
|
+
* @returns {InitOutput}
|
|
353
|
+
*/
|
|
333
354
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
334
355
|
|
|
335
356
|
/**
|
|
336
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
337
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
338
|
-
*
|
|
339
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
340
|
-
*
|
|
341
|
-
* @returns {Promise<InitOutput>}
|
|
342
|
-
*/
|
|
357
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
358
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
359
|
+
*
|
|
360
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
361
|
+
*
|
|
362
|
+
* @returns {Promise<InitOutput>}
|
|
363
|
+
*/
|
|
343
364
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|