diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-01-22 13:18:02 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-01-22 13:18:02 +0300 |
commit | f44b86cd30cf49879b14d759b0c8c8284c9437b5 (patch) | |
tree | cbf9f30fa5738a60fc031338932d0ccafcb82efd /video | |
parent | 65fcd55160d126c549a89b613cdf84714a5b346e (diff) |
Simplify some code around event/query views
Diffstat (limited to 'video')
-rw-r--r-- | video/cdg/src/cdgdec/imp.rs | 2 | ||||
-rw-r--r-- | video/closedcaption/src/jsontovtt/imp.rs | 2 | ||||
-rw-r--r-- | video/closedcaption/src/mcc_parse/imp.rs | 6 | ||||
-rw-r--r-- | video/closedcaption/src/scc_parse/imp.rs | 6 | ||||
-rw-r--r-- | video/dav1d/src/dav1ddec/imp.rs | 2 | ||||
-rw-r--r-- | video/ffv1/src/ffv1dec/imp.rs | 2 | ||||
-rw-r--r-- | video/gif/src/gifenc/imp.rs | 2 | ||||
-rw-r--r-- | video/gtk4/src/sink/imp.rs | 2 | ||||
-rw-r--r-- | video/rav1e/src/rav1enc/imp.rs | 2 | ||||
-rw-r--r-- | video/videofx/src/border/roundedcorners.rs | 4 |
10 files changed, 11 insertions, 19 deletions
diff --git a/video/cdg/src/cdgdec/imp.rs b/video/cdg/src/cdgdec/imp.rs index eff413732..e8cab15be 100644 --- a/video/cdg/src/cdgdec/imp.rs +++ b/video/cdg/src/cdgdec/imp.rs @@ -202,7 +202,7 @@ impl VideoDecoderImpl for CdgDec { fn decide_allocation( &self, element: &Self::Type, - query: &mut gst::query::Allocation<gst::QueryRef>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { if query .find_allocation_meta::<gst_video::VideoMeta>() diff --git a/video/closedcaption/src/jsontovtt/imp.rs b/video/closedcaption/src/jsontovtt/imp.rs index d38b336e5..6a07b2f1e 100644 --- a/video/closedcaption/src/jsontovtt/imp.rs +++ b/video/closedcaption/src/jsontovtt/imp.rs @@ -299,7 +299,7 @@ impl State { Ok(ret) } - fn handle_gap(&mut self, gap: &gst::event::Gap<gst::EventRef>) -> Vec<gst::Buffer> { + fn handle_gap(&mut self, gap: &gst::event::Gap) -> Vec<gst::Buffer> { let mut ret = vec![]; let (pts, duration) = gap.get(); diff --git a/video/closedcaption/src/mcc_parse/imp.rs b/video/closedcaption/src/mcc_parse/imp.rs index ec22450ef..c42684648 100644 --- a/video/closedcaption/src/mcc_parse/imp.rs +++ b/video/closedcaption/src/mcc_parse/imp.rs @@ -943,11 +943,7 @@ impl MccParse { } } - fn perform_seek( - &self, - event: &gst::event::Seek<gst::EventRef>, - element: &super::MccParse, - ) -> bool { + fn perform_seek(&self, event: &gst::event::Seek, element: &super::MccParse) -> bool { if self.state.lock().unwrap().pull.is_none() { gst_error!(CAT, obj: element, "seeking is only supported in pull mode"); return false; diff --git a/video/closedcaption/src/scc_parse/imp.rs b/video/closedcaption/src/scc_parse/imp.rs index 5163e0151..b046591fd 100644 --- a/video/closedcaption/src/scc_parse/imp.rs +++ b/video/closedcaption/src/scc_parse/imp.rs @@ -818,11 +818,7 @@ impl SccParse { } } - fn perform_seek( - &self, - event: &gst::event::Seek<gst::EventRef>, - element: &super::SccParse, - ) -> bool { + fn perform_seek(&self, event: &gst::event::Seek, element: &super::SccParse) -> bool { if self.state.lock().unwrap().pull.is_none() { gst_error!(CAT, obj: element, "seeking is only supported in pull mode"); return false; diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs index 9ce371d90..eb15f424d 100644 --- a/video/dav1d/src/dav1ddec/imp.rs +++ b/video/dav1d/src/dav1ddec/imp.rs @@ -463,7 +463,7 @@ impl VideoDecoderImpl for Dav1dDec { fn decide_allocation( &self, element: &Self::Type, - query: &mut gst::query::Allocation<gst::QueryRef>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { self.negotiation_infos.lock().unwrap().video_meta_supported = query .find_allocation_meta::<gst_video::VideoMeta>() diff --git a/video/ffv1/src/ffv1dec/imp.rs b/video/ffv1/src/ffv1dec/imp.rs index da359954f..046c23051 100644 --- a/video/ffv1/src/ffv1dec/imp.rs +++ b/video/ffv1/src/ffv1dec/imp.rs @@ -458,7 +458,7 @@ impl VideoDecoderImpl for Ffv1Dec { fn decide_allocation( &self, element: &Self::Type, - query: &mut gst::query::Allocation<gst::QueryRef>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { let supported = query .find_allocation_meta::<gst_video::VideoMeta>() diff --git a/video/gif/src/gifenc/imp.rs b/video/gif/src/gifenc/imp.rs index 048dc62f3..89c728f22 100644 --- a/video/gif/src/gifenc/imp.rs +++ b/video/gif/src/gifenc/imp.rs @@ -275,7 +275,7 @@ impl VideoEncoderImpl for GifEnc { fn propose_allocation( &self, element: &Self::Type, - query: &mut gst::query::Allocation<gst::QueryRef>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { query.add_allocation_meta::<gst_video::VideoMeta>(None); self.parent_propose_allocation(element, query) diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs index 90c0b96fb..a98416408 100644 --- a/video/gtk4/src/sink/imp.rs +++ b/video/gtk4/src/sink/imp.rs @@ -225,7 +225,7 @@ impl BaseSinkImpl for PaintableSink { fn propose_allocation( &self, element: &Self::Type, - query: &mut gst::query::Allocation<gst::QueryRef>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { query.add_allocation_meta::<gst_video::VideoMeta>(None); diff --git a/video/rav1e/src/rav1enc/imp.rs b/video/rav1e/src/rav1enc/imp.rs index 286d87e69..948fe8f4e 100644 --- a/video/rav1e/src/rav1enc/imp.rs +++ b/video/rav1e/src/rav1enc/imp.rs @@ -488,7 +488,7 @@ impl VideoEncoderImpl for Rav1Enc { fn propose_allocation( &self, element: &Self::Type, - query: &mut gst::query::Allocation<gst::QueryRef>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { query.add_allocation_meta::<gst_video::VideoMeta>(None); self.parent_propose_allocation(element, query) diff --git a/video/videofx/src/border/roundedcorners.rs b/video/videofx/src/border/roundedcorners.rs index 348569bf2..d5a001c73 100644 --- a/video/videofx/src/border/roundedcorners.rs +++ b/video/videofx/src/border/roundedcorners.rs @@ -610,8 +610,8 @@ impl BaseTransformImpl for RoundedCorners { fn propose_allocation( &self, element: &Self::Type, - decide_query: Option<&gst::query::Allocation<gst::QueryRef>>, - query: &mut gst::query::Allocation<gst::QueryRef>, + decide_query: Option<&gst::query::Allocation>, + query: &mut gst::query::Allocation, ) -> Result<(), gst::LoggableError> { query.add_allocation_meta::<gst_video::VideoMeta>(None); self.parent_propose_allocation(element, decide_query, query) |