@scrypted/libav 1.0.1 → 1.0.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/lib/index.d.ts +22 -0
- package/package.json +4 -3
- package/src/tsconfig.json +2 -1
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare function isAvailable(): boolean;
|
|
2
|
+
export interface AVFrame {
|
|
3
|
+
close(): void;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
format: string;
|
|
7
|
+
toBuffer(): Buffer;
|
|
8
|
+
toJpeg(): Buffer;
|
|
9
|
+
}
|
|
10
|
+
export interface AVFilter {
|
|
11
|
+
destroy(): void;
|
|
12
|
+
setCrop(x: string, y: string, width: string, height: string): void;
|
|
13
|
+
filter(frame: AVFrame): AVFrame;
|
|
14
|
+
}
|
|
15
|
+
export interface AVFormatContext {
|
|
16
|
+
open(input: string, codec: string): void;
|
|
17
|
+
readFrame(): Promise<AVFrame>;
|
|
18
|
+
createFilter(width: number, height: number, filter: string, useHardware: boolean): AVFilter;
|
|
19
|
+
close(): void;
|
|
20
|
+
}
|
|
21
|
+
export declare function setAVLogCallback(callback: (msg: string) => void): void;
|
|
22
|
+
export declare function createAVFormatContext(): AVFormatContext;
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scrypted/libav",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@types/node": "^22.5.0",
|
|
6
5
|
"node-addon-api": "^8.1.0",
|
|
7
6
|
"prebuild-install": "npm:@scrypted/prebuild-install@^7.1.8"
|
|
8
7
|
},
|
|
@@ -11,9 +10,10 @@
|
|
|
11
10
|
"url": "git://github.com/scryptedapp/libav.git"
|
|
12
11
|
},
|
|
13
12
|
"main": "./lib/index.js",
|
|
13
|
+
"types": "./lib/index.d.ts",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"prebuildify-host": "prebuild --strip --include-regex \"\\.node$|spawn-helper$|\\.exe$|\\.dll$|\\.pdb$\"",
|
|
16
|
-
"prebuildify-node": "prebuild --strip -t
|
|
16
|
+
"prebuildify-node": "prebuild --strip -t 20.0.0 -t 22.0.0 --include-regex \"\\.node$|spawn-helper$|\\.exe$|\\.dll$|\\.pdb$\"",
|
|
17
17
|
"prebuildify-electron": "prebuild --strip -r electron -t 30.0.0 -t 31.0.0 --include-regex \"\\.node$|spawn-helper$|\\.exe$|\\.dll$|\\.pdb$\"",
|
|
18
18
|
"prebuildify-arm64": "npm run prebuildify-electron -- --arch arm64 && npm run prebuildify-node -- --arch arm64",
|
|
19
19
|
"prebuildify-x64": "npm run prebuildify-electron -- --arch x64 && npm run prebuildify-node -- --arch x64",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"prepublishOnly": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.5.0",
|
|
35
36
|
"node-gyp": "^10.2.0",
|
|
36
37
|
"prebuild": "^13.0.1",
|
|
37
38
|
"typescript": "^5.5.4"
|