aboutsummaryrefslogtreecommitdiff
path: root/common/src/stream.rs
diff options
context:
space:
mode:
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
}