aboutsummaryrefslogtreecommitdiff
path: root/common/src/jhls.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-02 20:02:06 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-02 20:02:06 +0200
commite25beb3e0c2531b09d8efd70e858396dcc631dd2 (patch)
tree917189b7e5e5363c830fbdabcb416e16623a6438 /common/src/jhls.rs
parent839c1e1490e7cd856e6ada1dcfd82f3d4505c89c (diff)
downloadjellything-e25beb3e0c2531b09d8efd70e858396dcc631dd2.tar
jellything-e25beb3e0c2531b09d8efd70e858396dcc631dd2.tar.bz2
jellything-e25beb3e0c2531b09d8efd70e858396dcc631dd2.tar.zst
add profiles to jhls
Diffstat (limited to 'common/src/jhls.rs')
-rw-r--r--common/src/jhls.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/common/src/jhls.rs b/common/src/jhls.rs
index 306161f..e3ef23c 100644
--- a/common/src/jhls.rs
+++ b/common/src/jhls.rs
@@ -5,6 +5,7 @@ use std::ops::Range;
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct JhlsMetadata {
pub duration: f64,
+ pub extra_profiles: Vec<EncodingProfile>,
pub tracks: Vec<JhlsTrack>,
}
@@ -13,3 +14,22 @@ pub struct JhlsTrack {
pub info: SourceTrack,
pub segments: Vec<Range<f64>>,
}
+
+#[derive(Debug, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "snake_case")]
+pub enum EncodingProfile {
+ Video {
+ codec: String,
+ preset: u8,
+ bitrate: usize,
+ width: usize,
+ },
+ Audio {
+ codec: String,
+ bitrate: usize,
+ sample_rate: Option<f64>,
+ },
+ Subtitles {
+ codec: String,
+ },
+}