pup-recorder 0.3.9 → 0.4.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/build.ts +2 -2
- package/dist/_tsup-dts-rollup.d.ts +52 -36
- package/dist/app.cjs +11 -391
- package/dist/chunk-GDKW7ZIE.js +4 -0
- package/dist/cli.js +2 -2
- package/dist/iframe_preload.cjs +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/Cargo.lock +0 -281
- package/Cargo.toml +0 -23
- package/build.rs +0 -5
- package/build_rust.ts +0 -86
- package/dist/chunk-7LUJTKTE.js +0 -2
- package/rust-toolchain.toml +0 -10
package/build.ts
CHANGED
|
@@ -21,7 +21,6 @@ const common: Options = {
|
|
|
21
21
|
minify: true,
|
|
22
22
|
treeshake: true,
|
|
23
23
|
banner: { js: `import "source-map-support/register.js";` },
|
|
24
|
-
loader: { ".zip": "binary" },
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
await build({
|
|
@@ -41,7 +40,8 @@ await build({
|
|
|
41
40
|
|
|
42
41
|
await build({
|
|
43
42
|
...common,
|
|
44
|
-
entry: ["src/audio_preload.ts"],
|
|
43
|
+
entry: ["src/audio_preload.ts", "src/iframe_preload.ts"],
|
|
45
44
|
format: "cjs",
|
|
46
45
|
outDir: "dist",
|
|
47
46
|
});
|
|
47
|
+
|
|
@@ -81,6 +81,16 @@ export declare interface AudioListenerOptions {
|
|
|
81
81
|
onError: (error: Error) => void;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
declare function barLogger(bar: ProgressBar): LoggerLike;
|
|
85
|
+
export { barLogger }
|
|
86
|
+
export { barLogger as barLogger_alias_1 }
|
|
87
|
+
|
|
88
|
+
declare interface BarOptions {
|
|
89
|
+
total: number;
|
|
90
|
+
out: NodeJS.WriteStream;
|
|
91
|
+
showCount?: boolean;
|
|
92
|
+
}
|
|
93
|
+
|
|
84
94
|
export declare class BitReader {
|
|
85
95
|
private _bits;
|
|
86
96
|
pos: number;
|
|
@@ -108,8 +118,6 @@ export declare function buildAlphaChannelInfoSEI(): Buffer;
|
|
|
108
118
|
*/
|
|
109
119
|
export declare function buildAlphaVPS(vpsData: Buffer, width: number, height: number): Buffer;
|
|
110
120
|
|
|
111
|
-
export declare function buildRust(): Promise<void>;
|
|
112
|
-
|
|
113
121
|
export declare function buildStegoHTML(targetURL: string, size: Size): string;
|
|
114
122
|
|
|
115
123
|
export declare function buildUnifiedExtradata(opts: UnifiedExtradataOptions): Buffer;
|
|
@@ -187,26 +195,19 @@ export declare function debounce<T extends (...args: unknown[]) => void>(fn: T,
|
|
|
187
195
|
export declare class DecodeSession {
|
|
188
196
|
readonly meta: VideoMeta;
|
|
189
197
|
private readonly src;
|
|
190
|
-
private readonly
|
|
191
|
-
private
|
|
192
|
-
private
|
|
193
|
-
private
|
|
194
|
-
private runBaseIdx;
|
|
195
|
-
private nextFrameIdx;
|
|
198
|
+
private readonly framesDir;
|
|
199
|
+
private proc;
|
|
200
|
+
private ready;
|
|
201
|
+
private done;
|
|
196
202
|
private waiters;
|
|
197
|
-
private
|
|
198
|
-
constructor(meta: VideoMeta, src: string,
|
|
199
|
-
getFrame(
|
|
203
|
+
private watcher;
|
|
204
|
+
constructor(meta: VideoMeta, src: string, framesDir: string);
|
|
205
|
+
getFrame(idx: number): Promise<Buffer>;
|
|
200
206
|
close(): void;
|
|
201
|
-
private
|
|
202
|
-
private reseek;
|
|
203
|
-
private waitFrame;
|
|
204
|
-
private onServe;
|
|
205
|
-
private refillIfNeeded;
|
|
207
|
+
private wait;
|
|
206
208
|
private spawn;
|
|
207
|
-
private
|
|
208
|
-
private
|
|
209
|
-
private rejectAllWaiters;
|
|
209
|
+
private poll;
|
|
210
|
+
private drainWaiters;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
export declare function decodeStego(bitmap: Buffer, size: Size): number | undefined;
|
|
@@ -314,14 +315,6 @@ export { exec as exec_alias_1 }
|
|
|
314
315
|
|
|
315
316
|
export declare function extractAlphaToYuv420pBuffer(bgraFrame: Frame, buf: Buffer): void;
|
|
316
317
|
|
|
317
|
-
export declare interface FixedBufferWriter {
|
|
318
|
-
new (path: string, bufferSize: number, queueDepth?: number): FixedBufferWriter;
|
|
319
|
-
write(buffer: Buffer): void;
|
|
320
|
-
close(): Promise<void>;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
export declare const FixedBufferWriter: FixedBufferWriter;
|
|
324
|
-
|
|
325
318
|
declare class FormatMuxer {
|
|
326
319
|
private readonly _ctx;
|
|
327
320
|
private _opened;
|
|
@@ -376,7 +369,6 @@ export declare class FrameServer {
|
|
|
376
369
|
getFrame(id: string, idx: number): Promise<Buffer>;
|
|
377
370
|
close(id: string): void;
|
|
378
371
|
closeAll(): void;
|
|
379
|
-
private must;
|
|
380
372
|
}
|
|
381
373
|
|
|
382
374
|
export declare const frameServer: FrameServer;
|
|
@@ -401,6 +393,10 @@ export declare interface HwVideoFactoryOptions {
|
|
|
401
393
|
sharedHw?: HardwareContext;
|
|
402
394
|
}
|
|
403
395
|
|
|
396
|
+
export declare function installTickHook(): void;
|
|
397
|
+
|
|
398
|
+
export declare function installVideoHook(): void;
|
|
399
|
+
|
|
404
400
|
export declare function interleaveAccessUnits(baseNals: NalUnit[], alphaNals: NalUnit[], cfg: NvencHevcConfig): Buffer;
|
|
405
401
|
|
|
406
402
|
export declare interface IpcDonePayload {
|
|
@@ -461,7 +457,9 @@ declare class Lazy<T> {
|
|
|
461
457
|
export { Lazy }
|
|
462
458
|
export { Lazy as Lazy_alias_1 }
|
|
463
459
|
|
|
464
|
-
export declare function loadWindow({ source, renderer,
|
|
460
|
+
export declare function loadWindow({ source, renderer, onCreated, signal }: WindowOptions): Promise<BrowserWindow>;
|
|
461
|
+
|
|
462
|
+
export declare function localize(src: string): Promise<string>;
|
|
465
463
|
|
|
466
464
|
declare class Logger implements LoggerLike {
|
|
467
465
|
private _level;
|
|
@@ -618,11 +616,6 @@ declare function periodical(callback: (count: number) => Promise<void> | void, m
|
|
|
618
616
|
export { periodical }
|
|
619
617
|
export { periodical as periodical_alias_1 }
|
|
620
618
|
|
|
621
|
-
export declare class PngStreamParser {
|
|
622
|
-
private buf;
|
|
623
|
-
feed(chunk: Buffer): Buffer[];
|
|
624
|
-
}
|
|
625
|
-
|
|
626
619
|
export declare function probe(src: string): Promise<ProbeResult>;
|
|
627
620
|
|
|
628
621
|
export declare interface ProbeResult {
|
|
@@ -640,6 +633,26 @@ declare interface ProcessHandle {
|
|
|
640
633
|
export { ProcessHandle }
|
|
641
634
|
export { ProcessHandle as ProcessHandle_alias_1 }
|
|
642
635
|
|
|
636
|
+
declare class ProgressBar {
|
|
637
|
+
private _written;
|
|
638
|
+
private _shown;
|
|
639
|
+
private readonly _total;
|
|
640
|
+
private readonly _out;
|
|
641
|
+
private readonly _tty;
|
|
642
|
+
private readonly _showCount;
|
|
643
|
+
constructor(opts: BarOptions);
|
|
644
|
+
get total(): number;
|
|
645
|
+
update(written: number): void;
|
|
646
|
+
updatePercent(pct: number): void;
|
|
647
|
+
clear(): void;
|
|
648
|
+
redraw(): void;
|
|
649
|
+
log(line: string): void;
|
|
650
|
+
finish(line: string): void;
|
|
651
|
+
private render;
|
|
652
|
+
}
|
|
653
|
+
export { ProgressBar }
|
|
654
|
+
export { ProgressBar as ProgressBar_alias_1 }
|
|
655
|
+
|
|
643
656
|
declare type ProgressCallback = (progress: number) => void;
|
|
644
657
|
export { ProgressCallback }
|
|
645
658
|
export { ProgressCallback as ProgressCallback_alias_1 }
|
|
@@ -667,6 +680,10 @@ declare const pupAudioPreload: string;
|
|
|
667
680
|
export { pupAudioPreload }
|
|
668
681
|
export { pupAudioPreload as pupAudioPreload_alias_1 }
|
|
669
682
|
|
|
683
|
+
declare const pupIframePreload: string;
|
|
684
|
+
export { pupIframePreload }
|
|
685
|
+
export { pupIframePreload as pupIframePreload_alias_1 }
|
|
686
|
+
|
|
670
687
|
declare const pupLogLevel: number;
|
|
671
688
|
export { pupLogLevel }
|
|
672
689
|
export { pupLogLevel as pupLogLevel_alias_1 }
|
|
@@ -906,12 +923,11 @@ export declare interface WindowOptions {
|
|
|
906
923
|
source: string;
|
|
907
924
|
renderer: IPCRenderOptions;
|
|
908
925
|
tolerant?: boolean;
|
|
909
|
-
preload?: string;
|
|
910
926
|
onCreated?: WindowCreatedCallback;
|
|
911
927
|
signal?: AbortSignal;
|
|
912
928
|
}
|
|
913
929
|
|
|
914
|
-
export declare function withRerender<T>(action: () => Promise<T>): Promise<T>;
|
|
930
|
+
export declare function withRerender<T>(signal: AbortSignal, action: () => Promise<T>): Promise<T>;
|
|
915
931
|
|
|
916
932
|
declare function withTimeout<T>(p: Promise<T>, ms: number, label: string): Promise<T>;
|
|
917
933
|
export { withTimeout }
|