From 980304ce36f15c9a5202d0c0f2539d7918e3953f Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Thu, 29 Apr 2021 22:06:41 +0200 Subject: [PATCH] Replace T::type_data with Self::type_data for clippy::use_self --- gstreamer-audio/src/subclass/audio_decoder.rs | 34 +++++------ gstreamer-audio/src/subclass/audio_encoder.rs | 32 +++++----- gstreamer-audio/src/subclass/audio_sink.rs | 14 ++--- gstreamer-audio/src/subclass/audio_src.rs | 14 ++--- gstreamer-base/src/subclass/aggregator.rs | 42 ++++++------- gstreamer-base/src/subclass/aggregator_pad.rs | 4 +- gstreamer-base/src/subclass/base_parse.rs | 10 ++-- gstreamer-base/src/subclass/base_sink.rs | 26 ++++---- gstreamer-base/src/subclass/base_src.rs | 34 +++++------ gstreamer-base/src/subclass/base_transform.rs | 40 ++++++------- gstreamer-base/src/subclass/push_src.rs | 6 +- gstreamer-gl/src/subclass/gl_base_filter.rs | 6 +- gstreamer-gl/src/subclass/gl_base_src.rs | 6 +- gstreamer-gl/src/subclass/gl_filter.rs | 10 ++-- .../src/subclass/rtsp_client.rs | 60 +++++++++---------- .../src/subclass/rtsp_media.rs | 34 +++++------ .../src/subclass/rtsp_media_factory.rs | 14 ++--- .../src/subclass/rtsp_server.rs | 4 +- gstreamer-video/src/subclass/video_decoder.rs | 36 +++++------ gstreamer-video/src/subclass/video_encoder.rs | 32 +++++----- gstreamer-video/src/subclass/video_sink.rs | 2 +- gstreamer/src/subclass/bin.rs | 6 +- gstreamer/src/subclass/clock.rs | 12 ++-- gstreamer/src/subclass/device.rs | 4 +- gstreamer/src/subclass/device_provider.rs | 6 +- gstreamer/src/subclass/element.rs | 18 +++--- gstreamer/src/subclass/pad.rs | 4 +- 27 files changed, 255 insertions(+), 255 deletions(-) diff --git a/gstreamer-audio/src/subclass/audio_decoder.rs b/gstreamer-audio/src/subclass/audio_decoder.rs index d2484e25c..39b0b7ad7 100644 --- a/gstreamer-audio/src/subclass/audio_decoder.rs +++ b/gstreamer-audio/src/subclass/audio_decoder.rs @@ -164,7 +164,7 @@ pub trait AudioDecoderImplExt: ObjectSubclass { impl AudioDecoderImplExt for T { fn parent_open(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .open @@ -188,7 +188,7 @@ impl AudioDecoderImplExt for T { fn parent_close(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .close @@ -212,7 +212,7 @@ impl AudioDecoderImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .start @@ -236,7 +236,7 @@ impl AudioDecoderImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .stop @@ -264,7 +264,7 @@ impl AudioDecoderImplExt for T { caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .set_format @@ -288,7 +288,7 @@ impl AudioDecoderImplExt for T { adapter: &gst_base::Adapter, ) -> Result<(u32, u32), gst::FlowError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .parse @@ -323,7 +323,7 @@ impl AudioDecoderImplExt for T { buffer: Option<&gst::Buffer>, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .handle_frame @@ -346,7 +346,7 @@ impl AudioDecoderImplExt for T { buffer: gst::Buffer, ) -> Result, gst::FlowError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; if let Some(f) = (*parent_class).pre_push { let mut buffer = buffer.into_ptr(); @@ -367,7 +367,7 @@ impl AudioDecoderImplExt for T { fn parent_flush(&self, element: &Self::Type, hard: bool) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .flush @@ -383,7 +383,7 @@ impl AudioDecoderImplExt for T { fn parent_negotiate(&self, element: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .negotiate @@ -400,7 +400,7 @@ impl AudioDecoderImplExt for T { fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .getcaps @@ -420,7 +420,7 @@ impl AudioDecoderImplExt for T { fn parent_sink_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; let f = (*parent_class) .sink_event @@ -434,7 +434,7 @@ impl AudioDecoderImplExt for T { fn parent_sink_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; let f = (*parent_class) .sink_query @@ -448,7 +448,7 @@ impl AudioDecoderImplExt for T { fn parent_src_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; let f = (*parent_class) .src_event @@ -462,7 +462,7 @@ impl AudioDecoderImplExt for T { fn parent_src_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; let f = (*parent_class) .src_query @@ -480,7 +480,7 @@ impl AudioDecoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .propose_allocation @@ -507,7 +507,7 @@ impl AudioDecoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioDecoderClass; (*parent_class) .decide_allocation diff --git a/gstreamer-audio/src/subclass/audio_encoder.rs b/gstreamer-audio/src/subclass/audio_encoder.rs index 09bf9e83a..75c01ff21 100644 --- a/gstreamer-audio/src/subclass/audio_encoder.rs +++ b/gstreamer-audio/src/subclass/audio_encoder.rs @@ -150,7 +150,7 @@ pub trait AudioEncoderImplExt: ObjectSubclass { impl AudioEncoderImplExt for T { fn parent_open(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .open @@ -174,7 +174,7 @@ impl AudioEncoderImplExt for T { fn parent_close(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .close @@ -198,7 +198,7 @@ impl AudioEncoderImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .start @@ -222,7 +222,7 @@ impl AudioEncoderImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .stop @@ -250,7 +250,7 @@ impl AudioEncoderImplExt for T { info: &AudioInfo, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .set_format @@ -274,7 +274,7 @@ impl AudioEncoderImplExt for T { buffer: Option<&gst::Buffer>, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .handle_frame @@ -297,7 +297,7 @@ impl AudioEncoderImplExt for T { buffer: gst::Buffer, ) -> Result, gst::FlowError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; if let Some(f) = (*parent_class).pre_push { let mut buffer = buffer.into_ptr(); @@ -318,7 +318,7 @@ impl AudioEncoderImplExt for T { fn parent_flush(&self, element: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .flush @@ -329,7 +329,7 @@ impl AudioEncoderImplExt for T { fn parent_negotiate(&self, element: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .negotiate @@ -346,7 +346,7 @@ impl AudioEncoderImplExt for T { fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .getcaps @@ -366,7 +366,7 @@ impl AudioEncoderImplExt for T { fn parent_sink_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; let f = (*parent_class) .sink_event @@ -380,7 +380,7 @@ impl AudioEncoderImplExt for T { fn parent_sink_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; let f = (*parent_class) .sink_query @@ -394,7 +394,7 @@ impl AudioEncoderImplExt for T { fn parent_src_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; let f = (*parent_class) .src_event @@ -408,7 +408,7 @@ impl AudioEncoderImplExt for T { fn parent_src_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; let f = (*parent_class) .src_query @@ -426,7 +426,7 @@ impl AudioEncoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .propose_allocation @@ -453,7 +453,7 @@ impl AudioEncoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioEncoderClass; (*parent_class) .decide_allocation diff --git a/gstreamer-audio/src/subclass/audio_sink.rs b/gstreamer-audio/src/subclass/audio_sink.rs index c5bc6c762..9d0600d7d 100644 --- a/gstreamer-audio/src/subclass/audio_sink.rs +++ b/gstreamer-audio/src/subclass/audio_sink.rs @@ -60,7 +60,7 @@ pub trait AudioSinkImplExt: ObjectSubclass { impl AudioSinkImplExt for T { fn parent_close(&self, sink: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; let f = match (*parent_class).close { None => return Ok(()), @@ -76,7 +76,7 @@ impl AudioSinkImplExt for T { fn parent_delay(&self, sink: &Self::Type) -> u32 { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; let f = match (*parent_class).delay { Some(f) => f, @@ -88,7 +88,7 @@ impl AudioSinkImplExt for T { fn parent_open(&self, sink: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; let f = match (*parent_class).open { Some(f) => f, @@ -108,7 +108,7 @@ impl AudioSinkImplExt for T { spec: &mut AudioRingBufferSpec, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; let f = match (*parent_class).prepare { Some(f) => f, @@ -127,7 +127,7 @@ impl AudioSinkImplExt for T { fn parent_unprepare(&self, sink: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; let f = match (*parent_class).unprepare { Some(f) => f, @@ -148,7 +148,7 @@ impl AudioSinkImplExt for T { fn parent_write(&self, sink: &Self::Type, buffer: &[u8]) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; let f = match (*parent_class).write { Some(f) => f, @@ -173,7 +173,7 @@ impl AudioSinkImplExt for T { fn parent_reset(&self, sink: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSinkClass; if let Some(f) = (*parent_class).reset { f(sink.unsafe_cast_ref::().to_glib_none().0) diff --git a/gstreamer-audio/src/subclass/audio_src.rs b/gstreamer-audio/src/subclass/audio_src.rs index ab15b6cd6..a5a4a1f2a 100644 --- a/gstreamer-audio/src/subclass/audio_src.rs +++ b/gstreamer-audio/src/subclass/audio_src.rs @@ -70,7 +70,7 @@ pub trait AudioSrcImplExt: ObjectSubclass { impl AudioSrcImplExt for T { fn parent_close(&self, src: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; let f = match (*parent_class).close { None => return Ok(()), @@ -86,7 +86,7 @@ impl AudioSrcImplExt for T { fn parent_delay(&self, src: &Self::Type) -> u32 { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; let f = match (*parent_class).delay { Some(f) => f, @@ -98,7 +98,7 @@ impl AudioSrcImplExt for T { fn parent_open(&self, src: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; let f = match (*parent_class).open { Some(f) => f, @@ -118,7 +118,7 @@ impl AudioSrcImplExt for T { spec: &mut AudioRingBufferSpec, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; let f = match (*parent_class).prepare { Some(f) => f, @@ -137,7 +137,7 @@ impl AudioSrcImplExt for T { fn parent_unprepare(&self, src: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; let f = match (*parent_class).unprepare { Some(f) => f, @@ -162,7 +162,7 @@ impl AudioSrcImplExt for T { buffer: &mut [u8], ) -> Result<(u32, gst::ClockTime), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; let f = match (*parent_class).read { Some(f) => f, @@ -189,7 +189,7 @@ impl AudioSrcImplExt for T { fn parent_reset(&self, src: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAudioSrcClass; if let Some(f) = (*parent_class).reset { f(src.unsafe_cast_ref::().to_glib_none().0) diff --git a/gstreamer-base/src/subclass/aggregator.rs b/gstreamer-base/src/subclass/aggregator.rs index a2c92412f..7740f7f2a 100644 --- a/gstreamer-base/src/subclass/aggregator.rs +++ b/gstreamer-base/src/subclass/aggregator.rs @@ -283,7 +283,7 @@ pub trait AggregatorImplExt: ObjectSubclass { impl AggregatorImplExt for T { fn parent_flush(&self, aggregator: &Self::Type) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .flush @@ -305,7 +305,7 @@ impl AggregatorImplExt for T { buffer: gst::Buffer, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; match (*parent_class).clip { None => Some(buffer), @@ -324,7 +324,7 @@ impl AggregatorImplExt for T { buffer: gst::Buffer, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .finish_buffer @@ -345,7 +345,7 @@ impl AggregatorImplExt for T { buffer_list: gst::BufferList, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .finish_buffer_list @@ -365,7 +365,7 @@ impl AggregatorImplExt for T { event: gst::Event, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .sink_event @@ -387,7 +387,7 @@ impl AggregatorImplExt for T { event: gst::Event, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .sink_event_pre_queue @@ -408,7 +408,7 @@ impl AggregatorImplExt for T { query: &mut gst::QueryRef, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .sink_query @@ -430,7 +430,7 @@ impl AggregatorImplExt for T { query: &mut gst::QueryRef, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .sink_query_pre_queue @@ -445,7 +445,7 @@ impl AggregatorImplExt for T { fn parent_src_event(&self, aggregator: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .src_event @@ -459,7 +459,7 @@ impl AggregatorImplExt for T { fn parent_src_query(&self, aggregator: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .src_query @@ -478,7 +478,7 @@ impl AggregatorImplExt for T { active: bool, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; match (*parent_class).src_activate { None => Ok(()), @@ -501,7 +501,7 @@ impl AggregatorImplExt for T { timeout: bool, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .aggregate @@ -516,7 +516,7 @@ impl AggregatorImplExt for T { fn parent_start(&self, aggregator: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .start @@ -540,7 +540,7 @@ impl AggregatorImplExt for T { fn parent_stop(&self, aggregator: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .stop @@ -564,7 +564,7 @@ impl AggregatorImplExt for T { fn parent_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .get_next_time @@ -586,7 +586,7 @@ impl AggregatorImplExt for T { caps: Option<&gst::Caps>, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .create_new_pad @@ -606,7 +606,7 @@ impl AggregatorImplExt for T { caps: &gst::Caps, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) .update_src_caps @@ -624,7 +624,7 @@ impl AggregatorImplExt for T { fn parent_fixate_src_caps(&self, aggregator: &Self::Type, caps: gst::Caps) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; let f = (*parent_class) @@ -643,7 +643,7 @@ impl AggregatorImplExt for T { caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .negotiated_src_caps @@ -665,7 +665,7 @@ impl AggregatorImplExt for T { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn parent_negotiate(&self, aggregator: &Self::Type) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .negotiate @@ -687,7 +687,7 @@ impl AggregatorImplExt for T { pad: &AggregatorPad, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorClass; (*parent_class) .peek_next_sample diff --git a/gstreamer-base/src/subclass/aggregator_pad.rs b/gstreamer-base/src/subclass/aggregator_pad.rs index 87b804415..e3b93d1ea 100644 --- a/gstreamer-base/src/subclass/aggregator_pad.rs +++ b/gstreamer-base/src/subclass/aggregator_pad.rs @@ -49,7 +49,7 @@ impl AggregatorPadImplExt for T { aggregator: &Aggregator, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorPadClass; (*parent_class) .flush @@ -74,7 +74,7 @@ impl AggregatorPadImplExt for T { buffer: &gst::Buffer, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstAggregatorPadClass; (*parent_class) .skip_buffer diff --git a/gstreamer-base/src/subclass/base_parse.rs b/gstreamer-base/src/subclass/base_parse.rs index a6a0f9a1a..1bedb94fd 100644 --- a/gstreamer-base/src/subclass/base_parse.rs +++ b/gstreamer-base/src/subclass/base_parse.rs @@ -75,7 +75,7 @@ pub trait BaseParseImplExt: ObjectSubclass { impl BaseParseImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseParseClass; (*parent_class) .start @@ -95,7 +95,7 @@ impl BaseParseImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseParseClass; (*parent_class) .stop @@ -119,7 +119,7 @@ impl BaseParseImplExt for T { caps: &gst::Caps, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseParseClass; (*parent_class) .set_sink_caps @@ -146,7 +146,7 @@ impl BaseParseImplExt for T { frame: BaseParseFrame, ) -> Result<(gst::FlowSuccess, u32), gst::FlowError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseParseClass; let mut skipsize = 0; let res = (*parent_class).handle_frame.map(|f| { @@ -175,7 +175,7 @@ impl BaseParseImplExt for T { dest_format: gst::Format, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseParseClass; let src_val = src_val.into(); let res = (*parent_class).convert.map(|f| { diff --git a/gstreamer-base/src/subclass/base_sink.rs b/gstreamer-base/src/subclass/base_sink.rs index 8486ded3b..4aa7fc6b2 100644 --- a/gstreamer-base/src/subclass/base_sink.rs +++ b/gstreamer-base/src/subclass/base_sink.rs @@ -130,7 +130,7 @@ pub trait BaseSinkImplExt: ObjectSubclass { impl BaseSinkImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .start @@ -150,7 +150,7 @@ impl BaseSinkImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .stop @@ -174,7 +174,7 @@ impl BaseSinkImplExt for T { buffer: &gst::Buffer, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .render @@ -195,7 +195,7 @@ impl BaseSinkImplExt for T { buffer: &gst::Buffer, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .prepare @@ -216,7 +216,7 @@ impl BaseSinkImplExt for T { list: &gst::BufferList, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .render_list @@ -242,7 +242,7 @@ impl BaseSinkImplExt for T { list: &gst::BufferList, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .prepare_list @@ -264,7 +264,7 @@ impl BaseSinkImplExt for T { fn parent_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .query @@ -280,7 +280,7 @@ impl BaseSinkImplExt for T { fn parent_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .event @@ -296,7 +296,7 @@ impl BaseSinkImplExt for T { fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) @@ -317,7 +317,7 @@ impl BaseSinkImplExt for T { caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .set_caps @@ -337,7 +337,7 @@ impl BaseSinkImplExt for T { fn parent_fixate(&self, element: &Self::Type, caps: gst::Caps) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; match (*parent_class).fixate { @@ -352,7 +352,7 @@ impl BaseSinkImplExt for T { fn parent_unlock(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .unlock @@ -372,7 +372,7 @@ impl BaseSinkImplExt for T { fn parent_unlock_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSinkClass; (*parent_class) .unlock_stop diff --git a/gstreamer-base/src/subclass/base_src.rs b/gstreamer-base/src/subclass/base_src.rs index 0273d331d..6a65606f0 100644 --- a/gstreamer-base/src/subclass/base_src.rs +++ b/gstreamer-base/src/subclass/base_src.rs @@ -172,7 +172,7 @@ pub trait BaseSrcImplExt: ObjectSubclass { impl BaseSrcImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .start @@ -192,7 +192,7 @@ impl BaseSrcImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .stop @@ -212,7 +212,7 @@ impl BaseSrcImplExt for T { fn parent_is_seekable(&self, element: &Self::Type) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .is_seekable @@ -223,7 +223,7 @@ impl BaseSrcImplExt for T { fn parent_size(&self, element: &Self::Type) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .get_size @@ -248,7 +248,7 @@ impl BaseSrcImplExt for T { buffer: &gst::BufferRef, ) -> (gst::ClockTime, gst::ClockTime) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .get_times @@ -278,7 +278,7 @@ impl BaseSrcImplExt for T { buffer: &mut gst::BufferRef, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .fill @@ -302,7 +302,7 @@ impl BaseSrcImplExt for T { length: u32, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .alloc @@ -333,7 +333,7 @@ impl BaseSrcImplExt for T { length: u32, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .create @@ -411,7 +411,7 @@ impl BaseSrcImplExt for T { fn parent_do_seek(&self, element: &Self::Type, segment: &mut gst::Segment) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .do_seek @@ -427,7 +427,7 @@ impl BaseSrcImplExt for T { fn parent_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .query @@ -443,7 +443,7 @@ impl BaseSrcImplExt for T { fn parent_event(&self, element: &Self::Type, event: &gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .event @@ -459,7 +459,7 @@ impl BaseSrcImplExt for T { fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) @@ -476,7 +476,7 @@ impl BaseSrcImplExt for T { fn parent_negotiate(&self, element: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .negotiate @@ -497,7 +497,7 @@ impl BaseSrcImplExt for T { caps: &gst::Caps, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .set_caps @@ -517,7 +517,7 @@ impl BaseSrcImplExt for T { fn parent_fixate(&self, element: &Self::Type, caps: gst::Caps) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; match (*parent_class).fixate { @@ -532,7 +532,7 @@ impl BaseSrcImplExt for T { fn parent_unlock(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .unlock @@ -552,7 +552,7 @@ impl BaseSrcImplExt for T { fn parent_unlock_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseSrcClass; (*parent_class) .unlock_stop diff --git a/gstreamer-base/src/subclass/base_transform.rs b/gstreamer-base/src/subclass/base_transform.rs index b79ed8f52..9cbbbb2ed 100644 --- a/gstreamer-base/src/subclass/base_transform.rs +++ b/gstreamer-base/src/subclass/base_transform.rs @@ -300,7 +300,7 @@ pub trait BaseTransformImplExt: ObjectSubclass { impl BaseTransformImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .start @@ -324,7 +324,7 @@ impl BaseTransformImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .stop @@ -354,7 +354,7 @@ impl BaseTransformImplExt for T { filter: Option<&gst::Caps>, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .transform_caps @@ -378,7 +378,7 @@ impl BaseTransformImplExt for T { othercaps: gst::Caps, ) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; match (*parent_class).fixate_caps { Some(f) => from_glib_full(f( @@ -399,7 +399,7 @@ impl BaseTransformImplExt for T { outcaps: &gst::Caps, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .set_caps @@ -425,7 +425,7 @@ impl BaseTransformImplExt for T { caps: &gst::Caps, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .accept_caps @@ -447,7 +447,7 @@ impl BaseTransformImplExt for T { query: &mut gst::QueryRef, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .query @@ -471,7 +471,7 @@ impl BaseTransformImplExt for T { othercaps: &gst::Caps, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .transform_size @@ -497,7 +497,7 @@ impl BaseTransformImplExt for T { fn parent_unit_size(&self, element: &Self::Type, caps: &gst::Caps) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; let f = (*parent_class).get_unit_size.unwrap_or_else(|| { if !element.unsafe_cast_ref::().is_in_place() { @@ -528,7 +528,7 @@ impl BaseTransformImplExt for T { fn parent_sink_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .sink_event @@ -544,7 +544,7 @@ impl BaseTransformImplExt for T { fn parent_src_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .src_event @@ -564,7 +564,7 @@ impl BaseTransformImplExt for T { inbuf: &gst::BufferRef, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .prepare_output_buffer @@ -599,7 +599,7 @@ impl BaseTransformImplExt for T { outbuf: &mut gst::BufferRef, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .transform @@ -630,7 +630,7 @@ impl BaseTransformImplExt for T { buf: &mut gst::BufferRef, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; let f = (*parent_class).transform_ip.unwrap_or_else(|| { if element.unsafe_cast_ref::().is_in_place() { @@ -660,7 +660,7 @@ impl BaseTransformImplExt for T { buf: &gst::Buffer, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; let f = (*parent_class).transform_ip.unwrap_or_else(|| { if element.unsafe_cast_ref::().is_in_place() { @@ -693,7 +693,7 @@ impl BaseTransformImplExt for T { outbuf: &mut gst::BufferRef, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; if let Some(ref f) = (*parent_class).copy_metadata { gst::result_from_gboolean!( @@ -719,7 +719,7 @@ impl BaseTransformImplExt for T { inbuf: &'a gst::BufferRef, ) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; (*parent_class) .transform_meta @@ -737,7 +737,7 @@ impl BaseTransformImplExt for T { fn parent_before_transform(&self, element: &Self::Type, inbuf: &gst::BufferRef) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; if let Some(ref f) = (*parent_class).before_transform { f( @@ -755,7 +755,7 @@ impl BaseTransformImplExt for T { inbuf: gst::Buffer, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; let f = (*parent_class) .submit_input_buffer @@ -775,7 +775,7 @@ impl BaseTransformImplExt for T { element: &Self::Type, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBaseTransformClass; let f = (*parent_class) .generate_output diff --git a/gstreamer-base/src/subclass/push_src.rs b/gstreamer-base/src/subclass/push_src.rs index 4665f8788..74684bff2 100644 --- a/gstreamer-base/src/subclass/push_src.rs +++ b/gstreamer-base/src/subclass/push_src.rs @@ -46,7 +46,7 @@ impl PushSrcImplExt for T { buffer: &mut gst::BufferRef, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstPushSrcClass; (*parent_class) .fill @@ -63,7 +63,7 @@ impl PushSrcImplExt for T { fn parent_alloc(&self, element: &Self::Type) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstPushSrcClass; (*parent_class) .alloc @@ -86,7 +86,7 @@ impl PushSrcImplExt for T { fn parent_create(&self, element: &Self::Type) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstPushSrcClass; (*parent_class) .create diff --git a/gstreamer-gl/src/subclass/gl_base_filter.rs b/gstreamer-gl/src/subclass/gl_base_filter.rs index 23c24cda1..84e689185 100644 --- a/gstreamer-gl/src/subclass/gl_base_filter.rs +++ b/gstreamer-gl/src/subclass/gl_base_filter.rs @@ -50,7 +50,7 @@ impl GLBaseFilterImplExt for T { outcaps: &Caps, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstGLBaseFilterClass; (*parent_class) @@ -72,7 +72,7 @@ impl GLBaseFilterImplExt for T { fn parent_gl_start(&self, filter: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstGLBaseFilterClass; (*parent_class) @@ -90,7 +90,7 @@ impl GLBaseFilterImplExt for T { fn parent_gl_stop(&self, filter: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstGLBaseFilterClass; if let Some(f) = (*parent_class).gl_stop { diff --git a/gstreamer-gl/src/subclass/gl_base_src.rs b/gstreamer-gl/src/subclass/gl_base_src.rs index 9a2e42d8a..93b47193c 100644 --- a/gstreamer-gl/src/subclass/gl_base_src.rs +++ b/gstreamer-gl/src/subclass/gl_base_src.rs @@ -40,7 +40,7 @@ pub trait GLBaseSrcImplExt: ObjectSubclass { impl GLBaseSrcImplExt for T { fn parent_gl_start(&self, element: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstGLBaseSrcClass; (*parent_class) @@ -58,7 +58,7 @@ impl GLBaseSrcImplExt for T { fn parent_gl_stop(&self, element: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstGLBaseSrcClass; if let Some(f) = (*parent_class).gl_stop { @@ -73,7 +73,7 @@ impl GLBaseSrcImplExt for T { memory: &GLMemory, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstGLBaseSrcClass; (*parent_class) diff --git a/gstreamer-gl/src/subclass/gl_filter.rs b/gstreamer-gl/src/subclass/gl_filter.rs index cdefefa43..c292de2d0 100644 --- a/gstreamer-gl/src/subclass/gl_filter.rs +++ b/gstreamer-gl/src/subclass/gl_filter.rs @@ -108,7 +108,7 @@ impl GLFilterImplExt for T { outcaps: &Caps, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut GstGLFilterClass; (*parent_class) @@ -135,7 +135,7 @@ impl GLFilterImplExt for T { output: &Buffer, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut GstGLFilterClass; (*parent_class) @@ -162,7 +162,7 @@ impl GLFilterImplExt for T { output: &GLMemory, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut GstGLFilterClass; (*parent_class) @@ -184,7 +184,7 @@ impl GLFilterImplExt for T { fn parent_init_fbo(&self, filter: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut GstGLFilterClass; (*parent_class) @@ -207,7 +207,7 @@ impl GLFilterImplExt for T { filter_caps: Option<&Caps>, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut GstGLFilterClass; let f = (*parent_class) diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_client.rs b/gstreamer-rtsp-server/src/subclass/rtsp_client.rs index 457f41958..45f4d6a4a 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_client.rs @@ -347,7 +347,7 @@ impl RTSPClientImplExt for T { media: &crate::RTSPMedia, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; let f = (*parent_class) .create_sdp @@ -368,7 +368,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; let f = (*parent_class).configure_client_media.expect( "No `configure_client_media` virtual method implementation in parent class", @@ -395,7 +395,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPResult { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; let f = (*parent_class) .params_set @@ -414,7 +414,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPResult { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; let f = (*parent_class) .params_get @@ -433,7 +433,7 @@ impl RTSPClientImplExt for T { url: &gst_rtsp::RTSPUrl, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; let f = (*parent_class) .make_path_from_uri @@ -448,7 +448,7 @@ impl RTSPClientImplExt for T { fn parent_closed(&self, client: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).closed { f(client.unsafe_cast_ref::().to_glib_none().0); @@ -458,7 +458,7 @@ impl RTSPClientImplExt for T { fn parent_new_session(&self, client: &Self::Type, session: &crate::RTSPSession) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).new_session { f( @@ -471,7 +471,7 @@ impl RTSPClientImplExt for T { fn parent_options_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).options_request { f( @@ -484,7 +484,7 @@ impl RTSPClientImplExt for T { fn parent_describe_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).describe_request { f( @@ -497,7 +497,7 @@ impl RTSPClientImplExt for T { fn parent_setup_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).setup_request { f( @@ -510,7 +510,7 @@ impl RTSPClientImplExt for T { fn parent_play_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).play_request { f( @@ -523,7 +523,7 @@ impl RTSPClientImplExt for T { fn parent_pause_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pause_request { f( @@ -536,7 +536,7 @@ impl RTSPClientImplExt for T { fn parent_teardown_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).teardown_request { f( @@ -549,7 +549,7 @@ impl RTSPClientImplExt for T { fn parent_set_parameter_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).set_parameter_request { f( @@ -562,7 +562,7 @@ impl RTSPClientImplExt for T { fn parent_parameter_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).get_parameter_request { f( @@ -575,7 +575,7 @@ impl RTSPClientImplExt for T { fn parent_announce_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).announce_request { f( @@ -588,7 +588,7 @@ impl RTSPClientImplExt for T { fn parent_record_request(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).record_request { f( @@ -601,7 +601,7 @@ impl RTSPClientImplExt for T { fn parent_handle_response(&self, client: &Self::Type, ctx: &crate::RTSPContext) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).handle_response { f( @@ -623,7 +623,7 @@ impl RTSPClientImplExt for T { sdp: &gst_sdp::SDPMessageRef, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; let f = (*parent_class) .handle_sdp @@ -649,7 +649,7 @@ impl RTSPClientImplExt for T { arr: &[String], ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).check_requirements { from_glib_full(f( @@ -669,7 +669,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_options_request { from_glib(f( @@ -688,7 +688,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_describe_request { from_glib(f( @@ -707,7 +707,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_setup_request { from_glib(f( @@ -726,7 +726,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_play_request { from_glib(f( @@ -745,7 +745,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_pause_request { from_glib(f( @@ -764,7 +764,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_teardown_request { from_glib(f( @@ -783,7 +783,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_set_parameter_request { from_glib(f( @@ -802,7 +802,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_get_parameter_request { from_glib(f( @@ -821,7 +821,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_announce_request { from_glib(f( @@ -840,7 +840,7 @@ impl RTSPClientImplExt for T { ctx: &crate::RTSPContext, ) -> gst_rtsp::RTSPStatusCode { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPClientClass; if let Some(f) = (*parent_class).pre_record_request { from_glib(f( diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_media.rs b/gstreamer-rtsp-server/src/subclass/rtsp_media.rs index 90a9e550c..a25490b00 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_media.rs @@ -152,7 +152,7 @@ pub trait RTSPMediaImplExt: ObjectSubclass { impl RTSPMediaImplExt for T { fn parent_handle_message(&self, media: &Self::Type, message: &gst::MessageRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).handle_message { from_glib(f( @@ -171,7 +171,7 @@ impl RTSPMediaImplExt for T { thread: &RTSPThread, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).prepare { gst::result_from_gboolean!( @@ -190,7 +190,7 @@ impl RTSPMediaImplExt for T { fn parent_unprepare(&self, media: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).unprepare { gst::result_from_gboolean!( @@ -206,7 +206,7 @@ impl RTSPMediaImplExt for T { fn parent_suspend(&self, media: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).suspend { gst::result_from_gboolean!( @@ -222,7 +222,7 @@ impl RTSPMediaImplExt for T { fn parent_unsuspend(&self, media: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).unsuspend { gst::result_from_gboolean!( @@ -242,7 +242,7 @@ impl RTSPMediaImplExt for T { unsafe { use std::mem; - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).query_position { let mut position = mem::MaybeUninit::uninit(); @@ -265,7 +265,7 @@ impl RTSPMediaImplExt for T { unsafe { use std::mem; - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).query_stop { let mut stop = mem::MaybeUninit::uninit(); @@ -286,7 +286,7 @@ impl RTSPMediaImplExt for T { fn parent_create_rtpbin(&self, media: &Self::Type) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; let f = (*parent_class) .create_rtpbin @@ -302,7 +302,7 @@ impl RTSPMediaImplExt for T { rtpbin: &gst::Element, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).setup_rtpbin { let ptr = rtpbin.to_glib_none().0; @@ -337,7 +337,7 @@ impl RTSPMediaImplExt for T { info: &SDPInfo, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; let f = (*parent_class) .setup_sdp @@ -357,7 +357,7 @@ impl RTSPMediaImplExt for T { fn parent_new_stream(&self, media: &Self::Type, stream: &crate::RTSPStream) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).new_stream { f( @@ -370,7 +370,7 @@ impl RTSPMediaImplExt for T { fn parent_removed_stream(&self, media: &Self::Type, stream: &crate::RTSPStream) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).removed_stream { f( @@ -383,7 +383,7 @@ impl RTSPMediaImplExt for T { fn parent_prepared(&self, media: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).prepared { f(media.unsafe_cast_ref::().to_glib_none().0); @@ -393,7 +393,7 @@ impl RTSPMediaImplExt for T { fn parent_unprepared(&self, media: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).unprepared { f(media.unsafe_cast_ref::().to_glib_none().0); @@ -403,7 +403,7 @@ impl RTSPMediaImplExt for T { fn parent_target_state(&self, media: &Self::Type, state: gst::State) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).target_state { f( @@ -416,7 +416,7 @@ impl RTSPMediaImplExt for T { fn parent_new_state(&self, media: &Self::Type, state: gst::State) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; if let Some(f) = (*parent_class).new_state { f( @@ -433,7 +433,7 @@ impl RTSPMediaImplExt for T { sdp: &gst_sdp::SDPMessageRef, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaClass; let f = (*parent_class) .handle_sdp diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs index 4f9966660..3dad2dac0 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_media_factory.rs @@ -84,7 +84,7 @@ impl RTSPMediaFactoryImplExt for T { url: &gst_rtsp::RTSPUrl, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; (*parent_class) .gen_key @@ -107,7 +107,7 @@ impl RTSPMediaFactoryImplExt for T { url: &gst_rtsp::RTSPUrl, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; (*parent_class) .create_element @@ -130,7 +130,7 @@ impl RTSPMediaFactoryImplExt for T { url: &gst_rtsp::RTSPUrl, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; (*parent_class) .construct @@ -153,7 +153,7 @@ impl RTSPMediaFactoryImplExt for T { media: &crate::RTSPMedia, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; (*parent_class) .create_pipeline @@ -178,7 +178,7 @@ impl RTSPMediaFactoryImplExt for T { fn parent_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; if let Some(f) = (*parent_class).configure { f( @@ -194,7 +194,7 @@ impl RTSPMediaFactoryImplExt for T { fn parent_media_constructed(&self, factory: &Self::Type, media: &crate::RTSPMedia) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; if let Some(f) = (*parent_class).media_constructed { f( @@ -210,7 +210,7 @@ impl RTSPMediaFactoryImplExt for T { fn parent_media_configure(&self, factory: &Self::Type, media: &crate::RTSPMedia) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPMediaFactoryClass; if let Some(f) = (*parent_class).media_configure { f( diff --git a/gstreamer-rtsp-server/src/subclass/rtsp_server.rs b/gstreamer-rtsp-server/src/subclass/rtsp_server.rs index 82b1b3c14..15e97499a 100644 --- a/gstreamer-rtsp-server/src/subclass/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/subclass/rtsp_server.rs @@ -25,7 +25,7 @@ pub trait RTSPServerImplExt: ObjectSubclass { impl RTSPServerImplExt for T { fn parent_create_client(&self, server: &Self::Type) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPServerClass; let f = (*parent_class) .create_client @@ -36,7 +36,7 @@ impl RTSPServerImplExt for T { fn parent_client_connected(&self, server: &Self::Type, client: &crate::RTSPClient) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstRTSPServerClass; if let Some(f) = (*parent_class).client_connected { f( diff --git a/gstreamer-video/src/subclass/video_decoder.rs b/gstreamer-video/src/subclass/video_decoder.rs index 311b87c4e..c80eb5227 100644 --- a/gstreamer-video/src/subclass/video_decoder.rs +++ b/gstreamer-video/src/subclass/video_decoder.rs @@ -168,7 +168,7 @@ pub trait VideoDecoderImplExt: ObjectSubclass { impl VideoDecoderImplExt for T { fn parent_open(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .open @@ -192,7 +192,7 @@ impl VideoDecoderImplExt for T { fn parent_close(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .close @@ -216,7 +216,7 @@ impl VideoDecoderImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .start @@ -240,7 +240,7 @@ impl VideoDecoderImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .stop @@ -264,7 +264,7 @@ impl VideoDecoderImplExt for T { fn parent_finish(&self, element: &Self::Type) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .finish @@ -281,7 +281,7 @@ impl VideoDecoderImplExt for T { fn parent_drain(&self, element: &Self::Type) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .drain @@ -302,7 +302,7 @@ impl VideoDecoderImplExt for T { state: &VideoCodecState<'static, Readable>, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .set_format @@ -328,7 +328,7 @@ impl VideoDecoderImplExt for T { at_eos: bool, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .parse @@ -351,7 +351,7 @@ impl VideoDecoderImplExt for T { frame: VideoCodecFrame, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .handle_frame @@ -368,7 +368,7 @@ impl VideoDecoderImplExt for T { fn parent_flush(&self, element: &Self::Type) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .flush @@ -384,7 +384,7 @@ impl VideoDecoderImplExt for T { fn parent_negotiate(&self, element: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .negotiate @@ -401,7 +401,7 @@ impl VideoDecoderImplExt for T { fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .getcaps @@ -421,7 +421,7 @@ impl VideoDecoderImplExt for T { fn parent_sink_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; let f = (*parent_class) .sink_event @@ -435,7 +435,7 @@ impl VideoDecoderImplExt for T { fn parent_sink_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; let f = (*parent_class) .sink_query @@ -449,7 +449,7 @@ impl VideoDecoderImplExt for T { fn parent_src_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; let f = (*parent_class) .src_event @@ -463,7 +463,7 @@ impl VideoDecoderImplExt for T { fn parent_src_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; let f = (*parent_class) .src_query @@ -481,7 +481,7 @@ impl VideoDecoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .propose_allocation @@ -508,7 +508,7 @@ impl VideoDecoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoDecoderClass; (*parent_class) .decide_allocation diff --git a/gstreamer-video/src/subclass/video_encoder.rs b/gstreamer-video/src/subclass/video_encoder.rs index 71f5655c8..133619381 100644 --- a/gstreamer-video/src/subclass/video_encoder.rs +++ b/gstreamer-video/src/subclass/video_encoder.rs @@ -144,7 +144,7 @@ pub trait VideoEncoderImplExt: ObjectSubclass { impl VideoEncoderImplExt for T { fn parent_open(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .open @@ -168,7 +168,7 @@ impl VideoEncoderImplExt for T { fn parent_close(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .close @@ -192,7 +192,7 @@ impl VideoEncoderImplExt for T { fn parent_start(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .start @@ -216,7 +216,7 @@ impl VideoEncoderImplExt for T { fn parent_stop(&self, element: &Self::Type) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .stop @@ -240,7 +240,7 @@ impl VideoEncoderImplExt for T { fn parent_finish(&self, element: &Self::Type) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .finish @@ -261,7 +261,7 @@ impl VideoEncoderImplExt for T { state: &VideoCodecState<'static, Readable>, ) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .set_format @@ -285,7 +285,7 @@ impl VideoEncoderImplExt for T { frame: VideoCodecFrame, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .handle_frame @@ -302,7 +302,7 @@ impl VideoEncoderImplExt for T { fn parent_flush(&self, element: &Self::Type) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .flush @@ -318,7 +318,7 @@ impl VideoEncoderImplExt for T { fn parent_negotiate(&self, element: &Self::Type) -> Result<(), gst::LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .negotiate @@ -335,7 +335,7 @@ impl VideoEncoderImplExt for T { fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> gst::Caps { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .getcaps @@ -355,7 +355,7 @@ impl VideoEncoderImplExt for T { fn parent_sink_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; let f = (*parent_class) .sink_event @@ -369,7 +369,7 @@ impl VideoEncoderImplExt for T { fn parent_sink_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; let f = (*parent_class) .sink_query @@ -383,7 +383,7 @@ impl VideoEncoderImplExt for T { fn parent_src_event(&self, element: &Self::Type, event: gst::Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; let f = (*parent_class) .src_event @@ -397,7 +397,7 @@ impl VideoEncoderImplExt for T { fn parent_src_query(&self, element: &Self::Type, query: &mut gst::QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; let f = (*parent_class) .src_query @@ -415,7 +415,7 @@ impl VideoEncoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .propose_allocation @@ -442,7 +442,7 @@ impl VideoEncoderImplExt for T { query: &mut gst::QueryRef, ) -> Result<(), gst::ErrorMessage> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoEncoderClass; (*parent_class) .decide_allocation diff --git a/gstreamer-video/src/subclass/video_sink.rs b/gstreamer-video/src/subclass/video_sink.rs index 160081e5b..6b227290f 100644 --- a/gstreamer-video/src/subclass/video_sink.rs +++ b/gstreamer-video/src/subclass/video_sink.rs @@ -32,7 +32,7 @@ impl VideoSinkImplExt for T { buffer: &gst::Buffer, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstVideoSinkClass; (*parent_class) .show_frame diff --git a/gstreamer/src/subclass/bin.rs b/gstreamer/src/subclass/bin.rs index 222fae696..1cf550aef 100644 --- a/gstreamer/src/subclass/bin.rs +++ b/gstreamer/src/subclass/bin.rs @@ -40,7 +40,7 @@ pub trait BinImplExt: ObjectSubclass { impl BinImplExt for T { fn parent_add_element(&self, bin: &Self::Type, element: &Element) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBinClass; let f = (*parent_class).add_element.ok_or_else(|| { loggable_error!( @@ -65,7 +65,7 @@ impl BinImplExt for T { element: &Element, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBinClass; let f = (*parent_class).remove_element.ok_or_else(|| { loggable_error!( @@ -86,7 +86,7 @@ impl BinImplExt for T { fn parent_handle_message(&self, bin: &Self::Type, message: Message) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstBinClass; if let Some(ref f) = (*parent_class).handle_message { f( diff --git a/gstreamer/src/subclass/clock.rs b/gstreamer/src/subclass/clock.rs index 0c110ca0d..395e2dbfc 100644 --- a/gstreamer/src/subclass/clock.rs +++ b/gstreamer/src/subclass/clock.rs @@ -87,7 +87,7 @@ impl ClockImplExt for T { new_resolution: ClockTime, ) -> ClockTime { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstClockClass; if let Some(func) = (*parent_class).change_resolution { @@ -104,7 +104,7 @@ impl ClockImplExt for T { fn parent_resolution(&self, clock: &Self::Type) -> ClockTime { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstClockClass; from_glib( @@ -118,7 +118,7 @@ impl ClockImplExt for T { fn parent_internal_time(&self, clock: &Self::Type) -> ClockTime { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstClockClass; from_glib( @@ -136,7 +136,7 @@ impl ClockImplExt for T { id: &ClockId, ) -> (Result, ClockTimeDiff) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstClockClass; let mut jitter = 0; @@ -165,7 +165,7 @@ impl ClockImplExt for T { id: &ClockId, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstClockClass; ClockReturn::from_glib( (*parent_class) @@ -184,7 +184,7 @@ impl ClockImplExt for T { fn parent_unschedule(&self, clock: &Self::Type, id: &ClockId) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstClockClass; if let Some(func) = (*parent_class).unschedule { func( diff --git a/gstreamer/src/subclass/device.rs b/gstreamer/src/subclass/device.rs index c425da3ad..aa1db5b1f 100644 --- a/gstreamer/src/subclass/device.rs +++ b/gstreamer/src/subclass/device.rs @@ -49,7 +49,7 @@ impl DeviceImplExt for T { name: Option<&str>, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstDeviceClass; if let Some(f) = (*parent_class).create_element { let ptr = f( @@ -79,7 +79,7 @@ impl DeviceImplExt for T { element: &Element, ) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstDeviceClass; let f = (*parent_class).reconfigure_element.ok_or_else(|| { loggable_error!( diff --git a/gstreamer/src/subclass/device_provider.rs b/gstreamer/src/subclass/device_provider.rs index ce5a78152..f9c507340 100644 --- a/gstreamer/src/subclass/device_provider.rs +++ b/gstreamer/src/subclass/device_provider.rs @@ -46,7 +46,7 @@ pub trait DeviceProviderImplExt: ObjectSubclass { impl DeviceProviderImplExt for T { fn parent_probe(&self, device_provider: &Self::Type) -> Vec { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstDeviceProviderClass; if let Some(f) = (*parent_class).probe { FromGlibPtrContainer::from_glib_full(f(device_provider @@ -61,7 +61,7 @@ impl DeviceProviderImplExt for T { fn parent_start(&self, device_provider: &Self::Type) -> Result<(), LoggableError> { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstDeviceProviderClass; let f = (*parent_class).start.ok_or_else(|| { loggable_error!(crate::CAT_RUST, "Parent function `start` is not defined") @@ -79,7 +79,7 @@ impl DeviceProviderImplExt for T { fn parent_stop(&self, device_provider: &Self::Type) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstDeviceProviderClass; if let Some(f) = (*parent_class).stop { f(device_provider diff --git a/gstreamer/src/subclass/element.rs b/gstreamer/src/subclass/element.rs index c5efbeafc..be9800160 100644 --- a/gstreamer/src/subclass/element.rs +++ b/gstreamer/src/subclass/element.rs @@ -164,7 +164,7 @@ impl ElementImplExt for T { transition: StateChange, ) -> Result { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; let f = (*parent_class) @@ -186,7 +186,7 @@ impl ElementImplExt for T { caps: Option<&crate::Caps>, ) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -205,7 +205,7 @@ impl ElementImplExt for T { fn parent_release_pad(&self, element: &Self::Type, pad: &crate::Pad) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -222,7 +222,7 @@ impl ElementImplExt for T { fn parent_send_event(&self, element: &Self::Type, event: Event) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -239,7 +239,7 @@ impl ElementImplExt for T { fn parent_query(&self, element: &Self::Type, query: &mut QueryRef) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -256,7 +256,7 @@ impl ElementImplExt for T { fn parent_set_context(&self, element: &Self::Type, context: &crate::Context) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -273,7 +273,7 @@ impl ElementImplExt for T { fn parent_set_clock(&self, element: &Self::Type, clock: Option<&crate::Clock>) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -290,7 +290,7 @@ impl ElementImplExt for T { fn parent_provide_clock(&self, element: &Self::Type) -> Option { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; (*parent_class) @@ -302,7 +302,7 @@ impl ElementImplExt for T { fn parent_post_message(&self, element: &Self::Type, msg: crate::Message) -> bool { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstElementClass; if let Some(f) = (*parent_class).post_message { diff --git a/gstreamer/src/subclass/pad.rs b/gstreamer/src/subclass/pad.rs index fb876181a..7aedea76c 100644 --- a/gstreamer/src/subclass/pad.rs +++ b/gstreamer/src/subclass/pad.rs @@ -25,7 +25,7 @@ pub trait PadImplExt: ObjectSubclass { impl PadImplExt for T { fn parent_linked(&self, pad: &Self::Type, peer: &Pad) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstPadClass; (*parent_class) @@ -42,7 +42,7 @@ impl PadImplExt for T { fn parent_unlinked(&self, pad: &Self::Type, peer: &Pad) { unsafe { - let data = T::type_data(); + let data = Self::type_data(); let parent_class = data.as_ref().parent_class() as *mut ffi::GstPadClass; (*parent_class)