Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2020-04-22 03:14:04 +0300
committerMathieu Duponchelle <mathieu@centricular.com>2020-04-23 21:10:42 +0300
commit5c82e6fe6c517adaff1f8081b6651607cae3cf37 (patch)
tree9da8a81a67a1e5081c58d597eb82b562e143879f /video
parentfbb2022b25782bb67ef2e651ec3ece8cfb948831 (diff)
tttocea608: forward gaps from upstream
taking our own latency into account Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/314>
Diffstat (limited to 'video')
-rw-r--r--video/closedcaption/src/tttocea608.rs21
1 files changed, 15 insertions, 6 deletions
diff --git a/video/closedcaption/src/tttocea608.rs b/video/closedcaption/src/tttocea608.rs
index 14824577b..ddcb4db1b 100644
--- a/video/closedcaption/src/tttocea608.rs
+++ b/video/closedcaption/src/tttocea608.rs
@@ -196,12 +196,7 @@ lazy_static! {
}
impl TtToCea608 {
- fn push_list(
- &self,
- bufferlist: gst::BufferList,
- last_frame_no: u64,
- new_frame_no: u64,
- ) -> Result<gst::FlowSuccess, gst::FlowError> {
+ fn push_gap(&self, last_frame_no: u64, new_frame_no: u64) {
if last_frame_no != new_frame_no {
let state = self.state.lock().unwrap();
let (fps_n, fps_d) = (
@@ -227,6 +222,15 @@ impl TtToCea608 {
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)
}
@@ -566,6 +570,11 @@ impl TtToCea608 {
*/
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;