mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-25 10:28:09 +00:00
tttocea608: forward gaps from upstream
taking our own latency into account Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/314>
This commit is contained in:
parent
fbb2022b25
commit
5c82e6fe6c
1 changed files with 15 additions and 6 deletions
|
@ -196,12 +196,7 @@ lazy_static! {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TtToCea608 {
|
impl TtToCea608 {
|
||||||
fn push_list(
|
fn push_gap(&self, last_frame_no: u64, new_frame_no: u64) {
|
||||||
&self,
|
|
||||||
bufferlist: gst::BufferList,
|
|
||||||
last_frame_no: u64,
|
|
||||||
new_frame_no: u64,
|
|
||||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
|
||||||
if last_frame_no != new_frame_no {
|
if last_frame_no != new_frame_no {
|
||||||
let state = self.state.lock().unwrap();
|
let state = self.state.lock().unwrap();
|
||||||
let (fps_n, fps_d) = (
|
let (fps_n, fps_d) = (
|
||||||
|
@ -227,6 +222,15 @@ impl TtToCea608 {
|
||||||
|
|
||||||
let _ = self.srcpad.push_event(event);
|
let _ = self.srcpad.push_event(event);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn push_list(
|
||||||
|
&self,
|
||||||
|
bufferlist: gst::BufferList,
|
||||||
|
last_frame_no: u64,
|
||||||
|
new_frame_no: u64,
|
||||||
|
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
|
self.push_gap(last_frame_no, new_frame_no);
|
||||||
self.srcpad.push_list(bufferlist)
|
self.srcpad.push_list(bufferlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,6 +570,11 @@ impl TtToCea608 {
|
||||||
*/
|
*/
|
||||||
let _ = self.do_erase_display(min_frame_no, erase_display_frame_no);
|
let _ = self.do_erase_display(min_frame_no, erase_display_frame_no);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
let last_frame_no = state.last_frame_no;
|
||||||
|
state.last_frame_no = frame_no;
|
||||||
|
drop(state);
|
||||||
|
self.push_gap(last_frame_no, frame_no);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue