mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-09 18:55:27 +00:00
livesync: Improve formatting
Move some code around to make it a bit more readable. No change in behavior. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1086>
This commit is contained in:
parent
9d67753fd6
commit
fbf50b395d
1 changed files with 8 additions and 8 deletions
|
@ -51,15 +51,15 @@ enum Item {
|
||||||
Query(std::ptr::NonNull<gst::QueryRef>, mpsc::SyncSender<bool>),
|
Query(std::ptr::NonNull<gst::QueryRef>, mpsc::SyncSender<bool>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SAFETY: Need to be able to pass *mut gst::QueryRef
|
||||||
|
unsafe impl Send for Item {}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
struct Timestamps {
|
struct Timestamps {
|
||||||
start: gst::ClockTime,
|
start: gst::ClockTime,
|
||||||
end: gst::ClockTime,
|
end: gst::ClockTime,
|
||||||
}
|
}
|
||||||
|
|
||||||
// SAFETY: Need to be able to pass *mut gst::QueryRef
|
|
||||||
unsafe impl Send for Item {}
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct LiveSync {
|
pub struct LiveSync {
|
||||||
state: Mutex<State>,
|
state: Mutex<State>,
|
||||||
|
@ -614,11 +614,6 @@ impl LiveSync {
|
||||||
state.in_segment = Some(segment.clone());
|
state.in_segment = Some(segment.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
gst::EventView::Gap(_) => {
|
|
||||||
gst::debug!(CAT, imp: self, "Got gap event");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
gst::EventView::Eos(_) => {
|
gst::EventView::Eos(_) => {
|
||||||
let mut state = self.state.lock();
|
let mut state = self.state.lock();
|
||||||
|
|
||||||
|
@ -648,6 +643,11 @@ impl LiveSync {
|
||||||
state.update_fallback_duration();
|
state.update_fallback_duration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst::EventView::Gap(_) => {
|
||||||
|
gst::debug!(CAT, imp: self, "Got gap event");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue