From 2e41b2b373d5a057061a7694aa5e83001efeaf0f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 26 Jan 2024 03:46:05 +0100 Subject: fix a bunch of stupid things regarding subtitles. still doesnt work --- common/src/jhls.rs | 7 +++++++ common/src/stream.rs | 2 ++ 2 files changed, 9 insertions(+) (limited to 'common/src') diff --git a/common/src/jhls.rs b/common/src/jhls.rs index b365b3f..f4448b6 100644 --- a/common/src/jhls.rs +++ b/common/src/jhls.rs @@ -31,3 +31,10 @@ pub enum EncodingProfile { codec: String, }, } + +#[derive(Debug, Serialize, Deserialize)] +pub struct SubtitleCue { + pub start: f64, + pub end: f64, + pub content: String, +} diff --git a/common/src/stream.rs b/common/src/stream.rs index 151d497..aa7195e 100644 --- a/common/src/stream.rs +++ b/common/src/stream.rs @@ -30,6 +30,7 @@ pub enum StreamFormat { #[cfg_attr(feature = "rocket", field(value = "jhlsi"))] JhlsIndex, #[cfg_attr(feature = "rocket", field(value = "snippet"))] Snippet, #[cfg_attr(feature = "rocket", field(value = "webvtt"))] Webvtt, + #[cfg_attr(feature = "rocket", field(value = "jvtt"))] Jvtt, } impl Default for StreamSpec { @@ -78,6 +79,7 @@ impl StreamSpec { impl StreamFormat { pub fn ident(&self) -> &'static str { match self { + StreamFormat::Jvtt => "jvtt", StreamFormat::Original => "original", StreamFormat::Matroska => "matroska", StreamFormat::HlsMaster => "hlsmaster", -- cgit v1.2.3-70-g09d2