Commit 02483457 authored by hewenhao's avatar hewenhao

refactor(types): 重构 TypeScript 类型定义

- 将模块声明改为导出抽象类和接口 - 优化类和方法的组织结构 - 删除冗余的类型声明 - 调整成员的访问修饰符 - 简化部分代码结构
parent c0ac6090
{ {
"name": "@geek-front/ffmpeg-react-native", "name": "@geek-front/ffmpeg-react-native",
"version": "6.0.5", "version": "6.0.6",
"description": "FFmpeg Kit for React Native", "description": "FFmpeg Kit for React Native",
"main": "src/index", "main": "src/index",
"types": "src/index.d.ts", "types": "src/index.d.ts",
......
declare module 'ffmpeg-kit-react-native' { export abstract class AbstractSession implements Session {
export abstract class AbstractSession implements Session { static createFFmpegSession(argumentsArray: Array<string>, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFmpegSession>;
static createFFmpegSession(argumentsArray: Array<string>, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFmpegSession>; static createFFmpegSessionFromMap(sessionMap: { [key: string]: any }): FFmpegSession;
static createFFmpegSessionFromMap(sessionMap: { [key: string]: any }): FFmpegSession; static createFFprobeSession(argumentsArray: Array<string>, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFprobeSession>;
static createFFprobeSession(argumentsArray: Array<string>, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFprobeSession>; static createFFprobeSessionFromMap(sessionMap: { [key: string]: any }): FFprobeSession;
static createFFprobeSessionFromMap(sessionMap: { [key: string]: any }): FFprobeSession; static createMediaInformationSession(argumentsArray: Array<string>): Promise<MediaInformationSession>;
static createMediaInformationSession(argumentsArray: Array<string>): Promise<MediaInformationSession>; static createMediaInformationSessionFromMap(sessionMap: { [key: string]: any }): MediaInformationSession;
static createMediaInformationSessionFromMap(sessionMap: { [key: string]: any }): MediaInformationSession; getLogCallback(): LogCallback;
getLogCallback(): LogCallback; getSessionId(): number;
getSessionId(): number; getCreateTime(): Date;
getCreateTime(): Date; getStartTime(): Date;
getStartTime(): Date; getEndTime(): Promise<Date>;
getEndTime(): Promise<Date>; getDuration(): Promise<number>;
getDuration(): Promise<number>; getArguments(): Array<string>;
getArguments(): Array<string>; getCommand(): string;
getCommand(): string; getAllLogs(waitTimeout ?: number): Promise<Array<Log>>;
getAllLogs(waitTimeout ?: number): Promise<Array<Log>>; getLogs(): Promise<Array<Log>>;
getLogs(): Promise<Array<Log>>; getAllLogsAsString(waitTimeout?: number): Promise<string>;
getAllLogsAsString(waitTimeout?: number): Promise<string>; getLogsAsString(): Promise<string>;
getLogsAsString(): Promise<string>; getOutput(): Promise<string>;
getOutput(): Promise<string>; getState(): Promise<SessionState>;
getState(): Promise<SessionState>; getReturnCode(): Promise<ReturnCode>;
getReturnCode(): Promise<ReturnCode>; getFailStackTrace(): Promise<string>;
getFailStackTrace(): Promise<string>; getLogRedirectionStrategy(): LogRedirectionStrategy;
getLogRedirectionStrategy(): LogRedirectionStrategy; thereAreAsynchronousMessagesInTransmit(): Promise<boolean>;
thereAreAsynchronousMessagesInTransmit(): Promise<boolean>; isFFmpeg(): boolean;
isFFmpeg(): boolean; isFFprobe(): boolean;
isFFprobe(): boolean; isMediaInformation(): boolean;
isMediaInformation(): boolean; cancel(): Promise<void>;
cancel(): Promise<void>; }
}
export class ArchDetect {
static getArch(): Promise<string>;
} export class ArchDetect {
export type FFmpegSessionCompleteCallback = (session: FFmpegSession) => void; static getArch(): Promise<string>;
export type FFprobeSessionCompleteCallback = (session: FFprobeSession) => void;
export type MediaInformationSessionCompleteCallback = (session: MediaInformationSession) => void;
export class FFmpegKit { }
static execute(command: string): Promise<FFmpegSession>; export type FFmpegSessionCompleteCallback = (session: FFmpegSession) => void;
export type FFprobeSessionCompleteCallback = (session: FFprobeSession) => void;
export type MediaInformationSessionCompleteCallback = (session: MediaInformationSession) => void;
static executeWithArguments(commandArguments: string[]): Promise<FFmpegSession>; export class FFmpegKit {
static executeAsync(command: string, completeCallback?: FFmpegSessionCompleteCallback, logCallback?: LogCallback, statisticsCallback?: StatisticsCallback): Promise<FFmpegSession>; static execute(command: string): Promise<FFmpegSession>;
static executeWithArgumentsAsync(commandArguments: string[], completeCallback?: FFmpegSessionCompleteCallback, logCallback?: LogCallback, statisticsCallback?: StatisticsCallback): Promise<FFmpegSession>; static executeWithArguments(commandArguments: string[]): Promise<FFmpegSession>;
static cancel(sessionId?: number): Promise<void>; static executeAsync(command: string, completeCallback?: FFmpegSessionCompleteCallback, logCallback?: LogCallback, statisticsCallback?: StatisticsCallback): Promise<FFmpegSession>;
static listSessions(): Promise<FFmpegSession[]>; static executeWithArgumentsAsync(commandArguments: string[], completeCallback?: FFmpegSessionCompleteCallback, logCallback?: LogCallback, statisticsCallback?: StatisticsCallback): Promise<FFmpegSession>;
} static cancel(sessionId?: number): Promise<void>;
export class FFmpegKitConfig { static listSessions(): Promise<FFmpegSession[]>;
static init(): Promise<void>; }
static uninit(): Promise<void>; export class FFmpegKitConfig {
static enableRedirection(): Promise<void>; static init(): Promise<void>;
static disableRedirection(): Promise<void>; static uninit(): Promise<void>;
static setFontconfigConfigurationPath(path: string): Promise<void>; static enableRedirection(): Promise<void>;
static setFontDirectory(path: string, mapping?: { [key: string]: string }): Promise<void>; static disableRedirection(): Promise<void>;
static setFontDirectoryList(fontDirectoryList: string[], mapping?: { [key: string]: string }): Promise<void>; static setFontconfigConfigurationPath(path: string): Promise<void>;
static registerNewFFmpegPipe(): Promise<string>; static setFontDirectory(path: string, mapping?: { [key: string]: string }): Promise<void>;
static closeFFmpegPipe(ffmpegPipePath: string): Promise<void>; static setFontDirectoryList(fontDirectoryList: string[], mapping?: { [key: string]: string }): Promise<void>;
static getFFmpegVersion(): Promise<string>; static registerNewFFmpegPipe(): Promise<string>;
static getVersion(): Promise<string>; static closeFFmpegPipe(ffmpegPipePath: string): Promise<void>;
static isLTSBuild(): Promise<boolean>; static getFFmpegVersion(): Promise<string>;
static getBuildDate(): Promise<string>; static getVersion(): Promise<string>;
static setEnvironmentVariable(name: string, value: string): Promise<void>; static isLTSBuild(): Promise<boolean>;
static ignoreSignal(signal: Signal): Promise<void>; static getBuildDate(): Promise<string>;
static ffmpegExecute(session: FFmpegSession): Promise<void>; static setEnvironmentVariable(name: string, value: string): Promise<void>;
static ffprobeExecute(session: FFprobeSession): Promise<void>; static ignoreSignal(signal: Signal): Promise<void>;
static getMediaInformationExecute(session: MediaInformationSession, waitTimeout?: number): Promise<void>; static ffmpegExecute(session: FFmpegSession): Promise<void>;
static asyncFFmpegExecute(session: FFmpegSession): Promise<void>; static ffprobeExecute(session: FFprobeSession): Promise<void>;
static asyncFFprobeExecute(session: FFprobeSession): Promise<void>; static getMediaInformationExecute(session: MediaInformationSession, waitTimeout?: number): Promise<void>;
static asyncGetMediaInformationExecute(session: MediaInformationSession, waitTimeout?: number): Promise<void>; static asyncFFmpegExecute(session: FFmpegSession): Promise<void>;
static enableLogCallback(logCallback: LogCallback): void; static asyncFFprobeExecute(session: FFprobeSession): Promise<void>;
static enableStatisticsCallback(statisticsCallback: StatisticsCallback): void; static asyncGetMediaInformationExecute(session: MediaInformationSession, waitTimeout?: number): Promise<void>;
static enableFFmpegSessionCompleteCallback(completeCallback: FFmpegSessionCompleteCallback): void; static enableLogCallback(logCallback: LogCallback): void;
static getFFmpegSessionCompleteCallback(): FFmpegSessionCompleteCallback; static enableStatisticsCallback(statisticsCallback: StatisticsCallback): void;
static enableFFprobeSessionCompleteCallback(completeCallback: FFprobeSessionCompleteCallback): void; static enableFFmpegSessionCompleteCallback(completeCallback: FFmpegSessionCompleteCallback): void;
static getFFprobeSessionCompleteCallback(): FFprobeSessionCompleteCallback; static getFFmpegSessionCompleteCallback(): FFmpegSessionCompleteCallback;
static enableMediaInformationSessionCompleteCallback(completeCallback: MediaInformationSessionCompleteCallback): void; static enableFFprobeSessionCompleteCallback(completeCallback: FFprobeSessionCompleteCallback): void;
static getMediaInformationSessionCompleteCallback(): MediaInformationSessionCompleteCallback; static getFFprobeSessionCompleteCallback(): FFprobeSessionCompleteCallback;
static getLogLevel(): Level; static enableMediaInformationSessionCompleteCallback(completeCallback: MediaInformationSessionCompleteCallback): void;
static setLogLevel(level: Level): Promise<void>; static getMediaInformationSessionCompleteCallback(): MediaInformationSessionCompleteCallback;
static getSafParameterForRead(uriString: String): Promise<string>; static getLogLevel(): Level;
static getSafParameterForWrite(uriString: String): Promise<string>; static setLogLevel(level: Level): Promise<void>;
static getSafParameter(uriString: String, openMode: String): Promise<string>; static getSafParameterForRead(uriString: String): Promise<string>;
static getSessionHistorySize(): Promise<number>; static getSafParameterForWrite(uriString: String): Promise<string>;
static setSessionHistorySize(sessionHistorySize: number): Promise<void>; static getSafParameter(uriString: String, openMode: String): Promise<string>;
static getSession(sessionId: number): Promise<Session>; static getSessionHistorySize(): Promise<number>;
static getLastSession(): Promise<Session>; static setSessionHistorySize(sessionHistorySize: number): Promise<void>;
static getLastCompletedSession(): Promise<Session>; static getSession(sessionId: number): Promise<Session>;
static getSessions(): Promise<Session[]>; static getLastSession(): Promise<Session>;
static clearSessions(): Promise<void>; static getLastCompletedSession(): Promise<Session>;
static getFFmpegSessions(): Promise<FFmpegSession[]>; static getSessions(): Promise<Session[]>;
static getFFprobeSessions(): Promise<FFprobeSession[]>; static clearSessions(): Promise<void>;
static getMediaInformationSessions(): Promise<MediaInformationSession[]>; static getFFmpegSessions(): Promise<FFmpegSession[]>;
static getSessionsByState(state): Promise<Session[]>; static getFFprobeSessions(): Promise<FFprobeSession[]>;
static getLogRedirectionStrategy(): LogRedirectionStrategy; static getMediaInformationSessions(): Promise<MediaInformationSession[]>;
static setLogRedirectionStrategy(logRedirectionStrategy: LogRedirectionStrategy); static getSessionsByState(state): Promise<Session[]>;
static messagesInTransmit(sessionId: number): Promise<number>; static getLogRedirectionStrategy(): LogRedirectionStrategy;
static sessionStateToString(state): string; static setLogRedirectionStrategy(logRedirectionStrategy: LogRedirectionStrategy);
static parseArguments(command: string): string[]; static messagesInTransmit(sessionId: number): Promise<number>;
static argumentsToString(commandArguments: string[]): string; static sessionStateToString(state): string;
static enableLogs(): Promise<void>; static parseArguments(command: string): string[];
static disableLogs(): Promise<void>; static argumentsToString(commandArguments: string[]): string;
static enableStatistics(): Promise<void>; static enableLogs(): Promise<void>;
static disableStatistics(): Promise<void>; static disableLogs(): Promise<void>;
static getPlatform(): Promise<string>; static enableStatistics(): Promise<void>;
static writeToPipe(inputPath: string, pipePath: string): Promise<number>; static disableStatistics(): Promise<void>;
static selectDocumentForRead(type?: string, extraTypes?: string[]): Promise<string>; static getPlatform(): Promise<string>;
static selectDocumentForWrite(title?: string, type?: string, extraTypes?: string[]): Promise<string>; static writeToPipe(inputPath: string, pipePath: string): Promise<number>;
} static selectDocumentForRead(type?: string, extraTypes?: string[]): Promise<string>;
export class FFmpegSession extends AbstractSession implements Session { static selectDocumentForWrite(title?: string, type?: string, extraTypes?: string[]): Promise<string>;
static create(argumentsArray: Array<string>, completeCallback?: FFmpegSessionCompleteCallback, logCallback?: LogCallback, statisticsCallback?: StatisticsCallback, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFmpegSession>; }
getStatisticsCallback(): StatisticsCallback; export class FFmpegSession extends AbstractSession implements Session {
getCompleteCallback(): FFmpegSessionCompleteCallback; static create(argumentsArray: Array<string>, completeCallback?: FFmpegSessionCompleteCallback, logCallback?: LogCallback, statisticsCallback?: StatisticsCallback, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFmpegSession>;
getAllStatistics(waitTimeout?: number): Promise<Array<Statistics>>; getStatisticsCallback(): StatisticsCallback;
getStatistics(): Promise<Array<Statistics>>; getCompleteCallback(): FFmpegSessionCompleteCallback;
getLastReceivedStatistics(): Promise<Statistics>; getAllStatistics(waitTimeout?: number): Promise<Array<Statistics>>;
isFFmpeg(): boolean; getStatistics(): Promise<Array<Statistics>>;
isFFprobe(): boolean; getLastReceivedStatistics(): Promise<Statistics>;
isMediaInformation(): boolean; isFFmpeg(): boolean;
} isFFprobe(): boolean;
export class FFprobeKit { isMediaInformation(): boolean;
static execute(command: string): Promise<FFprobeSession>; }
static executeWithArguments(commandArguments: string[]): Promise<FFprobeSession>; export class FFprobeKit {
static executeAsync(command: string, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback): Promise<FFprobeSession>; static execute(command: string): Promise<FFprobeSession>;
static executeWithArgumentsAsync(commandArguments: string[], completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback): Promise<FFprobeSession>; static executeWithArguments(commandArguments: string[]): Promise<FFprobeSession>;
static getMediaInformation(path: string, waitTimeout?: number): Promise<MediaInformationSession>; static executeAsync(command: string, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback): Promise<FFprobeSession>;
static getMediaInformationFromCommand(command: string, waitTimeout?: number): Promise<MediaInformationSession>; static executeWithArgumentsAsync(commandArguments: string[], completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback): Promise<FFprobeSession>;
static getMediaInformationFromCommandArguments(commandArguments: string[], waitTimeout?: number): Promise<MediaInformationSession>; static getMediaInformation(path: string, waitTimeout?: number): Promise<MediaInformationSession>;
static getMediaInformationAsync(path: string, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, waitTimeout?: number): Promise<MediaInformationSession>; static getMediaInformationFromCommand(command: string, waitTimeout?: number): Promise<MediaInformationSession>;
static getMediaInformationFromCommandAsync(command: string, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, waitTimeout?: number): Promise<MediaInformationSession>; static getMediaInformationFromCommandArguments(commandArguments: string[], waitTimeout?: number): Promise<MediaInformationSession>;
static getMediaInformationFromCommandArgumentsAsync(commandArguments: string[], completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, waitTimeout?: number): Promise<MediaInformationSession>; static getMediaInformationAsync(path: string, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, waitTimeout?: number): Promise<MediaInformationSession>;
static listFFprobeSessions(): Promise<FFprobeSession[]>; static getMediaInformationFromCommandAsync(command: string, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, waitTimeout?: number): Promise<MediaInformationSession>;
static listMediaInformationSessions(): Promise<MediaInformationSession[]>; static getMediaInformationFromCommandArgumentsAsync(commandArguments: string[], completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, waitTimeout?: number): Promise<MediaInformationSession>;
} static listFFprobeSessions(): Promise<FFprobeSession[]>;
export class FFprobeSession extends AbstractSession implements Session { static listMediaInformationSessions(): Promise<MediaInformationSession[]>;
static create(argumentsArray: Array<string>, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFprobeSession>; }
getCompleteCallback(): FFprobeSessionCompleteCallback; export class FFprobeSession extends AbstractSession implements Session {
isFFmpeg(): boolean; static create(argumentsArray: Array<string>, completeCallback?: FFprobeSessionCompleteCallback, logCallback?: LogCallback, logRedirectionStrategy?: LogRedirectionStrategy): Promise<FFprobeSession>;
isFFprobe(): boolean; getCompleteCallback(): FFprobeSessionCompleteCallback;
isMediaInformation(): boolean; isFFmpeg(): boolean;
} isFFprobe(): boolean;
export class Level { isMediaInformation(): boolean;
static readonly AV_LOG_STDERR: number;
static readonly AV_LOG_QUIET: number;
static readonly AV_LOG_PANIC: number;
static readonly AV_LOG_FATAL: number;
static readonly AV_LOG_ERROR: number;
static readonly AV_LOG_WARNING: number;
static readonly AV_LOG_INFO: number;
static readonly AV_LOG_VERBOSE: number;
static readonly AV_LOG_DEBUG: number;
static readonly AV_LOG_TRACE: number;
static levelToString(number: number): string; }
}
export class Log { export class Level {
static readonly AV_LOG_STDERR: number;
static readonly AV_LOG_QUIET: number;
static readonly AV_LOG_PANIC: number;
static readonly AV_LOG_FATAL: number;
static readonly AV_LOG_ERROR: number;
static readonly AV_LOG_WARNING: number;
static readonly AV_LOG_INFO: number;
static readonly AV_LOG_VERBOSE: number;
static readonly AV_LOG_DEBUG: number;
static readonly AV_LOG_TRACE: number;
static levelToString(number: number): string;
}
constructor(sessionId: number, level: number, message: String); export class Log {
getSessionId(): number; constructor(sessionId: number, level: number, message: String);
getLevel(): number; getSessionId(): number;
getMessage(): String; getLevel(): number;
} getMessage(): String;
export type LogCallback = (log: Log) => void; }
export enum LogRedirectionStrategy { export type LogCallback = (log: Log) => void;
ALWAYS_PRINT_LOGS = 0,
PRINT_LOGS_WHEN_NO_CALLBACKS_DEFINED = 1,
PRINT_LOGS_WHEN_GLOBAL_CALLBACK_NOT_DEFINED = 2,
PRINT_LOGS_WHEN_SESSION_CALLBACK_NOT_DEFINED = 3,
NEVER_PRINT_LOGS = 4
}
export class MediaInformation { export enum LogRedirectionStrategy {
ALWAYS_PRINT_LOGS = 0,
PRINT_LOGS_WHEN_NO_CALLBACKS_DEFINED = 1,
PRINT_LOGS_WHEN_GLOBAL_CALLBACK_NOT_DEFINED = 2,
PRINT_LOGS_WHEN_SESSION_CALLBACK_NOT_DEFINED = 3,
NEVER_PRINT_LOGS = 4
}
static readonly KEY_FORMAT_PROPERTIES: string; export class MediaInformation {
static readonly KEY_FILENAME: string;
static readonly KEY_FORMAT: string;
static readonly KEY_FORMAT_LONG: string;
static readonly KEY_START_TIME: string;
static readonly KEY_DURATION: string;
static readonly KEY_SIZE: string;
static readonly KEY_BIT_RATE: string;
static readonly KEY_TAGS: string;
constructor(properties: Record<string, any>); static readonly KEY_FORMAT_PROPERTIES: string;
static readonly KEY_FILENAME: string;
static readonly KEY_FORMAT: string;
static readonly KEY_FORMAT_LONG: string;
static readonly KEY_START_TIME: string;
static readonly KEY_DURATION: string;
static readonly KEY_SIZE: string;
static readonly KEY_BIT_RATE: string;
static readonly KEY_TAGS: string;
getFilename(): string; constructor(properties: Record<string, any>);
getFormat(): string; getFilename(): string;
getLongFormat(): string; getFormat(): string;
getDuration(): number; getLongFormat(): string;
getStartTime(): string; getDuration(): number;
getSize(): string; getStartTime(): string;
getBitrate(): string; getSize(): string;
getTags(): Record<string, any>; getBitrate(): string;
getStreams(): Array<StreamInformation>; getTags(): Record<string, any>;
getChapters(): Array<Chapter>; getStreams(): Array<StreamInformation>;
getStringProperty(key: string): string; getChapters(): Array<Chapter>;
getNumberProperty(key: string): number; getStringProperty(key: string): string;
getProperty(key: string): any; getNumberProperty(key: string): number;
getStringFormatProperty(key: string): string; getProperty(key: string): any;
getNumberFormatProperty(key: string): number; getStringFormatProperty(key: string): string;
getFormatProperty(key: string): any; getNumberFormatProperty(key: string): number;
getFormatProperties(): Record<string, any>; getFormatProperty(key: string): any;
getAllProperties(): Record<string, any>; getFormatProperties(): Record<string, any>;
} getAllProperties(): Record<string, any>;
export class MediaInformationJsonParser { }
static from(ffprobeJsonOutput: string): Promise<MediaInformation>; export class MediaInformationJsonParser {
static fromWithError(ffprobeJsonOutput: string): Promise<MediaInformation>; static from(ffprobeJsonOutput: string): Promise<MediaInformation>;
} static fromWithError(ffprobeJsonOutput: string): Promise<MediaInformation>;
export class MediaInformationSession extends AbstractSession implements Session { }
static create(argumentsArray: Array<string>, completeCallback?: MediaInformationSessionCompleteCallback, logCallback?: LogCallback): Promise<MediaInformationSession>; export class MediaInformationSession extends AbstractSession implements Session {
getMediaInformation(): MediaInformation; static create(argumentsArray: Array<string>, completeCallback?: MediaInformationSessionCompleteCallback, logCallback?: LogCallback): Promise<MediaInformationSession>;
setMediaInformation(mediaInformation: MediaInformation): void; getMediaInformation(): MediaInformation;
getCompleteCallback(): MediaInformationSessionCompleteCallback; setMediaInformation(mediaInformation: MediaInformation): void;
isFFmpeg(): boolean; getCompleteCallback(): MediaInformationSessionCompleteCallback;
isFFprobe(): boolean; isFFmpeg(): boolean;
isMediaInformation(): boolean; isFFprobe(): boolean;
} isMediaInformation(): boolean;
export class Packages { }
static getPackageName(): Promise<string>; export class Packages {
static getExternalLibraries(): Promise<string[]>; static getPackageName(): Promise<string>;
} static getExternalLibraries(): Promise<string[]>;
export class ReturnCode { }
static readonly SUCCESS: number; export class ReturnCode {
static readonly CANCEL: number; static readonly SUCCESS: number;
constructor(value: number); static readonly CANCEL: number;
static isSuccess(returnCode: ReturnCode): boolean; constructor(value: number);
static isCancel(returnCode: ReturnCode): boolean; static isSuccess(returnCode: ReturnCode): boolean;
getValue(): number; static isCancel(returnCode: ReturnCode): boolean;
isValueSuccess(): boolean; getValue(): number;
isValueError(): boolean; isValueSuccess(): boolean;
isValueCancel(): boolean; isValueError(): boolean;
} isValueCancel(): boolean;
export interface Session { }
getLogCallback(): LogCallback; export interface Session {
getSessionId(): number; getLogCallback(): LogCallback;
getCreateTime(): Date; getSessionId(): number;
getStartTime(): Date; getCreateTime(): Date;
getEndTime(): Promise<Date>; getStartTime(): Date;
getDuration(): Promise<number>; getEndTime(): Promise<Date>;
getArguments(): Array<String>; getDuration(): Promise<number>;
getCommand(): String; getArguments(): Array<String>;
getAllLogs(waitTimeout ?: number): Promise<Array<Log>>; getCommand(): String;
getLogs(): Promise<Array<Log>>; getAllLogs(waitTimeout ?: number): Promise<Array<Log>>;
getAllLogsAsString(waitTimeout?: number): Promise<string>; getLogs(): Promise<Array<Log>>;
getLogsAsString(): Promise<string>; getAllLogsAsString(waitTimeout?: number): Promise<string>;
getOutput(): Promise<string>; getLogsAsString(): Promise<string>;
getState(): Promise<SessionState>; getOutput(): Promise<string>;
getReturnCode(): Promise<ReturnCode>; getState(): Promise<SessionState>;
getFailStackTrace(): Promise<string>; getReturnCode(): Promise<ReturnCode>;
getLogRedirectionStrategy(): LogRedirectionStrategy; getFailStackTrace(): Promise<string>;
thereAreAsynchronousMessagesInTransmit(): Promise<boolean>; getLogRedirectionStrategy(): LogRedirectionStrategy;
isFFmpeg(): boolean; thereAreAsynchronousMessagesInTransmit(): Promise<boolean>;
isFFprobe(): boolean; isFFmpeg(): boolean;
isMediaInformation(): boolean; isFFprobe(): boolean;
cancel(): Promise<void>; isMediaInformation(): boolean;
} cancel(): Promise<void>;
export enum SessionState { }
CREATED = 0,
RUNNING = 1,
FAILED = 2,
COMPLETED = 3
}
export enum Signal { export enum SessionState {
SIGINT = 2, CREATED = 0,
SIGQUIT = 3, RUNNING = 1,
SIGPIPE = 13, FAILED = 2,
SIGTERM = 15, COMPLETED = 3
SIGXCPU = 24 }
}
export class Statistics { export enum Signal {
SIGINT = 2,
SIGQUIT = 3,
SIGPIPE = 13,
SIGTERM = 15,
SIGXCPU = 24
}
constructor(sessionId: number, videoFrameNumber: number, videoFps: number, videoQuality: number, size: number, time: number, bitrate: number, speed: number); export class Statistics {
getSessionId(): number; constructor(sessionId: number, videoFrameNumber: number, videoFps: number, videoQuality: number, size: number, time: number, bitrate: number, speed: number);
setSessionId(sessionId: number): void; getSessionId(): number;
getVideoFrameNumber(): number; setSessionId(sessionId: number): void;
setVideoFrameNumber(videoFrameNumber: number): void; getVideoFrameNumber(): number;
getVideoFps(): number; setVideoFrameNumber(videoFrameNumber: number): void;
setVideoFps(videoFps: number): void; getVideoFps(): number;
getVideoQuality(): number; setVideoFps(videoFps: number): void;
setVideoQuality(videoQuality: number): void; getVideoQuality(): number;
getSize(): number; setVideoQuality(videoQuality: number): void;
setSize(size: number): void; getSize(): number;
getTime(): number; setSize(size: number): void;
setTime(time: number): void; getTime(): number;
getBitrate(): number; setTime(time: number): void;
setBitrate(bitrate: number): void; getBitrate(): number;
getSpeed(): number; setBitrate(bitrate: number): void;
setSpeed(speed: number): void; getSpeed(): number;
} setSpeed(speed: number): void;
export type StatisticsCallback = (statistics: Statistics) => void; }
export class StreamInformation { export type StatisticsCallback = (statistics: Statistics) => void;
static readonly KEY_INDEX: string; export class StreamInformation {
static readonly KEY_TYPE: string;
static readonly KEY_CODEC: string;
static readonly KEY_CODEC_LONG: string;
static readonly KEY_FORMAT: string;
static readonly KEY_WIDTH: string;
static readonly KEY_HEIGHT: string;
static readonly KEY_BIT_RATE: string;
static readonly KEY_SAMPLE_RATE: string;
static readonly KEY_SAMPLE_FORMAT: string;
static readonly KEY_CHANNEL_LAYOUT: string;
static readonly KEY_SAMPLE_ASPECT_RATIO: string;
static readonly KEY_DISPLAY_ASPECT_RATIO: string;
static readonly KEY_AVERAGE_FRAME_RATE: string;
static readonly KEY_REAL_FRAME_RATE: string;
static readonly KEY_TIME_BASE: string;
static readonly KEY_CODEC_TIME_BASE: string;
static readonly KEY_TAGS: string;
constructor(properties: Record<string, any>); static readonly KEY_INDEX: string;
static readonly KEY_TYPE: string;
static readonly KEY_CODEC: string;
static readonly KEY_CODEC_LONG: string;
static readonly KEY_FORMAT: string;
static readonly KEY_WIDTH: string;
static readonly KEY_HEIGHT: string;
static readonly KEY_BIT_RATE: string;
static readonly KEY_SAMPLE_RATE: string;
static readonly KEY_SAMPLE_FORMAT: string;
static readonly KEY_CHANNEL_LAYOUT: string;
static readonly KEY_SAMPLE_ASPECT_RATIO: string;
static readonly KEY_DISPLAY_ASPECT_RATIO: string;
static readonly KEY_AVERAGE_FRAME_RATE: string;
static readonly KEY_REAL_FRAME_RATE: string;
static readonly KEY_TIME_BASE: string;
static readonly KEY_CODEC_TIME_BASE: string;
static readonly KEY_TAGS: string;
getIndex(): number; constructor(properties: Record<string, any>);
getType(): string; getIndex(): number;
getCodec(): string; getType(): string;
getCodecLong(): string; getCodec(): string;
getFormat(): string; getCodecLong(): string;
getWidth(): number; getFormat(): string;
getHeight(): number; getWidth(): number;
getBitrate(): string; getHeight(): number;
getSampleRate(): string; getBitrate(): string;
getSampleFormat(): string; getSampleRate(): string;
getChannelLayout(): string; getSampleFormat(): string;
getSampleAspectRatio(): string; getChannelLayout(): string;
getDisplayAspectRatio(): string; getSampleAspectRatio(): string;
getAverageFrameRate(): string; getDisplayAspectRatio(): string;
getRealFrameRate(): string; getAverageFrameRate(): string;
getTimeBase(): string; getRealFrameRate(): string;
getCodecTimeBase(): string; getTimeBase(): string;
getTags(): Record<string, any>; getCodecTimeBase(): string;
getStringProperty(key): string; getTags(): Record<string, any>;
getNumberProperty(key): number; getStringProperty(key): string;
getProperty(key): any; getNumberProperty(key): number;
getAllProperties(): Record<string, any>; getProperty(key): any;
} getAllProperties(): Record<string, any>;
export class Chapter { }
static readonly KEY_ID: string; export class Chapter {
static readonly KEY_TIME_BASE: string;
static readonly KEY_START: string;
static readonly KEY_START_TIME: string;
static readonly KEY_END: string;
static readonly KEY_END_TIME: string;
static readonly KEY_TAGS: string;
constructor(properties: Record<string, any>); static readonly KEY_ID: string;
static readonly KEY_TIME_BASE: string;
static readonly KEY_START: string;
static readonly KEY_START_TIME: string;
static readonly KEY_END: string;
static readonly KEY_END_TIME: string;
static readonly KEY_TAGS: string;
getId(): number; constructor(properties: Record<string, any>);
getTimeBase(): string; getId(): number;
getStart(): number; getTimeBase(): string;
getStartTime(): string; getStart(): number;
getEnd(): number; getStartTime(): string;
getEndTime(): string; getEnd(): number;
getTags(): Record<string, any>; getEndTime(): string;
getStringProperty(key): string; getTags(): Record<string, any>;
getNumberProperty(key): number; getStringProperty(key): string;
getProperty(key): any; getNumberProperty(key): number;
getAllProperties(): Record<string, any>; getProperty(key): any;
} getAllProperties(): Record<string, any>;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment