@matjash/pixi-native-win32-x64 0.1.2
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/THIRD_PARTY_NOTICES.md +83 -0
- package/index.cjs +25 -0
- package/index.d.ts +11 -0
- package/native/audio/binding-path.js +16 -0
- package/native/audio/dist/win32-x64/native_audio.node +0 -0
- package/native/audio/package.json +7 -0
- package/native/audio/src/index.d.ts +63 -0
- package/native/audio/src/index.js +5 -0
- package/native/audio/src/lib.rs +1520 -0
- package/native/gpu/dist/win32-x64/d3dcompiler_47.dll +0 -0
- package/native/gpu/dist/win32-x64/pixi_native_gpu.node +0 -0
- package/native/gpu/package.json +24 -0
- package/native/gpu/src/binding-path.js +16 -0
- package/native/gpu/src/index.d.ts +2847 -0
- package/native/gpu/src/index.js +48 -0
- package/native/video/dist/win32-x64/FFMPEG_BUILD_INFO.txt +46 -0
- package/native/video/dist/win32-x64/FFMPEG_LICENSE.txt +502 -0
- package/native/video/dist/win32-x64/FFMPEG_SHA256SUMS +4 -0
- package/native/video/dist/win32-x64/ffmpeg.exe +0 -0
- package/native/video/dist/win32-x64/ffprobe.exe +0 -0
- package/native/video/dist/win32-x64/native_video.node +0 -0
- package/native/video/package.json +7 -0
- package/native/video/src/binding-path.js +26 -0
- package/native/video/src/index.d.ts +36 -0
- package/native/video/src/index.js +61 -0
- package/native/video/src/lib.rs +994 -0
- package/native/window/binding-path.js +11 -0
- package/native/window/dist/win32-x64/native_window.node +0 -0
- package/native/window/package.json +7 -0
- package/native/window/src/index.d.ts +17 -0
- package/native/window/src/index.js +32 -0
- package/native/window/src/lib.rs +308 -0
- package/package.json +41 -0
- package/third_party/ffmpeg-source-8.0-140fd653ae.tar.gz +0 -0
- package/third_party/ffmpeg-source-8.0-140fd653ae.tar.gz.sha256 +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface DecoderOptions {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
fps?: number;
|
|
5
|
+
startTime?: number;
|
|
6
|
+
ffmpegPath?: string;
|
|
7
|
+
vaapiDevice?: string;
|
|
8
|
+
playbackRate?: number;
|
|
9
|
+
endTime?: number;
|
|
10
|
+
sourcePaced?: boolean;
|
|
11
|
+
inputArgs?: string[];
|
|
12
|
+
outputArgs?: string[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface VideoFrame {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
timestampUs: number;
|
|
19
|
+
data: Uint8Array;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class NativeVideoDecoder {
|
|
23
|
+
public constructor(options: DecoderOptions);
|
|
24
|
+
public open(source: string): void;
|
|
25
|
+
public pollLatest(): VideoFrame | null;
|
|
26
|
+
public pollNext(): VideoFrame | null;
|
|
27
|
+
public queuedFrames(): number;
|
|
28
|
+
public catchUpTo(timestampUs: number): void;
|
|
29
|
+
public pollError(): string | null;
|
|
30
|
+
public backend(): string;
|
|
31
|
+
public decodedFrames(): number;
|
|
32
|
+
public droppedFrames(): number;
|
|
33
|
+
public skippedFrames(): number;
|
|
34
|
+
public isFinished(): boolean;
|
|
35
|
+
public close(): void;
|
|
36
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const { createRequire } = require("node:module");
|
|
2
|
+
const { getBindingPath } = require("./binding-path.js");
|
|
3
|
+
const requireNative = createRequire(__filename);
|
|
4
|
+
|
|
5
|
+
const native = requireNative(getBindingPath());
|
|
6
|
+
|
|
7
|
+
class NativeVideoDecoder {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
this.decoder = new native.NativeVideoDecoder(options);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
open(source) {
|
|
13
|
+
this.decoder.open(source);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
pollLatest() {
|
|
17
|
+
return this.decoder.pollLatest();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
pollNext() {
|
|
21
|
+
return this.decoder.pollNext();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
queuedFrames() {
|
|
25
|
+
return this.decoder.queuedFrames();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
catchUpTo(timestampUs) {
|
|
29
|
+
this.decoder.catchUpTo(timestampUs);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
pollError() {
|
|
33
|
+
return this.decoder.pollError();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
backend() {
|
|
37
|
+
return this.decoder.backend();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
decodedFrames() {
|
|
41
|
+
return this.decoder.decodedFrames();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
droppedFrames() {
|
|
45
|
+
return this.decoder.droppedFrames();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
skippedFrames() {
|
|
49
|
+
return this.decoder.skippedFrames();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
isFinished() {
|
|
53
|
+
return this.decoder.isFinished();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
close() {
|
|
57
|
+
this.decoder.close();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = { NativeVideoDecoder };
|