diff options
Diffstat (limited to 'common/src/config.rs')
-rw-r--r-- | common/src/config.rs | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/common/src/config.rs b/common/src/config.rs index 522fa0f..4ec43eb 100644 --- a/common/src/config.rs +++ b/common/src/config.rs @@ -29,28 +29,25 @@ pub struct GlobalConfig { #[serde(default)] pub default_permission_set: PermissionSet, #[serde(default)] - pub encoders: EncoderArgs, + pub transcoder: TranscoderConfig, } +#[rustfmt::skip] #[derive(Debug, Deserialize, Serialize, Default)] -pub struct EncoderArgs { - pub avc: Option<String>, - pub hevc: Option<String>, - pub vp8: Option<String>, - pub vp9: Option<String>, - pub av1: Option<String>, - pub generic: Option<String>, -} - -#[derive(Debug, Deserialize, Serialize, Clone, Copy)] -#[serde(rename_all = "snake_case")] -pub enum EncoderClass { - Aom, - Svt, - X26n, - Vpx, - Vaapi, - Rkmpp, +pub struct TranscoderConfig { + #[serde(default)] pub offer_avc: bool, + #[serde(default)] pub offer_hevc: bool, + #[serde(default)] pub offer_vp8: bool, + #[serde(default)] pub offer_vp9: bool, + #[serde(default)] pub offer_av1: bool, + #[serde(default)] pub enable_rkmpp: bool, + #[serde(default)] pub enable_rkrga: bool, + #[serde(default)] pub use_svtav1: bool, + #[serde(default)] pub use_rav1e: bool, + pub svtav1_preset: Option<u8>, // 0..=13, high is fast + pub rav1e_preset: Option<u8>, // 0..=10 + pub aom_preset: Option<u8>, // 0..=8, high is fast + pub x264_preset: Option<String>, } #[derive(Serialize, Deserialize, Debug, Default)] |