This repository has been archived by the owner on Oct 7, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
/
index.d.ts
126 lines (84 loc) · 3.4 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
declare module 'react-native-ffmpeg' {
export class LogLevel {
static AV_LOG_STDERR: number;
static AV_LOG_QUIET: number;
static AV_LOG_PANIC: number;
static AV_LOG_FATAL: number;
static AV_LOG_ERROR: number;
static AV_LOG_WARNING: number;
static AV_LOG_INFO: number;
static AV_LOG_VERBOSE: number;
static AV_LOG_DEBUG: number;
static AV_LOG_TRACE: number;
static logLevelToString(number): string;
}
export interface Log {
executionId: number;
level: LogLevel;
message: string;
}
export interface Statistics {
executionId: number;
videoFrameNumber: number;
videoFps: number;
videoQuality: number;
size: number;
time: number;
bitrate: number;
speed: number;
}
export interface Execution {
executionId: number;
startTime: number;
command: string;
}
export interface CompletedExecution {
executionId: number;
returnCode: number;
}
export class StreamInformation {
getAllProperties(): Record<string, string>;
}
export class MediaInformation {
getStreams(): StreamInformation[];
getMediaProperties(): Record<string, string>;
getAllProperties(): Record<string, string>;
}
export class RNFFmpegConfig {
static getFFmpegVersion(): Promise<string>;
static getPlatform(): Promise<string>;
static disableRedirection(): void;
static getLogLevel(): Promise<number>;
static setLogLevel(level: number): void;
static disableLogs(): void;
static disableStatistics(): void;
static enableLogCallback(newCallback: (log: Log) => void): void;
static enableStatisticsCallback(newCallback: (statistics: Statistics) => void): void;
static getLastReceivedStatistics(): Promise<Statistics>;
static resetStatistics(): void;
static setFontconfigConfigurationPath(path: string): void;
static setFontDirectory(path: string, mapping?: { [key: string]: string }): void;
static getPackageName(): Promise<string>;
static getExternalLibraries(): Promise<string[]>;
static getLastReturnCode(): Promise<number>;
static getLastCommandOutput(): Promise<string>;
static registerNewFFmpegPipe(): Promise<string>;
static setEnvironmentVariable(name: string, value: string);
static writeToPipe(inputPath: string, pipePath: string): Promise<number>;
}
export class RNFFmpeg {
static executeWithArguments(arguments: string[]): Promise<number>;
static execute(command: string): Promise<number>;
static executeAsyncWithArguments(arguments: string[], callback: (execution: CompletedExecution) => void): Promise<number>;
static executeAsync(command: string, callback: (execution: CompletedExecution) => void): Promise<number>;
static cancel(): void;
static cancelExecution(executionId: number): void;
static listExecutions(): Promise<Execution[]>;
static parseArguments(command: string): string[];
}
export class RNFFprobe {
static executeWithArguments(arguments: string[]): Promise<number>;
static execute(command: string): Promise<number>;
static getMediaInformation(path: string): Promise<MediaInformation>;
}
}