Update to m3u8-rs 4.0

This commit is contained in:
Sebastian Dröge 2022-04-14 09:52:39 +03:00 committed by Sebastian Dröge
parent 94b7677318
commit 9e3f713aa9
5 changed files with 6 additions and 9 deletions

View file

@ -24,7 +24,7 @@ path = "src/lib.rs"
gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] }
gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] }
m3u8-rs = "=3.0.0"
m3u8-rs = "4.0"
chrono = "0.4"
[build-dependencies]

View file

@ -118,7 +118,7 @@ struct StreamState {
trimmed_segments: VecDeque<UnreffedSegment>,
start_date_time: Option<DateTime<Utc>>,
start_time: Option<gst::ClockTime>,
media_sequence: i32,
media_sequence: u64,
segment_index: u32,
}

View file

@ -14,7 +14,7 @@ gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/g
glib = { git = "https://github.com/gtk-rs/gtk-rs-core" }
gio = { git = "https://github.com/gtk-rs/gtk-rs-core" }
once_cell = "1.7.2"
m3u8-rs = "=3.0.0"
m3u8-rs = "4.0"
regex = "1"
[dev-dependencies]

View file

@ -124,10 +124,7 @@ impl HlsSink3 {
let (target_duration, playlist_type) = {
let settings = self.settings.lock().unwrap();
(
settings.target_duration as f32,
settings.playlist_type.clone(),
)
(settings.target_duration as f32, settings.playlist_type)
};
let mut state = self.state.lock().unwrap();

View file

@ -24,7 +24,7 @@ static SEGMENT_IDX_PATTERN: Lazy<regex::Regex> = Lazy::new(|| Regex::new(r"(%0(\
#[derive(Debug, Clone)]
pub struct Playlist {
inner: MediaPlaylist,
playlist_index: i32,
playlist_index: u64,
status: PlaylistRenderState,
turn_vod: bool,
}
@ -94,7 +94,7 @@ impl Playlist {
}
self.playlist_index += 1;
self.inner.media_sequence = self.playlist_index as i32 - self.inner.segments.len() as i32;
self.inner.media_sequence = self.playlist_index as u64 - self.inner.segments.len() as u64;
}
/// Sets the playlist to started state.