aboutsummaryrefslogtreecommitdiff
path: root/stream/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-29 13:22:21 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-29 13:22:21 +0100
commit2676e755286d117b100d379fce84ec3da6d8ae98 (patch)
tree2a075db5468f0c8c2f653be5222c183f4362fcfa /stream/src/lib.rs
parenta4526fd2eb670c8fac2c28eb1597f0c091f25a2a (diff)
downloadjellything-2676e755286d117b100d379fce84ec3da6d8ae98.tar
jellything-2676e755286d117b100d379fce84ec3da6d8ae98.tar.bz2
jellything-2676e755286d117b100d379fce84ec3da6d8ae98.tar.zst
consistent name for {snippet,segment?,fragment}
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?,
}