aboutsummaryrefslogtreecommitdiff
path: root/common/src/stream.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-09-30 15:21:57 +0200
committermetamuffin <metamuffin@disroot.org>2023-09-30 15:21:57 +0200
commit30e3d18c6ec50572365baaaaa3542769e82e763a (patch)
tree3eade459fe488729bbe61dd85ac49948d5e24ef7 /common/src/stream.rs
parentd0d8316a015fa0434c2871541b83ea0aca781a99 (diff)
downloadjellything-30e3d18c6ec50572365baaaaa3542769e82e763a.tar
jellything-30e3d18c6ec50572365baaaaa3542769e82e763a.tar.bz2
jellything-30e3d18c6ec50572365baaaaa3542769e82e763a.tar.zst
move some files around for new remuxer + small changes
Diffstat (limited to 'common/src/stream.rs')
-rw-r--r--common/src/stream.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/common/src/stream.rs b/common/src/stream.rs
index ca09999..af19062 100644
--- a/common/src/stream.rs
+++ b/common/src/stream.rs
@@ -1,3 +1,8 @@
+/*
+ This file is part of jellything (https://codeberg.org/metamuffin/jellything)
+ which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
+ Copyright (C) 2023 metamuffin <metamuffin.org>
+*/
#[cfg(feature = "rocket")]
use rocket::{FromForm, FromFormField, UriDisplayQuery};
use serde::{Deserialize, Serialize};
@@ -10,6 +15,7 @@ pub struct StreamSpec {
pub webm: Option<bool>,
pub abr: Option<usize>,
pub vbr: Option<usize>,
+ pub width: Option<usize>,
pub index: Option<usize>,
}
@@ -31,6 +37,7 @@ impl Default for StreamSpec {
tracks: Vec::new(),
format: StreamFormat::Matroska,
webm: Some(true),
+ width: None,
abr: None,
vbr: None,
index: None,
@@ -66,7 +73,10 @@ impl StreamSpec {
writeln!(u, "&index={index}").unwrap();
}
if let Some(webm) = self.webm {
- writeln!(u, "&webmm={webm}").unwrap();
+ writeln!(u, "&webm={webm}").unwrap();
+ }
+ if let Some(width) = self.width {
+ writeln!(u, "&width={width}").unwrap();
}
u
}