libav-wasm 0.3.1 → 0.3.3
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/build/index.d.ts +3 -3
- package/build/libav.wasm +0 -0
- package/build/utils.d.ts +0 -31
- package/build/worker.d.ts +2 -2
- package/build/worker.js +260 -255
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export type MediaInfo = {
|
|
|
33
33
|
audio_mime_type: string;
|
|
34
34
|
};
|
|
35
35
|
export type Chunk = {
|
|
36
|
-
|
|
36
|
+
isTrailer: boolean;
|
|
37
37
|
offset: number;
|
|
38
38
|
buffer: Uint8Array;
|
|
39
39
|
pts: number;
|
|
@@ -41,9 +41,9 @@ export type Chunk = {
|
|
|
41
41
|
pos: number;
|
|
42
42
|
};
|
|
43
43
|
export declare const makeRemuxer: ({ publicPath, workerUrl, workerOptions, getStream: _getStream, attachment, subtitle: _subtitle, length, bufferSize }: MakeTransmuxerOptions) => Promise<{
|
|
44
|
-
init: () => Promise<Chunk
|
|
44
|
+
init: () => Promise<Chunk>;
|
|
45
45
|
destroy: (destroyWorker?: boolean) => void;
|
|
46
|
-
read: () => Promise<Chunk
|
|
46
|
+
read: () => Promise<Chunk>;
|
|
47
47
|
seek: (time: number) => Promise<void>;
|
|
48
48
|
getInfo: () => Promise<{
|
|
49
49
|
input: MediaInfo;
|
package/build/libav.wasm
CHANGED
|
Binary file
|
package/build/utils.d.ts
CHANGED
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
export declare enum State {
|
|
2
|
-
Idle = 0,
|
|
3
|
-
Requested = 1,
|
|
4
|
-
Responded = 2
|
|
5
|
-
}
|
|
6
|
-
/** https://ffmpeg.org/doxygen/trunk/avformat_8h.html#ac736f8f4afc930ca1cda0b43638cc678 */
|
|
7
|
-
export declare enum SEEK_FLAG {
|
|
8
|
-
NONE = 0,
|
|
9
|
-
/** seek backward */
|
|
10
|
-
AVSEEK_FLAG_BACKWARD = 1,
|
|
11
|
-
/** seeking based on position in bytes */
|
|
12
|
-
AVSEEK_FLAG_BYTE = 2,
|
|
13
|
-
/** seek to any frame, even non-keyframes */
|
|
14
|
-
AVSEEK_FLAG_ANY = 4,
|
|
15
|
-
/** seeking based on frame number */
|
|
16
|
-
AVSEEK_FLAG_FRAME = 8
|
|
17
|
-
}
|
|
18
|
-
export declare enum SEEK_WHENCE_FLAG {
|
|
19
|
-
SEEK_SET = 0,
|
|
20
|
-
SEEK_CUR = 1,
|
|
21
|
-
SEEK_END = 2,
|
|
22
|
-
AVSEEK_SIZE = 65536
|
|
23
|
-
}
|
|
24
|
-
export declare enum AVERROR {
|
|
25
|
-
EOF = -541478725,
|
|
26
|
-
EXIT = 255
|
|
27
|
-
}
|
|
28
|
-
export declare const notifyInterface: (sharedArrayBuffer: SharedArrayBuffer, value: State) => number;
|
|
29
|
-
export declare const waitForInterfaceNotification: (sharedArrayBuffer: SharedArrayBuffer, value: State) => Promise<'ok' | 'timed-out'> | 'not-equal';
|
|
30
|
-
export declare const waitSyncForInterfaceNotification: (sharedArrayBuffer: SharedArrayBuffer, value: State) => "ok" | "timed-out" | "not-equal";
|
|
31
|
-
export declare const freeInterface: (sharedArrayBuffer: SharedArrayBuffer) => Uint8Array;
|
|
32
1
|
export declare function debounceImmediateAndLatest<T extends (...args: any[]) => any>(wait: number, func: T): T;
|
|
33
2
|
export declare const queuedDebounceWithLastCall: <T2 extends any[], T extends (...args: T2) => any>(time: number, func: T) => (...args: Parameters<T>) => Promise<any> | undefined;
|
|
34
3
|
export declare const toStreamChunkSize: (SIZE: number) => (stream: ReadableStream) => ReadableStream<Uint8Array>;
|
package/build/worker.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ declare const resolvers: {
|
|
|
14
14
|
subtitle: (streamIndex: number, isHeader: boolean, data: string, ...rest: [number, number] | [string, string]) => Promise<void>;
|
|
15
15
|
attachment: (filename: string, mimetype: string, buffer: ArrayBuffer) => Promise<void>;
|
|
16
16
|
}) => Promise<{
|
|
17
|
-
init: () => Promise<Chunk
|
|
17
|
+
init: () => Promise<Chunk>;
|
|
18
18
|
destroy: () => void;
|
|
19
19
|
seek: (timestamp: number) => Promise<void>;
|
|
20
|
-
read: () => Promise<Chunk
|
|
20
|
+
read: () => Promise<Chunk>;
|
|
21
21
|
getInfo: () => Promise<{
|
|
22
22
|
input: {
|
|
23
23
|
formatName: string;
|