@aelionsdk/export 0.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/audio-export.d.ts +23 -0
- package/dist/audio-export.d.ts.map +1 -0
- package/dist/audio-export.js +120 -0
- package/dist/checkpoint.d.ts +58 -0
- package/dist/checkpoint.d.ts.map +1 -0
- package/dist/checkpoint.js +119 -0
- package/dist/image-export.d.ts +40 -0
- package/dist/image-export.d.ts.map +1 -0
- package/dist/image-export.js +235 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/memory-sink.d.ts +17 -0
- package/dist/memory-sink.d.ts.map +1 -0
- package/dist/memory-sink.js +60 -0
- package/dist/mux-export-worker.d.ts +2 -0
- package/dist/mux-export-worker.d.ts.map +1 -0
- package/dist/mux-export-worker.js +120 -0
- package/dist/opfs-sink.d.ts +20 -0
- package/dist/opfs-sink.d.ts.map +1 -0
- package/dist/opfs-sink.js +113 -0
- package/dist/profiles.d.ts +66 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +284 -0
- package/dist/remote-export.d.ts +56 -0
- package/dist/remote-export.d.ts.map +1 -0
- package/dist/remote-export.js +83 -0
- package/dist/resumable-muxed-export.d.ts +84 -0
- package/dist/resumable-muxed-export.d.ts.map +1 -0
- package/dist/resumable-muxed-export.js +533 -0
- package/dist/session.d.ts +47 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +483 -0
- package/dist/sink-completion.d.ts +8 -0
- package/dist/sink-completion.d.ts.map +1 -0
- package/dist/sink-completion.js +13 -0
- package/dist/webm-export.d.ts +97 -0
- package/dist/webm-export.d.ts.map +1 -0
- package/dist/webm-export.js +408 -0
- package/dist/worker-export.d.ts +25 -0
- package/dist/worker-export.d.ts.map +1 -0
- package/dist/worker-export.js +202 -0
- package/dist/worker-protocol.d.ts +66 -0
- package/dist/worker-protocol.d.ts.map +1 -0
- package/dist/worker-protocol.js +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Rational } from '@aelionsdk/core';
|
|
2
|
+
import type { OfflineAudioRequest, OfflineFrameRequest, WebMExportResult } from './webm-export.js';
|
|
3
|
+
export interface ExportWorkerStartRequest {
|
|
4
|
+
readonly type: 'start';
|
|
5
|
+
readonly profile: 'webm' | 'mp4' | 'mp4-av1' | 'mp4-hevc';
|
|
6
|
+
readonly config: {
|
|
7
|
+
readonly durationUs: number;
|
|
8
|
+
readonly width: number;
|
|
9
|
+
readonly height: number;
|
|
10
|
+
readonly frameRate: Rational;
|
|
11
|
+
readonly sampleRate: number;
|
|
12
|
+
readonly channelCount: number;
|
|
13
|
+
readonly videoBitrate: number;
|
|
14
|
+
readonly audioBitrate: number;
|
|
15
|
+
readonly videoCodecString?: string;
|
|
16
|
+
readonly audioCodecString?: string;
|
|
17
|
+
};
|
|
18
|
+
readonly sink: WritableStream<{
|
|
19
|
+
readonly type: 'write';
|
|
20
|
+
readonly data: Uint8Array<ArrayBuffer>;
|
|
21
|
+
readonly position: number;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export interface ExportWorkerCancelRequest {
|
|
25
|
+
readonly type: 'cancel';
|
|
26
|
+
readonly reason: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ExportWorkerFrameResponse {
|
|
29
|
+
readonly type: 'frame-response';
|
|
30
|
+
readonly id: number;
|
|
31
|
+
readonly frame?: VideoFrame;
|
|
32
|
+
readonly error?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ExportWorkerAudioResponse {
|
|
35
|
+
readonly type: 'audio-response';
|
|
36
|
+
readonly id: number;
|
|
37
|
+
readonly pcm?: Float32Array<ArrayBuffer>;
|
|
38
|
+
readonly error?: string;
|
|
39
|
+
}
|
|
40
|
+
export type ExportWorkerRequest = ExportWorkerStartRequest | ExportWorkerCancelRequest | ExportWorkerFrameResponse | ExportWorkerAudioResponse;
|
|
41
|
+
export interface ExportWorkerFrameRequest {
|
|
42
|
+
readonly type: 'render-frame';
|
|
43
|
+
readonly id: number;
|
|
44
|
+
readonly request: OfflineFrameRequest;
|
|
45
|
+
}
|
|
46
|
+
export interface ExportWorkerAudioRequest {
|
|
47
|
+
readonly type: 'render-audio';
|
|
48
|
+
readonly id: number;
|
|
49
|
+
readonly request: OfflineAudioRequest;
|
|
50
|
+
}
|
|
51
|
+
export interface ExportWorkerProgress {
|
|
52
|
+
readonly type: 'progress';
|
|
53
|
+
readonly value: number;
|
|
54
|
+
}
|
|
55
|
+
export interface ExportWorkerCompleted {
|
|
56
|
+
readonly type: 'completed';
|
|
57
|
+
readonly result: WebMExportResult;
|
|
58
|
+
}
|
|
59
|
+
export interface ExportWorkerFailed {
|
|
60
|
+
readonly type: 'failed';
|
|
61
|
+
readonly code: string;
|
|
62
|
+
readonly message: string;
|
|
63
|
+
readonly aborted: boolean;
|
|
64
|
+
}
|
|
65
|
+
export type ExportWorkerResponse = ExportWorkerFrameRequest | ExportWorkerAudioRequest | ExportWorkerProgress | ExportWorkerCompleted | ExportWorkerFailed;
|
|
66
|
+
//# sourceMappingURL=worker-protocol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-protocol.d.ts","sourceRoot":"","sources":["../src/worker-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEnG,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC;IAC1D,QAAQ,CAAC,MAAM,EAAE;QACf,QAAQ,CAAC,UAAU,EAAE,MAAM,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MAAM,MAAM,mBAAmB,GAC3B,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,CAAC;AAE9B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;CACvC;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;CACvC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,MAAM,oBAAoB,GAC5B,wBAAwB,GACxB,wBAAwB,GACxB,oBAAoB,GACpB,qBAAqB,GACrB,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aelionsdk/export",
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
|
+
"description": "Streaming WebCodecs and WebM export pipeline for AelionSDK",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/FoyonaCZY/AelionSDK.git",
|
|
9
|
+
"directory": "packages/export"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"aelion",
|
|
13
|
+
"video",
|
|
14
|
+
"webcodecs",
|
|
15
|
+
"export"
|
|
16
|
+
],
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"type": "module",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist",
|
|
27
|
+
"!dist/.tsbuildinfo"
|
|
28
|
+
],
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=20.19"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public",
|
|
34
|
+
"provenance": true
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@aelionsdk/core": "0.1.0-beta.1",
|
|
38
|
+
"@aelionsdk/media": "0.1.0-beta.1",
|
|
39
|
+
"@aelionsdk/render-ir": "0.1.0-beta.1",
|
|
40
|
+
"mediabunny": "1.50.8"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc -b",
|
|
44
|
+
"typecheck": "tsc -b --pretty false"
|
|
45
|
+
}
|
|
46
|
+
}
|