aboutsummaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
Diffstat (limited to 'common/src')
-rw-r--r--common/src/config.rs35
-rw-r--r--common/src/stream.rs2
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,