mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 11:01:10 +00:00
Replace T::type_data with Self::type_data for clippy::use_self
This commit is contained in:
parent
e52e4328b3
commit
980304ce36
27 changed files with 255 additions and 255 deletions
|
@ -164,7 +164,7 @@ pub trait AudioDecoderImplExt: ObjectSubclass {
|
|||
impl<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> AudioDecoderImplExt for T {
|
|||
buffer: Option<&gst::Buffer>,
|
||||
) -> Result<gst::FlowSuccess, 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)
|
||||
.handle_frame
|
||||
|
@ -346,7 +346,7 @@ impl<T: AudioDecoderImpl> AudioDecoderImplExt for T {
|
|||
buffer: gst::Buffer,
|
||||
) -> Result<Option<gst::Buffer>, 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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<T: AudioDecoderImpl> 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
|
||||
|
|
|
@ -150,7 +150,7 @@ pub trait AudioEncoderImplExt: ObjectSubclass {
|
|||
impl<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> AudioEncoderImplExt for T {
|
|||
buffer: Option<&gst::Buffer>,
|
||||
) -> Result<gst::FlowSuccess, 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;
|
||||
(*parent_class)
|
||||
.handle_frame
|
||||
|
@ -297,7 +297,7 @@ impl<T: AudioEncoderImpl> AudioEncoderImplExt for T {
|
|||
buffer: gst::Buffer,
|
||||
) -> Result<Option<gst::Buffer>, 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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<T: AudioEncoderImpl> 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
|
||||
|
|
|
@ -60,7 +60,7 @@ pub trait AudioSinkImplExt: ObjectSubclass {
|
|||
impl<T: AudioSinkImpl> 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<T: AudioSinkImpl> 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<T: AudioSinkImpl> 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<T: AudioSinkImpl> 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<T: AudioSinkImpl> 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<T: AudioSinkImpl> AudioSinkImplExt for T {
|
|||
|
||||
fn parent_write(&self, sink: &Self::Type, buffer: &[u8]) -> Result<i32, 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).write {
|
||||
Some(f) => f,
|
||||
|
@ -173,7 +173,7 @@ impl<T: AudioSinkImpl> 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::<AudioSink>().to_glib_none().0)
|
||||
|
|
|
@ -70,7 +70,7 @@ pub trait AudioSrcImplExt: ObjectSubclass {
|
|||
impl<T: AudioSrcImpl> 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<T: AudioSrcImpl> 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<T: AudioSrcImpl> 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<T: AudioSrcImpl> 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<T: AudioSrcImpl> 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<T: AudioSrcImpl> 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<T: AudioSrcImpl> 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::<AudioSrc>().to_glib_none().0)
|
||||
|
|
|
@ -283,7 +283,7 @@ pub trait AggregatorImplExt: ObjectSubclass {
|
|||
impl<T: AggregatorImpl> AggregatorImplExt for T {
|
||||
fn parent_flush(&self, aggregator: &Self::Type) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
buffer: gst::Buffer,
|
||||
) -> Option<gst::Buffer> {
|
||||
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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
buffer: gst::Buffer,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
buffer_list: gst::BufferList,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: AggregatorImpl> 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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
event: gst::Event,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
timeout: bool,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
caps: Option<&gst::Caps>,
|
||||
) -> Option<AggregatorPad> {
|
||||
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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
caps: &gst::Caps,
|
||||
) -> Result<gst::Caps, gst::FlowError> {
|
||||
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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> 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<T: AggregatorImpl> AggregatorImplExt for T {
|
|||
pad: &AggregatorPad,
|
||||
) -> Option<gst::Sample> {
|
||||
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
|
||||
|
|
|
@ -49,7 +49,7 @@ impl<T: AggregatorPadImpl> AggregatorPadImplExt for T {
|
|||
aggregator: &Aggregator,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: AggregatorPadImpl> 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
|
||||
|
|
|
@ -75,7 +75,7 @@ pub trait BaseParseImplExt: ObjectSubclass {
|
|||
impl<T: BaseParseImpl> 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<T: BaseParseImpl> 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<T: BaseParseImpl> 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<T: BaseParseImpl> 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<T: BaseParseImpl> BaseParseImplExt for T {
|
|||
dest_format: gst::Format,
|
||||
) -> Option<gst::GenericFormattedValue> {
|
||||
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| {
|
||||
|
|
|
@ -130,7 +130,7 @@ pub trait BaseSinkImplExt: ObjectSubclass {
|
|||
impl<T: BaseSinkImpl> 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<T: BaseSinkImpl> 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<T: BaseSinkImpl> BaseSinkImplExt for T {
|
|||
buffer: &gst::Buffer,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseSinkImpl> BaseSinkImplExt for T {
|
|||
buffer: &gst::Buffer,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseSinkImpl> BaseSinkImplExt for T {
|
|||
list: &gst::BufferList,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseSinkImpl> BaseSinkImplExt for T {
|
|||
list: &gst::BufferList,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseSinkImpl> 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<T: BaseSinkImpl> 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<T: BaseSinkImpl> BaseSinkImplExt for T {
|
|||
|
||||
fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> Option<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;
|
||||
|
||||
(*parent_class)
|
||||
|
@ -317,7 +317,7 @@ impl<T: BaseSinkImpl> 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<T: BaseSinkImpl> 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<T: BaseSinkImpl> 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<T: BaseSinkImpl> 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
|
||||
|
|
|
@ -172,7 +172,7 @@ pub trait BaseSrcImplExt: ObjectSubclass {
|
|||
impl<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> BaseSrcImplExt for T {
|
|||
|
||||
fn parent_size(&self, element: &Self::Type) -> Option<u64> {
|
||||
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<T: BaseSrcImpl> 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<T: BaseSrcImpl> BaseSrcImplExt for T {
|
|||
buffer: &mut gst::BufferRef,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseSrcImpl> BaseSrcImplExt for T {
|
|||
length: u32,
|
||||
) -> Result<gst::Buffer, gst::FlowError> {
|
||||
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<T: BaseSrcImpl> BaseSrcImplExt for T {
|
|||
length: u32,
|
||||
) -> Result<CreateSuccess, gst::FlowError> {
|
||||
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<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> BaseSrcImplExt for T {
|
|||
|
||||
fn parent_caps(&self, element: &Self::Type, filter: Option<&gst::Caps>) -> Option<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;
|
||||
|
||||
(*parent_class)
|
||||
|
@ -476,7 +476,7 @@ impl<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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<T: BaseSrcImpl> 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
|
||||
|
|
|
@ -300,7 +300,7 @@ pub trait BaseTransformImplExt: ObjectSubclass {
|
|||
impl<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
filter: Option<&gst::Caps>,
|
||||
) -> Option<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;
|
||||
(*parent_class)
|
||||
.transform_caps
|
||||
|
@ -378,7 +378,7 @@ impl<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
othercaps: &gst::Caps,
|
||||
) -> Option<usize> {
|
||||
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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
|
||||
fn parent_unit_size(&self, element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
||||
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::<BaseTransform>().is_in_place() {
|
||||
|
@ -528,7 +528,7 @@ impl<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
inbuf: &gst::BufferRef,
|
||||
) -> Result<PrepareOutputBufferSuccess, gst::FlowError> {
|
||||
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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
outbuf: &mut gst::BufferRef,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
buf: &mut gst::BufferRef,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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::<BaseTransform>().is_in_place() {
|
||||
|
@ -660,7 +660,7 @@ impl<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
buf: &gst::Buffer,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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::<BaseTransform>().is_in_place() {
|
||||
|
@ -693,7 +693,7 @@ impl<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> 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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
inbuf: gst::Buffer,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: BaseTransformImpl> BaseTransformImplExt for T {
|
|||
element: &Self::Type,
|
||||
) -> Result<GenerateOutputSuccess, gst::FlowError> {
|
||||
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
|
||||
|
|
|
@ -46,7 +46,7 @@ impl<T: PushSrcImpl> PushSrcImplExt for T {
|
|||
buffer: &mut gst::BufferRef,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: PushSrcImpl> PushSrcImplExt for T {
|
|||
|
||||
fn parent_alloc(&self, element: &Self::Type) -> Result<gst::Buffer, gst::FlowError> {
|
||||
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<T: PushSrcImpl> PushSrcImplExt for T {
|
|||
|
||||
fn parent_create(&self, element: &Self::Type) -> Result<gst::Buffer, gst::FlowError> {
|
||||
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
|
||||
|
|
|
@ -50,7 +50,7 @@ impl<T: GLBaseFilterImpl> 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<T: GLBaseFilterImpl> 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<T: GLBaseFilterImpl> 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 {
|
||||
|
|
|
@ -40,7 +40,7 @@ pub trait GLBaseSrcImplExt: ObjectSubclass {
|
|||
impl<T: GLBaseSrcImpl> 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<T: GLBaseSrcImpl> 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<T: GLBaseSrcImpl> 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)
|
||||
|
|
|
@ -108,7 +108,7 @@ impl<T: GLFilterImpl> 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<T: GLFilterImpl> 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<T: GLFilterImpl> 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<T: GLFilterImpl> 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<T: GLFilterImpl> GLFilterImplExt for T {
|
|||
filter_caps: Option<&Caps>,
|
||||
) -> Option<Caps> {
|
||||
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)
|
||||
|
|
|
@ -347,7 +347,7 @@ impl<T: RTSPClientImpl> RTSPClientImplExt for T {
|
|||
media: &crate::RTSPMedia,
|
||||
) -> Option<gst_sdp::SDPMessage> {
|
||||
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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> RTSPClientImplExt for T {
|
|||
url: &gst_rtsp::RTSPUrl,
|
||||
) -> Option<glib::GString> {
|
||||
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<T: RTSPClientImpl> 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::<RTSPClient>().to_glib_none().0);
|
||||
|
@ -458,7 +458,7 @@ impl<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> RTSPClientImplExt for T {
|
|||
arr: &[String],
|
||||
) -> Option<glib::GString> {
|
||||
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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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<T: RTSPClientImpl> 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(
|
||||
|
|
|
@ -152,7 +152,7 @@ pub trait RTSPMediaImplExt: ObjectSubclass {
|
|||
impl<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> RTSPMediaImplExt for T {
|
|||
|
||||
fn parent_create_rtpbin(&self, media: &Self::Type) -> Option<gst::Element> {
|
||||
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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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::<RTSPMedia>().to_glib_none().0);
|
||||
|
@ -393,7 +393,7 @@ impl<T: RTSPMediaImpl> 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::<RTSPMedia>().to_glib_none().0);
|
||||
|
@ -403,7 +403,7 @@ impl<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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<T: RTSPMediaImpl> 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
|
||||
|
|
|
@ -84,7 +84,7 @@ impl<T: RTSPMediaFactoryImpl> RTSPMediaFactoryImplExt for T {
|
|||
url: &gst_rtsp::RTSPUrl,
|
||||
) -> Option<glib::GString> {
|
||||
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<T: RTSPMediaFactoryImpl> RTSPMediaFactoryImplExt for T {
|
|||
url: &gst_rtsp::RTSPUrl,
|
||||
) -> Option<gst::Element> {
|
||||
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<T: RTSPMediaFactoryImpl> RTSPMediaFactoryImplExt for T {
|
|||
url: &gst_rtsp::RTSPUrl,
|
||||
) -> Option<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;
|
||||
(*parent_class)
|
||||
.construct
|
||||
|
@ -153,7 +153,7 @@ impl<T: RTSPMediaFactoryImpl> RTSPMediaFactoryImplExt for T {
|
|||
media: &crate::RTSPMedia,
|
||||
) -> Option<gst::Pipeline> {
|
||||
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<T: RTSPMediaFactoryImpl> 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<T: RTSPMediaFactoryImpl> 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<T: RTSPMediaFactoryImpl> 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(
|
||||
|
|
|
@ -25,7 +25,7 @@ pub trait RTSPServerImplExt: ObjectSubclass {
|
|||
impl<T: RTSPServerImpl> RTSPServerImplExt for T {
|
||||
fn parent_create_client(&self, server: &Self::Type) -> Option<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;
|
||||
let f = (*parent_class)
|
||||
.create_client
|
||||
|
@ -36,7 +36,7 @@ impl<T: RTSPServerImpl> 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(
|
||||
|
|
|
@ -168,7 +168,7 @@ pub trait VideoDecoderImplExt: ObjectSubclass {
|
|||
impl<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> VideoDecoderImplExt for T {
|
|||
|
||||
fn parent_finish(&self, element: &Self::Type) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: VideoDecoderImpl> VideoDecoderImplExt for T {
|
|||
|
||||
fn parent_drain(&self, element: &Self::Type) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> VideoDecoderImplExt for T {
|
|||
at_eos: bool,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: VideoDecoderImpl> VideoDecoderImplExt for T {
|
|||
frame: VideoCodecFrame,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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<T: VideoDecoderImpl> 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
|
||||
|
|
|
@ -144,7 +144,7 @@ pub trait VideoEncoderImplExt: ObjectSubclass {
|
|||
impl<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> VideoEncoderImplExt for T {
|
|||
|
||||
fn parent_finish(&self, element: &Self::Type) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> VideoEncoderImplExt for T {
|
|||
frame: VideoCodecFrame,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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<T: VideoEncoderImpl> 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
|
||||
|
|
|
@ -32,7 +32,7 @@ impl<T: VideoSinkImpl> VideoSinkImplExt for T {
|
|||
buffer: &gst::Buffer,
|
||||
) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
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
|
||||
|
|
|
@ -40,7 +40,7 @@ pub trait BinImplExt: ObjectSubclass {
|
|||
impl<T: BinImpl> 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<T: BinImpl> 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<T: BinImpl> 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(
|
||||
|
|
|
@ -87,7 +87,7 @@ impl<T: ClockImpl> 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<T: ClockImpl> 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<T: ClockImpl> 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<T: ClockImpl> ClockImplExt for T {
|
|||
id: &ClockId,
|
||||
) -> (Result<ClockSuccess, ClockError>, 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<T: ClockImpl> ClockImplExt for T {
|
|||
id: &ClockId,
|
||||
) -> Result<ClockSuccess, ClockError> {
|
||||
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<T: ClockImpl> 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(
|
||||
|
|
|
@ -49,7 +49,7 @@ impl<T: DeviceImpl> DeviceImplExt for T {
|
|||
name: Option<&str>,
|
||||
) -> Result<Element, LoggableError> {
|
||||
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<T: DeviceImpl> 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!(
|
||||
|
|
|
@ -46,7 +46,7 @@ pub trait DeviceProviderImplExt: ObjectSubclass {
|
|||
impl<T: DeviceProviderImpl> DeviceProviderImplExt for T {
|
||||
fn parent_probe(&self, device_provider: &Self::Type) -> Vec<Device> {
|
||||
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<T: DeviceProviderImpl> 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<T: DeviceProviderImpl> 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
|
||||
|
|
|
@ -164,7 +164,7 @@ impl<T: ElementImpl> ElementImplExt for T {
|
|||
transition: StateChange,
|
||||
) -> Result<StateChangeSuccess, StateChangeError> {
|
||||
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<T: ElementImpl> ElementImplExt for T {
|
|||
caps: Option<&crate::Caps>,
|
||||
) -> Option<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)
|
||||
|
@ -205,7 +205,7 @@ impl<T: ElementImpl> 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<T: ElementImpl> 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<T: ElementImpl> 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<T: ElementImpl> 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<T: ElementImpl> 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<T: ElementImpl> ElementImplExt for T {
|
|||
|
||||
fn parent_provide_clock(&self, element: &Self::Type) -> Option<crate::Clock> {
|
||||
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<T: ElementImpl> 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 {
|
||||
|
|
|
@ -25,7 +25,7 @@ pub trait PadImplExt: ObjectSubclass {
|
|||
impl<T: PadImpl> 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<T: PadImpl> 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)
|
||||
|
|
Loading…
Reference in a new issue