mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
Update to m3u8-rs 4.0
This commit is contained in:
parent
94b7677318
commit
9e3f713aa9
5 changed files with 6 additions and 9 deletions
|
@ -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]
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue