diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-21 20:36:34 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-21 20:36:34 +0200 |
commit | b9d8e20b6bff6b51f73106b688bd6e5d98e08215 (patch) | |
tree | 0e6a82ff9fd346d79a0879c373c838f4e2a49e8a /common | |
parent | 30c3bb552aba8794d57eb08688e0c1c751ab27a0 (diff) | |
download | jellything-b9d8e20b6bff6b51f73106b688bd6e5d98e08215.tar jellything-b9d8e20b6bff6b51f73106b688bd6e5d98e08215.tar.bz2 jellything-b9d8e20b6bff6b51f73106b688bd6e5d98e08215.tar.zst |
new transcoding args system
Diffstat (limited to 'common')
-rw-r--r-- | common/src/config.rs | 35 | ||||
-rw-r--r-- | common/src/stream.rs | 2 |
2 files changed, 17 insertions, 20 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)] diff --git a/common/src/stream.rs b/common/src/stream.rs index 79cb380..81dd298 100644 --- a/common/src/stream.rs +++ b/common/src/stream.rs @@ -82,7 +82,7 @@ pub struct StreamTrackInfo { pub formats: Vec<StreamFormatInfo>, } -#[derive(Debug, Copy, Clone, Deserialize, Serialize)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize, Serialize)] #[serde(rename_all = "snake_case")] pub enum TrackKind { Video, |