diff options
Diffstat (limited to 'stream/src/lib.rs')
-rw-r--r-- | stream/src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stream/src/lib.rs b/stream/src/lib.rs index 5f9edb9..726f1e8 100644 --- a/stream/src/lib.rs +++ b/stream/src/lib.rs @@ -12,6 +12,7 @@ use jellycommon::{ stream::{StreamFormat, StreamSpec}, LocalTrack, MediaSource, Node, }; +use segment::stream_segment; use std::{io::SeekFrom, ops::Range}; use tokio::{ fs::File, @@ -52,9 +53,9 @@ pub async fn stream(node: Node, spec: StreamSpec, range: Range<usize>) -> Result match spec.format { StreamFormat::Original => original_stream(track_sources, spec, range, b).await?, StreamFormat::Matroska => remux_stream(node, track_sources, spec, range, b).await?, - StreamFormat::Hls => todo!(), - StreamFormat::Jhls => todo!(), - StreamFormat::Segment => todo!(), + StreamFormat::Hls => bail!("unsupported"), + StreamFormat::Jhls => bail!("unsupported"), + StreamFormat::Segment => stream_segment(node, track_sources, spec, b).await?, } Ok(a) |