aboutsummaryrefslogtreecommitdiff
path: root/stream/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stream/src/lib.rs')
-rw-r--r--stream/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/stream/src/lib.rs b/stream/src/lib.rs
index 906e638..4d96f8c 100644
--- a/stream/src/lib.rs
+++ b/stream/src/lib.rs
@@ -6,7 +6,7 @@
#![feature(iterator_try_collect)]
pub mod hls;
pub mod jhls;
-pub mod segment;
+pub mod fragment;
pub mod webvtt;
use anyhow::{anyhow, bail, Context, Result};
@@ -18,7 +18,7 @@ use jellycommon::{
LocalTrack, Node, TrackSource,
};
use jhls::jhls_index;
-use segment::segment_stream;
+use fragment::fragment_stream;
use std::{io::SeekFrom, ops::Range};
use tokio::{
fs::File,
@@ -41,7 +41,7 @@ pub fn stream_head(spec: &StreamSpec) -> StreamHead {
StreamFormat::HlsMaster | StreamFormat::HlsVariant => StreamHead { content_type: "application/vnd.apple.mpegurl", range_supported: false },
StreamFormat::JhlsIndex => StreamHead { content_type: "application/jellything-seekindex+json", range_supported: false },
StreamFormat::Webvtt => StreamHead { content_type: "text/vtt", range_supported: false },
- StreamFormat::Snippet => StreamHead { content_type: webm_or_mkv, range_supported: false },
+ StreamFormat::Fragment => StreamHead { content_type: webm_or_mkv, range_supported: false },
StreamFormat::Jvtt => StreamHead { content_type: "application/jellything-vtt+json", range_supported: false },
}
}
@@ -87,7 +87,7 @@ pub async fn stream(
StreamFormat::HlsMaster => hls_master_stream(node, local_tracks, spec, b).await?,
StreamFormat::HlsVariant => hls_variant_stream(node, local_tracks, spec, b).await?,
StreamFormat::JhlsIndex => jhls_index(node, &local_tracks, spec, b, perms).await?,
- StreamFormat::Snippet => segment_stream(node, local_tracks, spec, b, perms).await?,
+ StreamFormat::Fragment => fragment_stream(node, local_tracks, spec, b, perms).await?,
StreamFormat::Webvtt => vtt_stream(false, node, local_tracks, spec, b).await?,
StreamFormat::Jvtt => vtt_stream(true, node, local_tracks, spec, b).await?,
}