mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +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/1083>
This commit is contained in:
parent
c1bfeb4c23
commit
953773a314
1 changed files with 8 additions and 8 deletions
|
@ -51,15 +51,15 @@ enum Item {
|
|||
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)]
|
||||
struct Timestamps {
|
||||
start: gst::ClockTime,
|
||||
end: gst::ClockTime,
|
||||
}
|
||||
|
||||
// SAFETY: Need to be able to pass *mut gst::QueryRef
|
||||
unsafe impl Send for Item {}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LiveSync {
|
||||
state: Mutex<State>,
|
||||
|
@ -614,11 +614,6 @@ impl LiveSync {
|
|||
state.in_segment = Some(segment.clone());
|
||||
}
|
||||
|
||||
gst::EventView::Gap(_) => {
|
||||
gst::debug!(CAT, imp: self, "Got gap event");
|
||||
return true;
|
||||
}
|
||||
|
||||
gst::EventView::Eos(_) => {
|
||||
let mut state = self.state.lock();
|
||||
|
||||
|
@ -648,6 +643,11 @@ impl LiveSync {
|
|||
state.update_fallback_duration();
|
||||
}
|
||||
|
||||
gst::EventView::Gap(_) => {
|
||||
gst::debug!(CAT, imp: self, "Got gap event");
|
||||
return true;
|
||||
}
|
||||
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue