fix: Исправление выбора энкодер/декодер

This commit is contained in:
2026-01-20 14:24:51 +03:00
parent 88fc443cb6
commit 69b3a4804f
15 changed files with 457 additions and 250 deletions

View File

@@ -1,12 +1,22 @@
/**
* Video codec type for encoding
*/
export type CodecType = 'av1' | 'h264' | 'dual';
export type CodecType = 'av1' | 'h264';
/**
* Streaming format type
*/
export type StreamingFormat = 'dash' | 'hls' | 'both';
export type StreamingFormat = 'dash' | 'hls';
/**
* Пользовательский выбор кодека (auto = h264 + av1 при наличии HW)
*/
export type CodecChoice = CodecType | 'auto';
/**
* Пользовательский выбор форматов (auto = dash + hls)
*/
export type StreamingFormatChoice = StreamingFormat | 'auto';
/**
* Тип аппаратного ускорителя
@@ -75,11 +85,11 @@ export interface DashConvertOptions {
/** Custom resolution profiles as strings (e.g., ['360p', '480p', '720p@60']) */
customProfiles?: string[];
/** Video codec to use: 'av1', 'h264', or 'dual' for both (default: 'dual') */
codec?: CodecType;
/** Video codec selection: h264, av1, or auto (default: auto = h264 + AV1 if HW) */
codec?: CodecChoice;
/** Streaming format to generate: 'dash', 'hls', or 'both' (default: 'both') */
format?: StreamingFormat;
/** Streaming formats: dash, hls, or auto (default: auto = оба) */
format?: StreamingFormatChoice;
/** Предпочитаемый аппаратный ускоритель (auto по умолчанию) */
hardwareAccelerator?: HardwareAccelerationOption;
@@ -172,10 +182,10 @@ export interface ConversionProgress {
* Result of DASH conversion
*/
export interface DashConvertResult {
/** Path to generated DASH manifest (if format is 'dash' or 'both') */
/** Path to generated DASH manifest (если форматы включают DASH) */
manifestPath?: string;
/** Path to generated HLS manifest (if format is 'hls' or 'both') */
/** Path to generated HLS manifest (если форматы включают HLS) */
hlsManifestPath?: string;
/** Paths to generated video segments */
@@ -204,11 +214,11 @@ export interface DashConvertResult {
/** Выбранный аппаратный декодер */
selectedDecoder: HardwareAccelerator;
/** Codec type used for encoding */
codecType: CodecType;
/** Список использованных кодеков */
codecs: CodecType[];
/** Streaming format generated */
format: StreamingFormat;
/** Список сгенерированных форматов */
formats: StreamingFormat[];
}
/**