chore: refactor transcode config routing (#9800)

* chore: refactor transcode config

* rename parameter

* handle no /dev/dri

* prefer undefined
This commit is contained in:
Mert 2024-05-27 15:20:07 -04:00 committed by GitHub
parent 21bd20fd75
commit dca420ef70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 115 additions and 123 deletions

View file

@ -53,7 +53,7 @@ export interface VideoInfo {
audioStreams: AudioStreamInfo[];
}
export interface TranscodeOptions {
export interface TranscodeCommand {
inputOptions: string[];
outputOptions: string[];
twoPass: boolean;
@ -67,7 +67,7 @@ export interface BitrateDistribution {
}
export interface VideoCodecSWConfig {
getOptions(target: TranscodeTarget, videoStream: VideoStreamInfo, audioStream: AudioStreamInfo): TranscodeOptions;
getCommand(target: TranscodeTarget, videoStream: VideoStreamInfo, audioStream: AudioStreamInfo): TranscodeCommand;
}
export interface VideoCodecHWConfig extends VideoCodecSWConfig {
@ -83,5 +83,5 @@ export interface IMediaRepository {
// video
probe(input: string): Promise<VideoInfo>;
transcode(input: string, output: string | Writable, options: TranscodeOptions): Promise<void>;
transcode(input: string, output: string | Writable, command: TranscodeCommand): Promise<void>;
}