ffprobe command was added. Missing definitions were added. Code reformat.

This commit is contained in:
izogfif
2024-08-29 06:06:13 +00:00
committed by izotov
parent ae1cdac7db
commit 8d63b3a9c2
8 changed files with 93 additions and 17 deletions

View File

@@ -39,22 +39,28 @@ export interface Stat {
blocks: number;
}
export interface FSFilesystemWORKERFS {
}
export interface FSFilesystemWORKERFS {}
export interface FSFilesystemMEMFS {
}
export interface FSFilesystemMEMFS {}
export interface FSFilesystems {
WORKERFS: FSFilesystemWORKERFS;
MEMFS: FSFilesystemMEMFS;
}
export type FSFilesystem =
| FSFilesystemWORKERFS
| FSFilesystemMEMFS;
export type FSFilesystem = FSFilesystemWORKERFS | FSFilesystemMEMFS;
export interface OptionReadFile {
encoding: string;
}
export interface WorkerFSMountConfig {
blobs?: {
name: string;
data: Blob;
}[];
files?: File[];
}
/**
* Functions to interact with Emscripten FS library.
@@ -75,7 +81,11 @@ export interface FS {
isFile: (mode: number) => boolean;
/** mode is a numeric notation of permission, @see [Numeric Notation](https://en.wikipedia.org/wiki/File-system_permissions#Numeric_notation) */
isDir: (mode: number) => boolean;
mount: (fileSystemType: FSFilesystem, data: WorkerFSMountConfig, path: string) => void;
mount: (
fileSystemType: FSFilesystem,
data: WorkerFSMountConfig,
path: string
) => void;
unmount: (path: string) => void;
filesystems: FSFilesystems;
}
@@ -115,6 +125,7 @@ export interface FFmpegCoreModule {
mainScriptUrlOrBlob: string;
exec: (...args: string[]) => number;
ffprobe: (...args: string[]) => number;
reset: () => void;
setLogger: (logger: (log: Log) => void) => void;
setTimeout: (timeout: number) => void;