From 0eb777cf5acf7c48ade2a83de5f441e96cf61b90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 26 Jul 2020 18:33:14 +0300 Subject: [PATCH] Update for removal of ObjectImpl::get_type_data() --- audio/audiofx/src/audioecho.rs | 2 - audio/audiofx/src/audioloudnorm.rs | 2 - audio/claxon/src/claxondec.rs | 4 +- audio/csound/src/filter.rs | 4 +- audio/lewton/src/lewtondec.rs | 4 +- generic/file/src/filesink.rs | 2 - generic/file/src/filesrc.rs | 2 - generic/sodium/src/decrypter.rs | 2 - generic/sodium/src/encrypter.rs | 2 - generic/threadshare/src/appsrc.rs | 4 +- generic/threadshare/src/inputselector.rs | 4 +- .../src/jitterbuffer/jitterbuffer.rs | 4 +- generic/threadshare/src/proxy.rs | 6 +- generic/threadshare/src/queue.rs | 4 +- generic/threadshare/src/tcpclientsrc.rs | 4 +- generic/threadshare/src/udpsink.rs | 4 +- generic/threadshare/src/udpsrc.rs | 4 +- generic/threadshare/tests/pad.rs | 6 +- net/reqwest/src/reqwesthttpsrc.rs | 2 - net/rusoto/src/aws_transcribe_parse.rs | 2 - net/rusoto/src/s3sink.rs | 2 - net/rusoto/src/s3src.rs | 2 - text/wrap/src/gsttextwrap.rs | 2 - tutorial/src/identity.rs | 3 - tutorial/src/progressbin.rs | 3 - tutorial/src/rgb2gray.rs | 3 - tutorial/src/sinesrc.rs | 3 - tutorial/tutorial-1.md | 10 +- tutorial/tutorial-2.md | 3 - .../src/base/subclass/aggregator.rs | 113 ++++++++---------- .../src/base/subclass/aggregator_pad.rs | 24 ++-- utils/fallbackswitch/src/fallbacksrc.rs | 4 - utils/fallbackswitch/src/fallbackswitch.rs | 2 - utils/togglerecord/src/togglerecord.rs | 2 - video/cdg/src/cdgdec.rs | 4 +- video/cdg/src/cdgparse.rs | 4 +- video/closedcaption/src/cea608overlay.rs | 2 - video/closedcaption/src/cea608tott.rs | 2 - video/closedcaption/src/mcc_enc.rs | 2 - video/closedcaption/src/mcc_parse.rs | 2 - video/closedcaption/src/scc_enc.rs | 2 - video/closedcaption/src/scc_parse.rs | 2 - video/closedcaption/src/tttocea608.rs | 2 - video/dav1d/src/dav1ddec.rs | 4 +- video/flavors/src/flvdemux.rs | 2 - video/gif/src/gifenc.rs | 2 - video/rav1e/src/rav1enc.rs | 2 - video/rspng/src/pngenc.rs | 4 +- 48 files changed, 77 insertions(+), 203 deletions(-) diff --git a/audio/audiofx/src/audioecho.rs b/audio/audiofx/src/audioecho.rs index 19dcf0bd..8fc1e759 100644 --- a/audio/audiofx/src/audioecho.rs +++ b/audio/audiofx/src/audioecho.rs @@ -194,8 +194,6 @@ impl ObjectSubclass for AudioEcho { } impl ObjectImpl for AudioEcho { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/audio/audiofx/src/audioloudnorm.rs b/audio/audiofx/src/audioloudnorm.rs index 1abf8ab6..bc7194e9 100644 --- a/audio/audiofx/src/audioloudnorm.rs +++ b/audio/audiofx/src/audioloudnorm.rs @@ -1824,8 +1824,6 @@ impl ObjectSubclass for AudioLoudNorm { } impl ObjectImpl for AudioLoudNorm { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/audio/claxon/src/claxondec.rs b/audio/claxon/src/claxondec.rs index 31918f97..9ccfc25c 100644 --- a/audio/claxon/src/claxondec.rs +++ b/audio/claxon/src/claxondec.rs @@ -93,9 +93,7 @@ impl ObjectSubclass for ClaxonDec { } } -impl ObjectImpl for ClaxonDec { - glib_object_impl!(); -} +impl ObjectImpl for ClaxonDec {} impl ElementImpl for ClaxonDec {} diff --git a/audio/csound/src/filter.rs b/audio/csound/src/filter.rs index a33aa770..d6c56f91 100644 --- a/audio/csound/src/filter.rs +++ b/audio/csound/src/filter.rs @@ -15,9 +15,9 @@ // Free Software Foundation, Inc., 51 Franklin Street, Suite 500, // Boston, MA 02110-1335, USA. +use glib::glib_object_subclass; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; use gst::{ @@ -431,8 +431,6 @@ impl ObjectSubclass for CsoundFilter { } impl ObjectImpl for CsoundFilter { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; match *prop { diff --git a/audio/lewton/src/lewtondec.rs b/audio/lewton/src/lewtondec.rs index 58673be4..78401e8a 100644 --- a/audio/lewton/src/lewtondec.rs +++ b/audio/lewton/src/lewtondec.rs @@ -92,9 +92,7 @@ impl ObjectSubclass for LewtonDec { } } -impl ObjectImpl for LewtonDec { - glib_object_impl!(); -} +impl ObjectImpl for LewtonDec {} impl ElementImpl for LewtonDec {} diff --git a/generic/file/src/filesink.rs b/generic/file/src/filesink.rs index ee912ec1..2bc0b7c3 100644 --- a/generic/file/src/filesink.rs +++ b/generic/file/src/filesink.rs @@ -159,8 +159,6 @@ impl ObjectSubclass for FileSink { } impl ObjectImpl for FileSink { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; match *prop { diff --git a/generic/file/src/filesrc.rs b/generic/file/src/filesrc.rs index 7d7b9f55..eb8d1d63 100644 --- a/generic/file/src/filesrc.rs +++ b/generic/file/src/filesrc.rs @@ -173,8 +173,6 @@ impl ObjectSubclass for FileSrc { } impl ObjectImpl for FileSrc { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; match *prop { diff --git a/generic/sodium/src/decrypter.rs b/generic/sodium/src/decrypter.rs index acbd568c..2de508b5 100644 --- a/generic/sodium/src/decrypter.rs +++ b/generic/sodium/src/decrypter.rs @@ -639,8 +639,6 @@ impl ObjectSubclass for Decrypter { } impl ObjectImpl for Decrypter { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/generic/sodium/src/encrypter.rs b/generic/sodium/src/encrypter.rs index 34611cbf..0ba9b0e9 100644 --- a/generic/sodium/src/encrypter.rs +++ b/generic/sodium/src/encrypter.rs @@ -470,8 +470,6 @@ impl ObjectSubclass for Encrypter { } impl ObjectImpl for Encrypter { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/generic/threadshare/src/appsrc.rs b/generic/threadshare/src/appsrc.rs index 4806152c..ae6f7b9a 100644 --- a/generic/threadshare/src/appsrc.rs +++ b/generic/threadshare/src/appsrc.rs @@ -21,10 +21,10 @@ use futures::future::BoxFuture; use futures::lock::Mutex as FutMutex; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -639,8 +639,6 @@ impl ObjectSubclass for AppSrc { } impl ObjectImpl for AppSrc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/generic/threadshare/src/inputselector.rs b/generic/threadshare/src/inputselector.rs index 9f9578b2..cfb9bd26 100644 --- a/generic/threadshare/src/inputselector.rs +++ b/generic/threadshare/src/inputselector.rs @@ -19,10 +19,10 @@ use futures::future::BoxFuture; use futures::future::{abortable, AbortHandle}; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -481,8 +481,6 @@ impl ObjectSubclass for InputSelector { } impl ObjectImpl for InputSelector { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/generic/threadshare/src/jitterbuffer/jitterbuffer.rs b/generic/threadshare/src/jitterbuffer/jitterbuffer.rs index 1a08cefa..7191d90b 100644 --- a/generic/threadshare/src/jitterbuffer/jitterbuffer.rs +++ b/generic/threadshare/src/jitterbuffer/jitterbuffer.rs @@ -19,10 +19,10 @@ use futures::future::BoxFuture; use futures::future::{abortable, AbortHandle, Aborted}; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -1494,8 +1494,6 @@ impl ObjectSubclass for JitterBuffer { } impl ObjectImpl for JitterBuffer { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/generic/threadshare/src/proxy.rs b/generic/threadshare/src/proxy.rs index 2042e010..c524e9bb 100644 --- a/generic/threadshare/src/proxy.rs +++ b/generic/threadshare/src/proxy.rs @@ -19,10 +19,10 @@ use futures::channel::oneshot; use futures::future::BoxFuture; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -693,8 +693,6 @@ impl ObjectSubclass for ProxySink { } impl ObjectImpl for ProxySink { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES_SINK[id]; @@ -1216,8 +1214,6 @@ impl ObjectSubclass for ProxySrc { } impl ObjectImpl for ProxySrc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES_SRC[id]; diff --git a/generic/threadshare/src/queue.rs b/generic/threadshare/src/queue.rs index 2fc4ad82..e9fec3c7 100644 --- a/generic/threadshare/src/queue.rs +++ b/generic/threadshare/src/queue.rs @@ -19,10 +19,10 @@ use futures::channel::oneshot; use futures::future::BoxFuture; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -808,8 +808,6 @@ impl ObjectSubclass for Queue { } impl ObjectImpl for Queue { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/generic/threadshare/src/tcpclientsrc.rs b/generic/threadshare/src/tcpclientsrc.rs index 0004e704..b5e8e967 100644 --- a/generic/threadshare/src/tcpclientsrc.rs +++ b/generic/threadshare/src/tcpclientsrc.rs @@ -20,10 +20,10 @@ use futures::future::BoxFuture; use futures::lock::Mutex as FutMutex; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -654,8 +654,6 @@ impl ObjectSubclass for TcpClientSrc { } impl ObjectImpl for TcpClientSrc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/generic/threadshare/src/udpsink.rs b/generic/threadshare/src/udpsink.rs index fe5189ee..0db1a094 100644 --- a/generic/threadshare/src/udpsink.rs +++ b/generic/threadshare/src/udpsink.rs @@ -20,10 +20,10 @@ use futures::future::BoxFuture; use futures::lock::Mutex; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -1305,8 +1305,6 @@ impl ObjectSubclass for UdpSink { } impl ObjectImpl for UdpSink { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; let element = obj.downcast_ref::().unwrap(); diff --git a/generic/threadshare/src/udpsrc.rs b/generic/threadshare/src/udpsrc.rs index ac5a59bc..0d080f7f 100644 --- a/generic/threadshare/src/udpsrc.rs +++ b/generic/threadshare/src/udpsrc.rs @@ -19,10 +19,10 @@ use futures::future::BoxFuture; use futures::lock::Mutex as FutMutex; use futures::prelude::*; +use glib::glib_object_subclass; use glib::prelude::*; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -832,8 +832,6 @@ impl ObjectSubclass for UdpSrc { } impl ObjectImpl for UdpSrc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs index b751998d..78408d1e 100644 --- a/generic/threadshare/tests/pad.rs +++ b/generic/threadshare/tests/pad.rs @@ -21,8 +21,8 @@ use futures::future::BoxFuture; use futures::lock::Mutex as FutMutex; use futures::prelude::*; +use glib::glib_object_subclass; use glib::GBoxed; -use glib::{glib_object_impl, glib_object_subclass}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -336,8 +336,6 @@ impl ObjectSubclass for ElementSrcTest { } impl ObjectImpl for ElementSrcTest { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &SRC_PROPERTIES[id]; @@ -649,8 +647,6 @@ impl ObjectSubclass for ElementSinkTest { } impl ObjectImpl for ElementSinkTest { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &SINK_PROPERTIES[id]; diff --git a/net/reqwest/src/reqwesthttpsrc.rs b/net/reqwest/src/reqwesthttpsrc.rs index c76bd556..eddfd3fc 100644 --- a/net/reqwest/src/reqwesthttpsrc.rs +++ b/net/reqwest/src/reqwesthttpsrc.rs @@ -670,8 +670,6 @@ impl ReqwestHttpSrc { } impl ObjectImpl for ReqwestHttpSrc { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; match *prop { diff --git a/net/rusoto/src/aws_transcribe_parse.rs b/net/rusoto/src/aws_transcribe_parse.rs index 5fb161fa..a1c55e5c 100644 --- a/net/rusoto/src/aws_transcribe_parse.rs +++ b/net/rusoto/src/aws_transcribe_parse.rs @@ -1085,8 +1085,6 @@ impl ObjectSubclass for Transcriber { } impl ObjectImpl for Transcriber { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/net/rusoto/src/s3sink.rs b/net/rusoto/src/s3sink.rs index 74b4d2fd..21138f5b 100644 --- a/net/rusoto/src/s3sink.rs +++ b/net/rusoto/src/s3sink.rs @@ -418,8 +418,6 @@ impl ObjectSubclass for S3Sink { } impl ObjectImpl for S3Sink { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id as usize]; let mut settings = self.settings.lock().unwrap(); diff --git a/net/rusoto/src/s3src.rs b/net/rusoto/src/s3src.rs index 4c51454b..8c397890 100644 --- a/net/rusoto/src/s3src.rs +++ b/net/rusoto/src/s3src.rs @@ -251,8 +251,6 @@ impl ObjectSubclass for S3Src { } impl ObjectImpl for S3Src { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id as usize]; let basesrc = obj.downcast_ref::().unwrap(); diff --git a/text/wrap/src/gsttextwrap.rs b/text/wrap/src/gsttextwrap.rs index a9c851cb..ec2a5711 100644 --- a/text/wrap/src/gsttextwrap.rs +++ b/text/wrap/src/gsttextwrap.rs @@ -330,8 +330,6 @@ impl ObjectSubclass for TextWrap { } impl ObjectImpl for TextWrap { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/tutorial/src/identity.rs b/tutorial/src/identity.rs index c4d615a9..e77b44fd 100644 --- a/tutorial/src/identity.rs +++ b/tutorial/src/identity.rs @@ -230,9 +230,6 @@ impl ObjectSubclass for Identity { // Implementation of glib::Object virtual methods impl ObjectImpl for Identity { - // This macro provides some boilerplate - glib_object_impl!(); - // Called right after construction of a new instance fn constructed(&self, obj: &glib::Object) { // Call the parent class' ::constructed() implementation first diff --git a/tutorial/src/progressbin.rs b/tutorial/src/progressbin.rs index 0af0871b..35a9e650 100644 --- a/tutorial/src/progressbin.rs +++ b/tutorial/src/progressbin.rs @@ -156,9 +156,6 @@ impl ObjectSubclass for ProgressBin { // Implementation of glib::Object virtual methods impl ObjectImpl for ProgressBin { - // This macro provides some boilerplate - glib_object_impl!(); - // Called whenever a value of a property is changed. It can be called // at any time from any thread. fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { diff --git a/tutorial/src/rgb2gray.rs b/tutorial/src/rgb2gray.rs index e06fa024..af47ad35 100644 --- a/tutorial/src/rgb2gray.rs +++ b/tutorial/src/rgb2gray.rs @@ -237,9 +237,6 @@ impl ObjectSubclass for Rgb2Gray { // Implementation of glib::Object virtual methods impl ObjectImpl for Rgb2Gray { - // This macro provides some boilerplate. - glib_object_impl!(); - // Called whenever a value of a property is changed. It can be called // at any time from any thread. fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { diff --git a/tutorial/src/sinesrc.rs b/tutorial/src/sinesrc.rs index 0befa1fd..2c4bad8c 100644 --- a/tutorial/src/sinesrc.rs +++ b/tutorial/src/sinesrc.rs @@ -280,9 +280,6 @@ impl ObjectSubclass for SineSrc { // Implementation of glib::Object virtual methods impl ObjectImpl for SineSrc { - // This macro provides some boilerplate. - glib_object_impl!(); - // Called right after construction of a new instance fn constructed(&self, obj: &glib::Object) { // Call the parent class' ::constructed() implementation first diff --git a/tutorial/tutorial-1.md b/tutorial/tutorial-1.md index 924da653..3f0933e7 100644 --- a/tutorial/tutorial-1.md +++ b/tutorial/tutorial-1.md @@ -257,12 +257,10 @@ In the `new` function we return our empty struct. In the `class_init` function we, again, set up some metadata for our new element. In this case these are a description, a classification of our element, a longer description and the author. The metadata can later be retrieved and made use of via the [`Registry`](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/struct.Registry.html) and [`PluginFeature`](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/struct.PluginFeature.html)/[`ElementFactory`](https://slomo.pages.freedesktop.org/rustdocs/gstreamer/gstreamer/struct.ElementFactory.html) API. We also configure the `BaseTransform` class and define that we will never operate in-place (producing our output in the input buffer), and that we don’t want to work in passthrough mode if the input/output formats are the same. -Additionally we need to implement various traits on the Rgb2Gray struct, which will later be used to override virtual methods of the various parent classes of our element. For now we can keep the trait implementations empty, except for `ObjectImpl` trait which should simply call the `glib_object_impl!()` macro for some boilerplate code. There is one trait implementation required per parent class. +Additionally we need to implement various traits on the Rgb2Gray struct, which will later be used to override virtual methods of the various parent classes of our element. For now we can keep the trait implementations empty. There is one trait implementation required per parent class. ```rust -impl ObjectImpl for Rgb2Gray { - glib_object_impl!(); -} +impl ObjectImpl for Rgb2Gray {} impl ElementImpl for Rgb2Gray {} impl BaseTransformImpl for Rgb2Gray {} ``` @@ -287,9 +285,7 @@ impl ObjectSubclass for Rgb2Gray { glib_object_subclass!(); } -impl ObjectImpl for Rgb2Gray { - glib_object_impl!(); -} +impl ObjectImpl for Rgb2Gray {} impl ElementImpl for Rgb2Gray {} diff --git a/tutorial/tutorial-2.md b/tutorial/tutorial-2.md index 9c821761..f1f03f76 100644 --- a/tutorial/tutorial-2.md +++ b/tutorial/tutorial-2.md @@ -230,9 +230,6 @@ impl ObjectSubclass for SineSrc { } impl ObjectImpl for SineSrc { - // This macro provides some boilerplate. - glib_object_impl!(); - // Called right after construction of a new instance fn constructed(&self, obj: &glib::Object) { // Call the parent class' ::constructed() implementation first diff --git a/utils/fallbackswitch/src/base/subclass/aggregator.rs b/utils/fallbackswitch/src/base/subclass/aggregator.rs index 3a1b6864..7eae60a4 100644 --- a/utils/fallbackswitch/src/base/subclass/aggregator.rs +++ b/utils/fallbackswitch/src/base/subclass/aggregator.rs @@ -19,7 +19,7 @@ use super::super::Aggregator; use super::super::AggregatorClass; use super::super::AggregatorPad; -pub trait AggregatorImpl: AggregatorImplExt + ElementImpl + Send + Sync + 'static { +pub trait AggregatorImpl: AggregatorImplExt + ElementImpl { fn flush(&self, aggregator: &Aggregator) -> Result { self.parent_flush(aggregator) } @@ -98,7 +98,9 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl + Send + Sync + 'stati &self, aggregator: &Aggregator, timeout: bool, - ) -> Result; + ) -> Result { + self.parent_aggregate(aggregator, timeout) + } fn start(&self, aggregator: &Aggregator) -> Result<(), gst::ErrorMessage> { self.parent_start(aggregator) @@ -239,10 +241,10 @@ pub trait AggregatorImplExt { fn parent_negotiate(&self, aggregator: &Aggregator) -> bool; } -impl AggregatorImplExt for T { +impl AggregatorImplExt for T { fn parent_flush(&self, aggregator: &Aggregator) -> Result { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; (*parent_class) @@ -260,7 +262,7 @@ impl AggregatorImplExt for T { buffer: gst::Buffer, ) -> Option { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; match (*parent_class).clip { @@ -280,7 +282,7 @@ impl AggregatorImplExt for T { buffer: gst::Buffer, ) -> Result { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -298,7 +300,7 @@ impl AggregatorImplExt for T { event: gst::Event, ) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -319,7 +321,7 @@ impl AggregatorImplExt for T { event: gst::Event, ) -> Result { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -341,7 +343,7 @@ impl AggregatorImplExt for T { query: &mut gst::QueryRef, ) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -362,7 +364,7 @@ impl AggregatorImplExt for T { query: &mut gst::QueryRef, ) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -378,7 +380,7 @@ impl AggregatorImplExt for T { fn parent_src_event(&self, aggregator: &Aggregator, event: gst::Event) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -390,7 +392,7 @@ impl AggregatorImplExt for T { fn parent_src_query(&self, aggregator: &Aggregator, query: &mut gst::QueryRef) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -407,7 +409,7 @@ impl AggregatorImplExt for T { active: bool, ) -> Result<(), gst::LoggableError> { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; match (*parent_class).src_activate { @@ -431,7 +433,7 @@ impl AggregatorImplExt for T { timeout: bool, ) -> Result { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -444,7 +446,7 @@ impl AggregatorImplExt for T { fn parent_start(&self, aggregator: &Aggregator) -> Result<(), gst::ErrorMessage> { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; (*parent_class) @@ -465,7 +467,7 @@ impl AggregatorImplExt for T { fn parent_stop(&self, aggregator: &Aggregator) -> Result<(), gst::ErrorMessage> { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; (*parent_class) @@ -486,7 +488,7 @@ impl AggregatorImplExt for T { fn parent_get_next_time(&self, aggregator: &Aggregator) -> gst::ClockTime { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; (*parent_class) @@ -504,7 +506,7 @@ impl AggregatorImplExt for T { caps: Option<&gst::Caps>, ) -> Option { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -525,7 +527,7 @@ impl AggregatorImplExt for T { caps: &gst::Caps, ) -> Result { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; let f = (*parent_class) @@ -544,7 +546,7 @@ impl AggregatorImplExt for T { fn parent_fixate_src_caps(&self, aggregator: &Aggregator, caps: gst::Caps) -> gst::Caps { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; @@ -561,7 +563,7 @@ impl AggregatorImplExt for T { caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; (*parent_class) @@ -579,7 +581,7 @@ impl AggregatorImplExt for T { fn parent_negotiate(&self, aggregator: &Aggregator) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorClass; (*parent_class) @@ -590,7 +592,7 @@ impl AggregatorImplExt for T { } } -unsafe impl IsSubclassable for AggregatorClass +unsafe impl IsSubclassable for AggregatorClass where ::Instance: PanicPoison, { @@ -602,9 +604,7 @@ where klass.clip = Some(aggregator_clip::); klass.finish_buffer = Some(aggregator_finish_buffer::); klass.sink_event = Some(aggregator_sink_event::); - klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::); klass.sink_query = Some(aggregator_sink_query::); - klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::); klass.src_event = Some(aggregator_src_event::); klass.src_query = Some(aggregator_src_query::); klass.src_activate = Some(aggregator_src_activate::); @@ -616,16 +616,19 @@ where klass.update_src_caps = Some(aggregator_update_src_caps::); klass.fixate_src_caps = Some(aggregator_fixate_src_caps::); klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::); - klass.negotiate = Some(aggregator_negotiate::); + { + klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::); + klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::); + klass.negotiate = Some(aggregator_negotiate::); + } } } } -unsafe extern "C" fn aggregator_flush( +unsafe extern "C" fn aggregator_flush( ptr: *mut gst_base_sys::GstAggregator, ) -> gst_sys::GstFlowReturn where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -638,13 +641,12 @@ where .to_glib() } -unsafe extern "C" fn aggregator_clip( +unsafe extern "C" fn aggregator_clip( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, buffer: *mut gst_sys::GstBuffer, ) -> *mut gst_sys::GstBuffer where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -662,12 +664,11 @@ where ret.map(|r| r.into_ptr()).unwrap_or(ptr::null_mut()) } -unsafe extern "C" fn aggregator_finish_buffer( +unsafe extern "C" fn aggregator_finish_buffer( ptr: *mut gst_base_sys::GstAggregator, buffer: *mut gst_sys::GstBuffer, ) -> gst_sys::GstFlowReturn where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -680,13 +681,12 @@ where .to_glib() } -unsafe extern "C" fn aggregator_sink_event( +unsafe extern "C" fn aggregator_sink_event( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, event: *mut gst_sys::GstEvent, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -703,13 +703,12 @@ where .to_glib() } -unsafe extern "C" fn aggregator_sink_event_pre_queue( +unsafe extern "C" fn aggregator_sink_event_pre_queue( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, event: *mut gst_sys::GstEvent, ) -> gst_sys::GstFlowReturn where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -727,13 +726,12 @@ where .to_glib() } -unsafe extern "C" fn aggregator_sink_query( +unsafe extern "C" fn aggregator_sink_query( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, query: *mut gst_sys::GstQuery, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -750,13 +748,12 @@ where .to_glib() } -unsafe extern "C" fn aggregator_sink_query_pre_queue( +unsafe extern "C" fn aggregator_sink_query_pre_queue( ptr: *mut gst_base_sys::GstAggregator, aggregator_pad: *mut gst_base_sys::GstAggregatorPad, query: *mut gst_sys::GstQuery, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -773,12 +770,11 @@ where .to_glib() } -unsafe extern "C" fn aggregator_src_event( +unsafe extern "C" fn aggregator_src_event( ptr: *mut gst_base_sys::GstAggregator, event: *mut gst_sys::GstEvent, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -791,12 +787,11 @@ where .to_glib() } -unsafe extern "C" fn aggregator_src_query( +unsafe extern "C" fn aggregator_src_query( ptr: *mut gst_base_sys::GstAggregator, query: *mut gst_sys::GstQuery, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -809,13 +804,12 @@ where .to_glib() } -unsafe extern "C" fn aggregator_src_activate( +unsafe extern "C" fn aggregator_src_activate( ptr: *mut gst_base_sys::GstAggregator, mode: gst_sys::GstPadMode, active: glib_sys::gboolean, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -834,12 +828,11 @@ where .to_glib() } -unsafe extern "C" fn aggregator_aggregate( +unsafe extern "C" fn aggregator_aggregate( ptr: *mut gst_base_sys::GstAggregator, timeout: glib_sys::gboolean, ) -> gst_sys::GstFlowReturn where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -852,11 +845,10 @@ where .to_glib() } -unsafe extern "C" fn aggregator_start( +unsafe extern "C" fn aggregator_start( ptr: *mut gst_base_sys::GstAggregator, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -875,11 +867,10 @@ where .to_glib() } -unsafe extern "C" fn aggregator_stop( +unsafe extern "C" fn aggregator_stop( ptr: *mut gst_base_sys::GstAggregator, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -898,11 +889,10 @@ where .to_glib() } -unsafe extern "C" fn aggregator_get_next_time( +unsafe extern "C" fn aggregator_get_next_time( ptr: *mut gst_base_sys::GstAggregator, ) -> gst_sys::GstClockTime where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -915,14 +905,13 @@ where .to_glib() } -unsafe extern "C" fn aggregator_create_new_pad( +unsafe extern "C" fn aggregator_create_new_pad( ptr: *mut gst_base_sys::GstAggregator, templ: *mut gst_sys::GstPadTemplate, req_name: *const libc::c_char, caps: *const gst_sys::GstCaps, ) -> *mut gst_base_sys::GstAggregatorPad where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -944,13 +933,12 @@ where .to_glib_full() } -unsafe extern "C" fn aggregator_update_src_caps( +unsafe extern "C" fn aggregator_update_src_caps( ptr: *mut gst_base_sys::GstAggregator, caps: *mut gst_sys::GstCaps, res: *mut *mut gst_sys::GstCaps, ) -> gst_sys::GstFlowReturn where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -971,12 +959,11 @@ where .to_glib() } -unsafe extern "C" fn aggregator_fixate_src_caps( +unsafe extern "C" fn aggregator_fixate_src_caps( ptr: *mut gst_base_sys::GstAggregator, caps: *mut gst_sys::GstCaps, ) -> *mut gst_sys::GstCaps where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -989,12 +976,11 @@ where .into_ptr() } -unsafe extern "C" fn aggregator_negotiated_src_caps( +unsafe extern "C" fn aggregator_negotiated_src_caps( ptr: *mut gst_base_sys::GstAggregator, caps: *mut gst_sys::GstCaps, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); @@ -1013,11 +999,10 @@ where .to_glib() } -unsafe extern "C" fn aggregator_negotiate( +unsafe extern "C" fn aggregator_negotiate( ptr: *mut gst_base_sys::GstAggregator, ) -> glib_sys::gboolean where - T: AggregatorImpl, T::Instance: PanicPoison, { let instance = &*(ptr as *mut T::Instance); diff --git a/utils/fallbackswitch/src/base/subclass/aggregator_pad.rs b/utils/fallbackswitch/src/base/subclass/aggregator_pad.rs index d7b78e4f..d09443f6 100644 --- a/utils/fallbackswitch/src/base/subclass/aggregator_pad.rs +++ b/utils/fallbackswitch/src/base/subclass/aggregator_pad.rs @@ -17,7 +17,7 @@ use super::super::Aggregator; use super::super::AggregatorPad; use super::super::AggregatorPadClass; -pub trait AggregatorPadImpl: AggregatorPadImplExt + PadImpl + Send + Sync + 'static { +pub trait AggregatorPadImpl: AggregatorPadImplExt + PadImpl { fn flush( &self, aggregator_pad: &AggregatorPad, @@ -51,14 +51,14 @@ pub trait AggregatorPadImplExt { ) -> bool; } -impl AggregatorPadImplExt for T { +impl AggregatorPadImplExt for T { fn parent_flush( &self, aggregator_pad: &AggregatorPad, aggregator: &Aggregator, ) -> Result { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorPadClass; (*parent_class) @@ -81,7 +81,7 @@ impl AggregatorPadImplExt for T { buffer: &gst::Buffer, ) -> bool { unsafe { - let data = self.get_type_data(); + let data = T::type_data(); let parent_class = data.as_ref().get_parent_class() as *mut gst_base_sys::GstAggregatorPadClass; (*parent_class) @@ -97,7 +97,7 @@ impl AggregatorPadImplExt for T { } } } -unsafe impl IsSubclassable for AggregatorPadClass { +unsafe impl IsSubclassable for AggregatorPadClass { fn override_vfuncs(&mut self) { >::override_vfuncs(self); unsafe { @@ -108,13 +108,10 @@ unsafe impl IsSubclassable for Aggrega } } -unsafe extern "C" fn aggregator_pad_flush( +unsafe extern "C" fn aggregator_pad_flush( ptr: *mut gst_base_sys::GstAggregatorPad, aggregator: *mut gst_base_sys::GstAggregator, -) -> gst_sys::GstFlowReturn -where - T: AggregatorPadImpl, -{ +) -> gst_sys::GstFlowReturn { let instance = &*(ptr as *mut T::Instance); let imp = instance.get_impl(); let wrap: Borrowed = from_glib_borrow(ptr); @@ -123,14 +120,11 @@ where res.to_glib() } -unsafe extern "C" fn aggregator_pad_skip_buffer( +unsafe extern "C" fn aggregator_pad_skip_buffer( ptr: *mut gst_base_sys::GstAggregatorPad, aggregator: *mut gst_base_sys::GstAggregator, buffer: *mut gst_sys::GstBuffer, -) -> glib_sys::gboolean -where - T: AggregatorPadImpl, -{ +) -> glib_sys::gboolean { let instance = &*(ptr as *mut T::Instance); let imp = instance.get_impl(); let wrap: Borrowed = from_glib_borrow(ptr); diff --git a/utils/fallbackswitch/src/fallbacksrc.rs b/utils/fallbackswitch/src/fallbacksrc.rs index 450fc6e0..f2617180 100644 --- a/utils/fallbackswitch/src/fallbacksrc.rs +++ b/utils/fallbackswitch/src/fallbacksrc.rs @@ -314,8 +314,6 @@ impl ObjectSubclass for FallbackSrc { } impl ObjectImpl for FallbackSrc { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; let element = obj.downcast_ref::().unwrap(); @@ -2235,8 +2233,6 @@ mod custom_source { } impl ObjectImpl for CustomSource { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; let element = obj.downcast_ref::().unwrap(); diff --git a/utils/fallbackswitch/src/fallbackswitch.rs b/utils/fallbackswitch/src/fallbackswitch.rs index 6c9c424f..f0674781 100644 --- a/utils/fallbackswitch/src/fallbackswitch.rs +++ b/utils/fallbackswitch/src/fallbackswitch.rs @@ -477,8 +477,6 @@ impl ObjectSubclass for FallbackSwitch { } impl ObjectImpl for FallbackSwitch { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/utils/togglerecord/src/togglerecord.rs b/utils/togglerecord/src/togglerecord.rs index 16d54051..a7a0c7bf 100644 --- a/utils/togglerecord/src/togglerecord.rs +++ b/utils/togglerecord/src/togglerecord.rs @@ -1606,8 +1606,6 @@ impl ObjectSubclass for ToggleRecord { } impl ObjectImpl for ToggleRecord { - glib_object_impl!(); - fn set_property(&self, obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; let element = obj.downcast_ref::().unwrap(); diff --git a/video/cdg/src/cdgdec.rs b/video/cdg/src/cdgdec.rs index 5cb7ed0d..92d1a34a 100644 --- a/video/cdg/src/cdgdec.rs +++ b/video/cdg/src/cdgdec.rs @@ -80,9 +80,7 @@ impl ObjectSubclass for CdgDec { } } -impl ObjectImpl for CdgDec { - glib_object_impl!(); -} +impl ObjectImpl for CdgDec {} impl ElementImpl for CdgDec {} diff --git a/video/cdg/src/cdgparse.rs b/video/cdg/src/cdgparse.rs index bc85663b..50b46072 100644 --- a/video/cdg/src/cdgparse.rs +++ b/video/cdg/src/cdgparse.rs @@ -83,9 +83,7 @@ impl ObjectSubclass for CdgParse { } } -impl ObjectImpl for CdgParse { - glib_object_impl!(); -} +impl ObjectImpl for CdgParse {} impl ElementImpl for CdgParse {} diff --git a/video/closedcaption/src/cea608overlay.rs b/video/closedcaption/src/cea608overlay.rs index 2127c742..0df857c7 100644 --- a/video/closedcaption/src/cea608overlay.rs +++ b/video/closedcaption/src/cea608overlay.rs @@ -460,8 +460,6 @@ impl ObjectSubclass for Cea608Overlay { } impl ObjectImpl for Cea608Overlay { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/closedcaption/src/cea608tott.rs b/video/closedcaption/src/cea608tott.rs index 6e49e1c2..edcb8002 100644 --- a/video/closedcaption/src/cea608tott.rs +++ b/video/closedcaption/src/cea608tott.rs @@ -461,8 +461,6 @@ impl ObjectSubclass for Cea608ToTt { } impl ObjectImpl for Cea608ToTt { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/closedcaption/src/mcc_enc.rs b/video/closedcaption/src/mcc_enc.rs index 3e5c2fd6..6acfb3aa 100644 --- a/video/closedcaption/src/mcc_enc.rs +++ b/video/closedcaption/src/mcc_enc.rs @@ -571,8 +571,6 @@ impl ObjectSubclass for MccEnc { } impl ObjectImpl for MccEnc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/video/closedcaption/src/mcc_parse.rs b/video/closedcaption/src/mcc_parse.rs index 99411c22..83e304c3 100644 --- a/video/closedcaption/src/mcc_parse.rs +++ b/video/closedcaption/src/mcc_parse.rs @@ -1241,8 +1241,6 @@ impl ObjectSubclass for MccParse { } impl ObjectImpl for MccParse { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/closedcaption/src/scc_enc.rs b/video/closedcaption/src/scc_enc.rs index d60079f8..00b3bf85 100644 --- a/video/closedcaption/src/scc_enc.rs +++ b/video/closedcaption/src/scc_enc.rs @@ -416,8 +416,6 @@ impl ObjectSubclass for SccEnc { } impl ObjectImpl for SccEnc { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/closedcaption/src/scc_parse.rs b/video/closedcaption/src/scc_parse.rs index 5bc5053f..92d62a48 100644 --- a/video/closedcaption/src/scc_parse.rs +++ b/video/closedcaption/src/scc_parse.rs @@ -500,8 +500,6 @@ impl ObjectSubclass for SccParse { } impl ObjectImpl for SccParse { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/closedcaption/src/tttocea608.rs b/video/closedcaption/src/tttocea608.rs index bd29169c..935f04ea 100644 --- a/video/closedcaption/src/tttocea608.rs +++ b/video/closedcaption/src/tttocea608.rs @@ -874,8 +874,6 @@ impl ObjectSubclass for TtToCea608 { } impl ObjectImpl for TtToCea608 { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/dav1d/src/dav1ddec.rs b/video/dav1d/src/dav1ddec.rs index 062268b0..4212232a 100644 --- a/video/dav1d/src/dav1ddec.rs +++ b/video/dav1d/src/dav1ddec.rs @@ -405,9 +405,7 @@ impl ObjectSubclass for Dav1dDec { } } -impl ObjectImpl for Dav1dDec { - glib_object_impl!(); -} +impl ObjectImpl for Dav1dDec {} impl ElementImpl for Dav1dDec {} diff --git a/video/flavors/src/flvdemux.rs b/video/flavors/src/flvdemux.rs index 5a8788ca..5bb69c42 100644 --- a/video/flavors/src/flvdemux.rs +++ b/video/flavors/src/flvdemux.rs @@ -274,8 +274,6 @@ impl ObjectSubclass for FlvDemux { } impl ObjectImpl for FlvDemux { - glib_object_impl!(); - fn constructed(&self, obj: &glib::Object) { self.parent_constructed(obj); diff --git a/video/gif/src/gifenc.rs b/video/gif/src/gifenc.rs index d2c93874..1f1e25ac 100644 --- a/video/gif/src/gifenc.rs +++ b/video/gif/src/gifenc.rs @@ -212,8 +212,6 @@ impl ObjectSubclass for GifEnc { } impl ObjectImpl for GifEnc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/video/rav1e/src/rav1enc.rs b/video/rav1e/src/rav1enc.rs index a5e528f3..cab69e5a 100644 --- a/video/rav1e/src/rav1enc.rs +++ b/video/rav1e/src/rav1enc.rs @@ -370,8 +370,6 @@ impl ObjectSubclass for Rav1Enc { } impl ObjectImpl for Rav1Enc { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id]; diff --git a/video/rspng/src/pngenc.rs b/video/rspng/src/pngenc.rs index b9b757fd..da638b8f 100644 --- a/video/rspng/src/pngenc.rs +++ b/video/rspng/src/pngenc.rs @@ -10,7 +10,7 @@ use std::{io, io::Write, sync::Arc}; use glib::subclass; use glib::subclass::prelude::*; -use glib::{glib_object_impl, glib_object_subclass, GEnum}; +use glib::{glib_object_subclass, GEnum}; use gst::prelude::*; use gst::subclass::prelude::*; @@ -323,8 +323,6 @@ impl ObjectSubclass for PngEncoder { } impl ObjectImpl for PngEncoder { - glib_object_impl!(); - fn set_property(&self, _obj: &glib::Object, id: usize, value: &glib::Value) { let prop = &PROPERTIES[id];