diff --git a/gstreamer-allocators/src/auto/dma_buf_allocator.rs b/gstreamer-allocators/src/auto/dma_buf_allocator.rs index 7cd494f6a..5d257bb0a 100644 --- a/gstreamer-allocators/src/auto/dma_buf_allocator.rs +++ b/gstreamer-allocators/src/auto/dma_buf_allocator.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::FdAllocator; -use glib::object::Cast; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstDmaBufAllocator")] diff --git a/gstreamer-allocators/src/auto/fd_allocator.rs b/gstreamer-allocators/src/auto/fd_allocator.rs index f296a7a94..510a54c74 100644 --- a/gstreamer-allocators/src/auto/fd_allocator.rs +++ b/gstreamer-allocators/src/auto/fd_allocator.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstFdAllocator")] diff --git a/gstreamer-allocators/src/auto/flags.rs b/gstreamer-allocators/src/auto/flags.rs index ffd69244b..f56e77349 100644 --- a/gstreamer-allocators/src/auto/flags.rs +++ b/gstreamer-allocators/src/auto/flags.rs @@ -24,6 +24,7 @@ bitflags! { impl IntoGlib for FdMemoryFlags { type GlibType = ffi::GstFdMemoryFlags; + #[inline] fn into_glib(self) -> ffi::GstFdMemoryFlags { self.bits() } @@ -31,6 +32,7 @@ impl IntoGlib for FdMemoryFlags { #[doc(hidden)] impl FromGlib for FdMemoryFlags { + #[inline] unsafe fn from_glib(value: ffi::GstFdMemoryFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) diff --git a/gstreamer-allocators/src/auto/phys_memory_allocator.rs b/gstreamer-allocators/src/auto/phys_memory_allocator.rs index 68741e746..6538ed863 100644 --- a/gstreamer-allocators/src/auto/phys_memory_allocator.rs +++ b/gstreamer-allocators/src/auto/phys_memory_allocator.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; +use glib::prelude::*; glib::wrapper! { #[doc(alias = "GstPhysMemoryAllocator")] diff --git a/gstreamer-allocators/src/auto/versions.txt b/gstreamer-allocators/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-allocators/src/auto/versions.txt +++ b/gstreamer-allocators/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-allocators/sys/src/auto/versions.txt b/gstreamer-allocators/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-allocators/sys/src/auto/versions.txt +++ b/gstreamer-allocators/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 4b655da13..13acf4b6f 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -3,14 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAppSink")] diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index 8e66a3c5b..e7e7d9f67 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -7,14 +7,12 @@ #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] use crate::AppLeakyType; use crate::AppStreamType; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAppSrc")] diff --git a/gstreamer-app/src/auto/enums.rs b/gstreamer-app/src/auto/enums.rs index baedbb6cd..6102ae042 100644 --- a/gstreamer-app/src/auto/enums.rs +++ b/gstreamer-app/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] @@ -31,6 +27,7 @@ pub enum AppLeakyType { impl IntoGlib for AppLeakyType { type GlibType = ffi::GstAppLeakyType; + #[inline] fn into_glib(self) -> ffi::GstAppLeakyType { match self { Self::None => ffi::GST_APP_LEAKY_TYPE_NONE, @@ -45,6 +42,7 @@ impl IntoGlib for AppLeakyType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for AppLeakyType { + #[inline] unsafe fn from_glib(value: ffi::GstAppLeakyType) -> Self { skip_assert_initialized!(); match value { @@ -59,6 +57,7 @@ impl FromGlib for AppLeakyType { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for AppLeakyType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_app_leaky_type_get_type()) } } @@ -75,6 +74,7 @@ impl glib::value::ValueType for AppLeakyType { unsafe impl<'a> FromValue<'a> for AppLeakyType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -84,6 +84,7 @@ unsafe impl<'a> FromValue<'a> for AppLeakyType { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for AppLeakyType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -92,6 +93,7 @@ impl ToValue for AppLeakyType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -125,6 +127,7 @@ pub enum AppStreamType { impl IntoGlib for AppStreamType { type GlibType = ffi::GstAppStreamType; + #[inline] fn into_glib(self) -> ffi::GstAppStreamType { match self { Self::Stream => ffi::GST_APP_STREAM_TYPE_STREAM, @@ -137,6 +140,7 @@ impl IntoGlib for AppStreamType { #[doc(hidden)] impl FromGlib for AppStreamType { + #[inline] unsafe fn from_glib(value: ffi::GstAppStreamType) -> Self { skip_assert_initialized!(); match value { @@ -149,6 +153,7 @@ impl FromGlib for AppStreamType { } impl StaticType for AppStreamType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_app_stream_type_get_type()) } } @@ -161,6 +166,7 @@ impl glib::value::ValueType for AppStreamType { unsafe impl<'a> FromValue<'a> for AppStreamType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -168,6 +174,7 @@ unsafe impl<'a> FromValue<'a> for AppStreamType { } impl ToValue for AppStreamType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -176,6 +183,7 @@ impl ToValue for AppStreamType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-app/src/auto/versions.txt b/gstreamer-app/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-app/src/auto/versions.txt +++ b/gstreamer-app/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-app/sys/src/auto/versions.txt b/gstreamer-app/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-app/sys/src/auto/versions.txt +++ b/gstreamer-app/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-audio/src/auto/audio_aggregator.rs b/gstreamer-audio/src/auto/audio_aggregator.rs index 1bed38ca3..d57cb954f 100644 --- a/gstreamer-audio/src/auto/audio_aggregator.rs +++ b/gstreamer-audio/src/auto/audio_aggregator.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioAggregator")] diff --git a/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs b/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs index e3fbbe31c..3ea4a0cea 100644 --- a/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs +++ b/gstreamer-audio/src/auto/audio_aggregator_convert_pad.rs @@ -4,13 +4,12 @@ // DO NOT EDIT use crate::AudioAggregatorPad; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioAggregatorConvertPad")] diff --git a/gstreamer-audio/src/auto/audio_aggregator_pad.rs b/gstreamer-audio/src/auto/audio_aggregator_pad.rs index c3dccc61f..be77e55cb 100644 --- a/gstreamer-audio/src/auto/audio_aggregator_pad.rs +++ b/gstreamer-audio/src/auto/audio_aggregator_pad.rs @@ -3,31 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT +use glib::prelude::*; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::object::Cast; -use glib::object::IsA; +use glib::{ + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::connect_raw; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::SignalHandlerId; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::translate::*; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::StaticType; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::ToValue; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioAggregatorPad")] diff --git a/gstreamer-audio/src/auto/audio_base_sink.rs b/gstreamer-audio/src/auto/audio_base_sink.rs index b7ded01d9..f390ad77d 100644 --- a/gstreamer-audio/src/auto/audio_base_sink.rs +++ b/gstreamer-audio/src/auto/audio_base_sink.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioBaseSink")] diff --git a/gstreamer-audio/src/auto/audio_base_src.rs b/gstreamer-audio/src/auto/audio_base_src.rs index 5b168496f..51b5ba966 100644 --- a/gstreamer-audio/src/auto/audio_base_src.rs +++ b/gstreamer-audio/src/auto/audio_base_src.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioBaseSrc")] diff --git a/gstreamer-audio/src/auto/audio_decoder.rs b/gstreamer-audio/src/auto/audio_decoder.rs index 33c8aa962..1e7da14b2 100644 --- a/gstreamer-audio/src/auto/audio_decoder.rs +++ b/gstreamer-audio/src/auto/audio_decoder.rs @@ -4,14 +4,12 @@ // DO NOT EDIT use crate::AudioInfo; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioDecoder")] diff --git a/gstreamer-audio/src/auto/audio_encoder.rs b/gstreamer-audio/src/auto/audio_encoder.rs index 71df8d6b2..7bc29f610 100644 --- a/gstreamer-audio/src/auto/audio_encoder.rs +++ b/gstreamer-audio/src/auto/audio_encoder.rs @@ -4,14 +4,12 @@ // DO NOT EDIT use crate::AudioInfo; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioEncoder")] @@ -109,7 +107,7 @@ pub trait AudioEncoderExt: 'static { fn set_hard_resync(&self, enabled: bool); #[doc(alias = "gst_audio_encoder_set_headers")] - fn set_headers(&self, headers: &[&gst::Buffer]); + fn set_headers(&self, headers: Vec); #[doc(alias = "gst_audio_encoder_set_latency")] fn set_latency(&self, min: gst::ClockTime, max: impl Into>); @@ -324,11 +322,11 @@ impl> AudioEncoderExt for O { } } - fn set_headers(&self, headers: &[&gst::Buffer]) { + fn set_headers(&self, headers: Vec) { unsafe { ffi::gst_audio_encoder_set_headers( self.as_ref().to_glib_none().0, - headers.to_glib_full(), + headers.into_glib_ptr(), ); } } diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index 2bc3ae2d7..b5dc4f0ca 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; use std::fmt; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] @@ -164,6 +160,7 @@ impl FromGlib for AudioChannelPosition { } impl StaticType for AudioChannelPosition { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_channel_position_get_type()) } } @@ -176,6 +173,7 @@ impl glib::value::ValueType for AudioChannelPosition { unsafe impl<'a> FromValue<'a> for AudioChannelPosition { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -183,6 +181,7 @@ unsafe impl<'a> FromValue<'a> for AudioChannelPosition { } impl ToValue for AudioChannelPosition { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -191,6 +190,7 @@ impl ToValue for AudioChannelPosition { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -224,6 +224,7 @@ pub enum AudioDitherMethod { impl IntoGlib for AudioDitherMethod { type GlibType = ffi::GstAudioDitherMethod; + #[inline] fn into_glib(self) -> ffi::GstAudioDitherMethod { match self { Self::None => ffi::GST_AUDIO_DITHER_NONE, @@ -237,6 +238,7 @@ impl IntoGlib for AudioDitherMethod { #[doc(hidden)] impl FromGlib for AudioDitherMethod { + #[inline] unsafe fn from_glib(value: ffi::GstAudioDitherMethod) -> Self { skip_assert_initialized!(); match value { @@ -250,6 +252,7 @@ impl FromGlib for AudioDitherMethod { } impl StaticType for AudioDitherMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_dither_method_get_type()) } } @@ -262,6 +265,7 @@ impl glib::value::ValueType for AudioDitherMethod { unsafe impl<'a> FromValue<'a> for AudioDitherMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -269,6 +273,7 @@ unsafe impl<'a> FromValue<'a> for AudioDitherMethod { } impl ToValue for AudioDitherMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -277,6 +282,7 @@ impl ToValue for AudioDitherMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -463,6 +469,7 @@ impl FromGlib for AudioFormat { } impl StaticType for AudioFormat { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_format_get_type()) } } @@ -475,6 +482,7 @@ impl glib::value::ValueType for AudioFormat { unsafe impl<'a> FromValue<'a> for AudioFormat { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -482,6 +490,7 @@ unsafe impl<'a> FromValue<'a> for AudioFormat { } impl ToValue for AudioFormat { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -490,6 +499,7 @@ impl ToValue for AudioFormat { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -519,6 +529,7 @@ pub enum AudioLayout { impl IntoGlib for AudioLayout { type GlibType = ffi::GstAudioLayout; + #[inline] fn into_glib(self) -> ffi::GstAudioLayout { match self { Self::Interleaved => ffi::GST_AUDIO_LAYOUT_INTERLEAVED, @@ -530,6 +541,7 @@ impl IntoGlib for AudioLayout { #[doc(hidden)] impl FromGlib for AudioLayout { + #[inline] unsafe fn from_glib(value: ffi::GstAudioLayout) -> Self { skip_assert_initialized!(); match value { @@ -541,6 +553,7 @@ impl FromGlib for AudioLayout { } impl StaticType for AudioLayout { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_layout_get_type()) } } @@ -553,6 +566,7 @@ impl glib::value::ValueType for AudioLayout { unsafe impl<'a> FromValue<'a> for AudioLayout { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -560,6 +574,7 @@ unsafe impl<'a> FromValue<'a> for AudioLayout { } impl ToValue for AudioLayout { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -568,6 +583,7 @@ impl ToValue for AudioLayout { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -603,6 +619,7 @@ pub enum AudioNoiseShapingMethod { impl IntoGlib for AudioNoiseShapingMethod { type GlibType = ffi::GstAudioNoiseShapingMethod; + #[inline] fn into_glib(self) -> ffi::GstAudioNoiseShapingMethod { match self { Self::None => ffi::GST_AUDIO_NOISE_SHAPING_NONE, @@ -617,6 +634,7 @@ impl IntoGlib for AudioNoiseShapingMethod { #[doc(hidden)] impl FromGlib for AudioNoiseShapingMethod { + #[inline] unsafe fn from_glib(value: ffi::GstAudioNoiseShapingMethod) -> Self { skip_assert_initialized!(); match value { @@ -631,6 +649,7 @@ impl FromGlib for AudioNoiseShapingMethod { } impl StaticType for AudioNoiseShapingMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_noise_shaping_method_get_type()) } } @@ -643,6 +662,7 @@ impl glib::value::ValueType for AudioNoiseShapingMethod { unsafe impl<'a> FromValue<'a> for AudioNoiseShapingMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -650,6 +670,7 @@ unsafe impl<'a> FromValue<'a> for AudioNoiseShapingMethod { } impl ToValue for AudioNoiseShapingMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -658,6 +679,7 @@ impl ToValue for AudioNoiseShapingMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -693,6 +715,7 @@ pub enum AudioResamplerMethod { impl IntoGlib for AudioResamplerMethod { type GlibType = ffi::GstAudioResamplerMethod; + #[inline] fn into_glib(self) -> ffi::GstAudioResamplerMethod { match self { Self::Nearest => ffi::GST_AUDIO_RESAMPLER_METHOD_NEAREST, @@ -707,6 +730,7 @@ impl IntoGlib for AudioResamplerMethod { #[doc(hidden)] impl FromGlib for AudioResamplerMethod { + #[inline] unsafe fn from_glib(value: ffi::GstAudioResamplerMethod) -> Self { skip_assert_initialized!(); match value { @@ -721,6 +745,7 @@ impl FromGlib for AudioResamplerMethod { } impl StaticType for AudioResamplerMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_resampler_method_get_type()) } } @@ -733,6 +758,7 @@ impl glib::value::ValueType for AudioResamplerMethod { unsafe impl<'a> FromValue<'a> for AudioResamplerMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -740,6 +766,7 @@ unsafe impl<'a> FromValue<'a> for AudioResamplerMethod { } impl ToValue for AudioResamplerMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -748,6 +775,7 @@ impl ToValue for AudioResamplerMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -851,6 +879,7 @@ impl FromGlib for AudioRingBufferFormatType { } impl StaticType for AudioRingBufferFormatType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_ring_buffer_format_type_get_type()) } } @@ -863,6 +892,7 @@ impl glib::value::ValueType for AudioRingBufferFormatType { unsafe impl<'a> FromValue<'a> for AudioRingBufferFormatType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -870,6 +900,7 @@ unsafe impl<'a> FromValue<'a> for AudioRingBufferFormatType { } impl ToValue for AudioRingBufferFormatType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -878,6 +909,7 @@ impl ToValue for AudioRingBufferFormatType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -909,6 +941,7 @@ pub enum StreamVolumeFormat { impl IntoGlib for StreamVolumeFormat { type GlibType = ffi::GstStreamVolumeFormat; + #[inline] fn into_glib(self) -> ffi::GstStreamVolumeFormat { match self { Self::Linear => ffi::GST_STREAM_VOLUME_FORMAT_LINEAR, @@ -921,6 +954,7 @@ impl IntoGlib for StreamVolumeFormat { #[doc(hidden)] impl FromGlib for StreamVolumeFormat { + #[inline] unsafe fn from_glib(value: ffi::GstStreamVolumeFormat) -> Self { skip_assert_initialized!(); match value { diff --git a/gstreamer-audio/src/auto/flags.rs b/gstreamer-audio/src/auto/flags.rs index c354710e2..988f029b2 100644 --- a/gstreamer-audio/src/auto/flags.rs +++ b/gstreamer-audio/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; bitflags! { #[doc(alias = "GstAudioFlags")] @@ -22,6 +18,7 @@ bitflags! { impl IntoGlib for AudioFlags { type GlibType = ffi::GstAudioFlags; + #[inline] fn into_glib(self) -> ffi::GstAudioFlags { self.bits() } @@ -29,6 +26,7 @@ impl IntoGlib for AudioFlags { #[doc(hidden)] impl FromGlib for AudioFlags { + #[inline] unsafe fn from_glib(value: ffi::GstAudioFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -36,6 +34,7 @@ impl FromGlib for AudioFlags { } impl StaticType for AudioFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_flags_get_type()) } } @@ -48,6 +47,7 @@ impl glib::value::ValueType for AudioFlags { unsafe impl<'a> FromValue<'a> for AudioFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -55,6 +55,7 @@ unsafe impl<'a> FromValue<'a> for AudioFlags { } impl ToValue for AudioFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -63,6 +64,7 @@ impl ToValue for AudioFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -96,6 +98,7 @@ bitflags! { impl IntoGlib for AudioFormatFlags { type GlibType = ffi::GstAudioFormatFlags; + #[inline] fn into_glib(self) -> ffi::GstAudioFormatFlags { self.bits() } @@ -103,6 +106,7 @@ impl IntoGlib for AudioFormatFlags { #[doc(hidden)] impl FromGlib for AudioFormatFlags { + #[inline] unsafe fn from_glib(value: ffi::GstAudioFormatFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -110,6 +114,7 @@ impl FromGlib for AudioFormatFlags { } impl StaticType for AudioFormatFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_format_flags_get_type()) } } @@ -122,6 +127,7 @@ impl glib::value::ValueType for AudioFormatFlags { unsafe impl<'a> FromValue<'a> for AudioFormatFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -129,6 +135,7 @@ unsafe impl<'a> FromValue<'a> for AudioFormatFlags { } impl ToValue for AudioFormatFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -137,6 +144,7 @@ impl ToValue for AudioFormatFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -162,6 +170,7 @@ bitflags! { impl IntoGlib for AudioPackFlags { type GlibType = ffi::GstAudioPackFlags; + #[inline] fn into_glib(self) -> ffi::GstAudioPackFlags { self.bits() } @@ -169,6 +178,7 @@ impl IntoGlib for AudioPackFlags { #[doc(hidden)] impl FromGlib for AudioPackFlags { + #[inline] unsafe fn from_glib(value: ffi::GstAudioPackFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -176,6 +186,7 @@ impl FromGlib for AudioPackFlags { } impl StaticType for AudioPackFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_pack_flags_get_type()) } } @@ -188,6 +199,7 @@ impl glib::value::ValueType for AudioPackFlags { unsafe impl<'a> FromValue<'a> for AudioPackFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -195,6 +207,7 @@ unsafe impl<'a> FromValue<'a> for AudioPackFlags { } impl ToValue for AudioPackFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -203,6 +216,7 @@ impl ToValue for AudioPackFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index 40fd97a3e..9f5903617 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -4,13 +4,12 @@ // DO NOT EDIT use crate::StreamVolumeFormat; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstStreamVolume")] diff --git a/gstreamer-audio/src/auto/versions.txt b/gstreamer-audio/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-audio/src/auto/versions.txt +++ b/gstreamer-audio/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-audio/sys/src/auto/versions.txt b/gstreamer-audio/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-audio/sys/src/auto/versions.txt +++ b/gstreamer-audio/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index da76c1860..55ee3e577 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -5,19 +5,13 @@ #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::AggregatorPad; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::AggregatorStartTimeSelection; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{AggregatorPad, AggregatorStartTimeSelection}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAggregator")] diff --git a/gstreamer-base/src/auto/aggregator_pad.rs b/gstreamer-base/src/auto/aggregator_pad.rs index 588d5996c..467dfccc9 100644 --- a/gstreamer-base/src/auto/aggregator_pad.rs +++ b/gstreamer-base/src/auto/aggregator_pad.rs @@ -3,19 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::StaticType; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAggregatorPad")] diff --git a/gstreamer-base/src/auto/base_parse.rs b/gstreamer-base/src/auto/base_parse.rs index 3a4c8703d..87a4e68b7 100644 --- a/gstreamer-base/src/auto/base_parse.rs +++ b/gstreamer-base/src/auto/base_parse.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstBaseParse")] diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index a9ebc9d0c..44c58982f 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -3,16 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstBaseSink")] diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index b2d36584c..7a6b5cf8b 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -4,15 +4,12 @@ // DO NOT EDIT #![allow(deprecated)] -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstBaseSrc")] diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index 3df80456f..1b7681e80 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstBaseTransform")] diff --git a/gstreamer-base/src/auto/enums.rs b/gstreamer-base/src/auto/enums.rs index a4dd56239..9a3ad53c0 100644 --- a/gstreamer-base/src/auto/enums.rs +++ b/gstreamer-base/src/auto/enums.rs @@ -5,19 +5,7 @@ #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::translate::*; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::value::FromValue; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::value::ToValue; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::StaticType; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -41,6 +29,7 @@ pub enum AggregatorStartTimeSelection { impl IntoGlib for AggregatorStartTimeSelection { type GlibType = ffi::GstAggregatorStartTimeSelection; + #[inline] fn into_glib(self) -> ffi::GstAggregatorStartTimeSelection { match self { Self::Zero => ffi::GST_AGGREGATOR_START_TIME_SELECTION_ZERO, @@ -55,6 +44,7 @@ impl IntoGlib for AggregatorStartTimeSelection { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(hidden)] impl FromGlib for AggregatorStartTimeSelection { + #[inline] unsafe fn from_glib(value: ffi::GstAggregatorStartTimeSelection) -> Self { skip_assert_initialized!(); match value { @@ -69,6 +59,7 @@ impl FromGlib for AggregatorStartTimeSelec #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl StaticType for AggregatorStartTimeSelection { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_aggregator_start_time_selection_get_type()) } } @@ -85,6 +76,7 @@ impl glib::value::ValueType for AggregatorStartTimeSelection { unsafe impl<'a> FromValue<'a> for AggregatorStartTimeSelection { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -94,6 +86,7 @@ unsafe impl<'a> FromValue<'a> for AggregatorStartTimeSelection { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl ToValue for AggregatorStartTimeSelection { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -102,6 +95,7 @@ impl ToValue for AggregatorStartTimeSelection { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-base/src/auto/flags.rs b/gstreamer-base/src/auto/flags.rs index 596134069..b9b9cf963 100644 --- a/gstreamer-base/src/auto/flags.rs +++ b/gstreamer-base/src/auto/flags.rs @@ -26,6 +26,7 @@ bitflags! { impl IntoGlib for BaseParseFrameFlags { type GlibType = ffi::GstBaseParseFrameFlags; + #[inline] fn into_glib(self) -> ffi::GstBaseParseFrameFlags { self.bits() } @@ -33,6 +34,7 @@ impl IntoGlib for BaseParseFrameFlags { #[doc(hidden)] impl FromGlib for BaseParseFrameFlags { + #[inline] unsafe fn from_glib(value: ffi::GstBaseParseFrameFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) diff --git a/gstreamer-base/src/auto/functions.rs b/gstreamer-base/src/auto/functions.rs index 2330fc77d..10dc30664 100644 --- a/gstreamer-base/src/auto/functions.rs +++ b/gstreamer-base/src/auto/functions.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; #[doc(alias = "gst_type_find_helper")] pub fn type_find_helper(src: &impl IsA, size: u64) -> Result { diff --git a/gstreamer-base/src/auto/versions.txt b/gstreamer-base/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-base/src/auto/versions.txt +++ b/gstreamer-base/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-base/sys/src/auto/versions.txt b/gstreamer-base/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-base/sys/src/auto/versions.txt +++ b/gstreamer-base/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-check/src/auto/test_clock.rs b/gstreamer-check/src/auto/test_clock.rs index d861596a3..c90980e9e 100644 --- a/gstreamer-check/src/auto/test_clock.rs +++ b/gstreamer-check/src/auto/test_clock.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstTestClock")] diff --git a/gstreamer-check/src/auto/versions.txt b/gstreamer-check/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-check/src/auto/versions.txt +++ b/gstreamer-check/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-check/sys/src/auto/versions.txt b/gstreamer-check/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-check/sys/src/auto/versions.txt +++ b/gstreamer-check/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-controller/src/auto/argb_control_binding.rs b/gstreamer-controller/src/auto/argb_control_binding.rs index dda28d932..016d93356 100644 --- a/gstreamer-controller/src/auto/argb_control_binding.rs +++ b/gstreamer-controller/src/auto/argb_control_binding.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstARGBControlBinding")] diff --git a/gstreamer-controller/src/auto/direct_control_binding.rs b/gstreamer-controller/src/auto/direct_control_binding.rs index 9d43cbc64..7287bb09d 100644 --- a/gstreamer-controller/src/auto/direct_control_binding.rs +++ b/gstreamer-controller/src/auto/direct_control_binding.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstDirectControlBinding")] diff --git a/gstreamer-controller/src/auto/enums.rs b/gstreamer-controller/src/auto/enums.rs index 2e3f56e19..4076d829e 100644 --- a/gstreamer-controller/src/auto/enums.rs +++ b/gstreamer-controller/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -29,6 +25,7 @@ pub enum InterpolationMode { impl IntoGlib for InterpolationMode { type GlibType = ffi::GstInterpolationMode; + #[inline] fn into_glib(self) -> ffi::GstInterpolationMode { match self { Self::None => ffi::GST_INTERPOLATION_MODE_NONE, @@ -42,6 +39,7 @@ impl IntoGlib for InterpolationMode { #[doc(hidden)] impl FromGlib for InterpolationMode { + #[inline] unsafe fn from_glib(value: ffi::GstInterpolationMode) -> Self { skip_assert_initialized!(); match value { @@ -55,6 +53,7 @@ impl FromGlib for InterpolationMode { } impl StaticType for InterpolationMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_interpolation_mode_get_type()) } } @@ -67,6 +66,7 @@ impl glib::value::ValueType for InterpolationMode { unsafe impl<'a> FromValue<'a> for InterpolationMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -74,6 +74,7 @@ unsafe impl<'a> FromValue<'a> for InterpolationMode { } impl ToValue for InterpolationMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -82,6 +83,7 @@ impl ToValue for InterpolationMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -117,6 +119,7 @@ pub enum LFOWaveform { impl IntoGlib for LFOWaveform { type GlibType = ffi::GstLFOWaveform; + #[inline] fn into_glib(self) -> ffi::GstLFOWaveform { match self { Self::Sine => ffi::GST_LFO_WAVEFORM_SINE, @@ -131,6 +134,7 @@ impl IntoGlib for LFOWaveform { #[doc(hidden)] impl FromGlib for LFOWaveform { + #[inline] unsafe fn from_glib(value: ffi::GstLFOWaveform) -> Self { skip_assert_initialized!(); match value { @@ -145,6 +149,7 @@ impl FromGlib for LFOWaveform { } impl StaticType for LFOWaveform { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_lfo_waveform_get_type()) } } @@ -157,6 +162,7 @@ impl glib::value::ValueType for LFOWaveform { unsafe impl<'a> FromValue<'a> for LFOWaveform { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -164,6 +170,7 @@ unsafe impl<'a> FromValue<'a> for LFOWaveform { } impl ToValue for LFOWaveform { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -172,6 +179,7 @@ impl ToValue for LFOWaveform { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-controller/src/auto/interpolation_control_source.rs b/gstreamer-controller/src/auto/interpolation_control_source.rs index c87688623..bbb667c94 100644 --- a/gstreamer-controller/src/auto/interpolation_control_source.rs +++ b/gstreamer-controller/src/auto/interpolation_control_source.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::InterpolationMode; -use crate::TimedValueControlSource; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{InterpolationMode, TimedValueControlSource}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstInterpolationControlSource")] diff --git a/gstreamer-controller/src/auto/lfo_control_source.rs b/gstreamer-controller/src/auto/lfo_control_source.rs index 324084f79..503c5cf7d 100644 --- a/gstreamer-controller/src/auto/lfo_control_source.rs +++ b/gstreamer-controller/src/auto/lfo_control_source.rs @@ -4,15 +4,12 @@ // DO NOT EDIT use crate::LFOWaveform; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstLFOControlSource")] diff --git a/gstreamer-controller/src/auto/proxy_control_binding.rs b/gstreamer-controller/src/auto/proxy_control_binding.rs index b31bfd1b0..5847d56f8 100644 --- a/gstreamer-controller/src/auto/proxy_control_binding.rs +++ b/gstreamer-controller/src/auto/proxy_control_binding.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstProxyControlBinding")] diff --git a/gstreamer-controller/src/auto/timed_value_control_source.rs b/gstreamer-controller/src/auto/timed_value_control_source.rs index c2e512011..e9cd261ac 100644 --- a/gstreamer-controller/src/auto/timed_value_control_source.rs +++ b/gstreamer-controller/src/auto/timed_value_control_source.rs @@ -4,13 +4,12 @@ // DO NOT EDIT use crate::ControlPoint; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstTimedValueControlSource")] diff --git a/gstreamer-controller/src/auto/trigger_control_source.rs b/gstreamer-controller/src/auto/trigger_control_source.rs index 7e9a2b194..353fd1ccb 100644 --- a/gstreamer-controller/src/auto/trigger_control_source.rs +++ b/gstreamer-controller/src/auto/trigger_control_source.rs @@ -4,15 +4,12 @@ // DO NOT EDIT use crate::TimedValueControlSource; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstTriggerControlSource")] diff --git a/gstreamer-controller/src/auto/versions.txt b/gstreamer-controller/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-controller/src/auto/versions.txt +++ b/gstreamer-controller/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-controller/sys/src/auto/versions.txt b/gstreamer-controller/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-controller/sys/src/auto/versions.txt +++ b/gstreamer-controller/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-editing-services/src/auto/asset.rs b/gstreamer-editing-services/src/auto/asset.rs index 64060c4a5..3375cf00e 100644 --- a/gstreamer-editing-services/src/auto/asset.rs +++ b/gstreamer-editing-services/src/auto/asset.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::pin::Pin; -use std::ptr; +use crate::{Extractable, MetaContainer}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, pin::Pin, ptr}; glib::wrapper! { #[doc(alias = "GESAsset")] diff --git a/gstreamer-editing-services/src/auto/audio_source.rs b/gstreamer-editing-services/src/auto/audio_source.rs index 3a8b2aee8..081543383 100644 --- a/gstreamer-editing-services/src/auto/audio_source.rs +++ b/gstreamer-editing-services/src/auto/audio_source.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; +use crate::{Extractable, MetaContainer, Source, TimelineElement, TrackElement}; glib::wrapper! { #[doc(alias = "GESAudioSource")] diff --git a/gstreamer-editing-services/src/auto/audio_test_source.rs b/gstreamer-editing-services/src/auto/audio_test_source.rs index 30b60b999..e6844ebd8 100644 --- a/gstreamer-editing-services/src/auto/audio_test_source.rs +++ b/gstreamer-editing-services/src/auto/audio_test_source.rs @@ -3,14 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::AudioSource; -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use glib::object::IsA; -use glib::translate::*; +use crate::{AudioSource, Extractable, MetaContainer, Source, TimelineElement, TrackElement}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESAudioTestSource")] diff --git a/gstreamer-editing-services/src/auto/audio_track.rs b/gstreamer-editing-services/src/auto/audio_track.rs index a2fe20d49..2b703a58b 100644 --- a/gstreamer-editing-services/src/auto/audio_track.rs +++ b/gstreamer-editing-services/src/auto/audio_track.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::MetaContainer; -use crate::Track; +use crate::{MetaContainer, Track}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-editing-services/src/auto/audio_transition.rs b/gstreamer-editing-services/src/auto/audio_transition.rs index e24f3e405..6868ba18c 100644 --- a/gstreamer-editing-services/src/auto/audio_transition.rs +++ b/gstreamer-editing-services/src/auto/audio_transition.rs @@ -4,12 +4,7 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Extractable; -use crate::MetaContainer; -use crate::Operation; -use crate::TimelineElement; -use crate::TrackElement; -use crate::Transition; +use crate::{Extractable, MetaContainer, Operation, TimelineElement, TrackElement, Transition}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-editing-services/src/auto/audio_uri_source.rs b/gstreamer-editing-services/src/auto/audio_uri_source.rs index 104d46c22..7653ab0fc 100644 --- a/gstreamer-editing-services/src/auto/audio_uri_source.rs +++ b/gstreamer-editing-services/src/auto/audio_uri_source.rs @@ -3,15 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::AudioSource; -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{AudioSource, Extractable, MetaContainer, Source, TimelineElement, TrackElement}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESAudioUriSource")] diff --git a/gstreamer-editing-services/src/auto/base_effect.rs b/gstreamer-editing-services/src/auto/base_effect.rs index 5f2647383..7f7000f31 100644 --- a/gstreamer-editing-services/src/auto/base_effect.rs +++ b/gstreamer-editing-services/src/auto/base_effect.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Operation; -use crate::TimelineElement; -use crate::TrackElement; -use glib::object::IsA; +use crate::{Extractable, MetaContainer, Operation, TimelineElement, TrackElement}; +use glib::prelude::*; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use glib::translate::*; diff --git a/gstreamer-editing-services/src/auto/base_effect_clip.rs b/gstreamer-editing-services/src/auto/base_effect_clip.rs index 1c3eadc04..aaff3829a 100644 --- a/gstreamer-editing-services/src/auto/base_effect_clip.rs +++ b/gstreamer-editing-services/src/auto/base_effect_clip.rs @@ -3,12 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::OperationClip; -use crate::TimelineElement; +use crate::{Clip, Container, Extractable, MetaContainer, OperationClip, TimelineElement}; glib::wrapper! { #[doc(alias = "GESBaseEffectClip")] diff --git a/gstreamer-editing-services/src/auto/base_transition_clip.rs b/gstreamer-editing-services/src/auto/base_transition_clip.rs index bbf8de0f3..fabd573e4 100644 --- a/gstreamer-editing-services/src/auto/base_transition_clip.rs +++ b/gstreamer-editing-services/src/auto/base_transition_clip.rs @@ -3,12 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::OperationClip; -use crate::TimelineElement; +use crate::{Clip, Container, Extractable, MetaContainer, OperationClip, TimelineElement}; glib::wrapper! { #[doc(alias = "GESBaseTransitionClip")] diff --git a/gstreamer-editing-services/src/auto/base_xml_formatter.rs b/gstreamer-editing-services/src/auto/base_xml_formatter.rs index 1e76e7b91..4b93395d5 100644 --- a/gstreamer-editing-services/src/auto/base_xml_formatter.rs +++ b/gstreamer-editing-services/src/auto/base_xml_formatter.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::Formatter; +use crate::{Extractable, Formatter}; glib::wrapper! { #[doc(alias = "GESBaseXmlFormatter")] diff --git a/gstreamer-editing-services/src/auto/clip.rs b/gstreamer-editing-services/src/auto/clip.rs index 817b831ea..5bc519871 100644 --- a/gstreamer-editing-services/src/auto/clip.rs +++ b/gstreamer-editing-services/src/auto/clip.rs @@ -3,29 +3,22 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; -use crate::BaseEffect; -use crate::Container; -use crate::Extractable; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::FrameNumber; -use crate::Layer; -use crate::MetaContainer; -use crate::TimelineElement; -use crate::Track; -use crate::TrackElement; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + Asset, BaseEffect, Container, Extractable, Layer, MetaContainer, TimelineElement, Track, + TrackElement, TrackType, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::ptr; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESClip")] @@ -232,7 +225,7 @@ impl> ClipExt for O { index, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -409,7 +402,7 @@ impl> ClipExt for O { layer.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -428,7 +421,7 @@ impl> ClipExt for O { effect.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -478,7 +471,7 @@ impl> ClipExt for O { newindex, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/clip_asset.rs b/gstreamer-editing-services/src/auto/clip_asset.rs index d15ce2d03..2f741ce6a 100644 --- a/gstreamer-editing-services/src/auto/clip_asset.rs +++ b/gstreamer-editing-services/src/auto/clip_asset.rs @@ -3,22 +3,19 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::FrameNumber; -use crate::MetaContainer; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; +use crate::{Asset, MetaContainer, TrackType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::mem; -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESClipAsset")] diff --git a/gstreamer-editing-services/src/auto/command_line_formatter.rs b/gstreamer-editing-services/src/auto/command_line_formatter.rs index ee08672f2..999800937 100644 --- a/gstreamer-editing-services/src/auto/command_line_formatter.rs +++ b/gstreamer-editing-services/src/auto/command_line_formatter.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::Formatter; -use crate::Timeline; -use glib::object::IsA; -use glib::translate::*; +use crate::{Extractable, Formatter, Timeline}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESCommandLineFormatter")] diff --git a/gstreamer-editing-services/src/auto/container.rs b/gstreamer-editing-services/src/auto/container.rs index b962f0a89..ce46a44f3 100644 --- a/gstreamer-editing-services/src/auto/container.rs +++ b/gstreamer-editing-services/src/auto/container.rs @@ -4,20 +4,13 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Edge; -use crate::EditMode; -use crate::Extractable; -use crate::Layer; -use crate::MetaContainer; -use crate::TimelineElement; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Edge, EditMode, Extractable, Layer, MetaContainer, TimelineElement}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESContainer")] @@ -62,7 +55,7 @@ pub trait GESContainerExt: 'static { fn remove(&self, child: &impl IsA) -> Result<(), glib::error::BoolError>; #[doc(alias = "ges_container_ungroup")] - fn ungroup(&self, recursive: bool) -> Vec; + fn ungroup(self, recursive: bool) -> Vec; fn height(&self) -> u32; @@ -140,10 +133,10 @@ impl> GESContainerExt for O { } } - fn ungroup(&self, recursive: bool) -> Vec { + fn ungroup(self, recursive: bool) -> Vec { unsafe { FromGlibPtrContainer::from_glib_full(ffi::ges_container_ungroup( - self.as_ref().to_glib_full(), + self.upcast().into_glib_ptr(), recursive.into_glib(), )) } diff --git a/gstreamer-editing-services/src/auto/effect.rs b/gstreamer-editing-services/src/auto/effect.rs index 3a8b740a4..92134c73d 100644 --- a/gstreamer-editing-services/src/auto/effect.rs +++ b/gstreamer-editing-services/src/auto/effect.rs @@ -3,15 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::BaseEffect; -use crate::Extractable; -use crate::MetaContainer; -use crate::Operation; -use crate::TimelineElement; -use crate::TrackElement; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{BaseEffect, Extractable, MetaContainer, Operation, TimelineElement, TrackElement}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESEffect")] diff --git a/gstreamer-editing-services/src/auto/effect_asset.rs b/gstreamer-editing-services/src/auto/effect_asset.rs index 90f32f3ef..0e0a82a3d 100644 --- a/gstreamer-editing-services/src/auto/effect_asset.rs +++ b/gstreamer-editing-services/src/auto/effect_asset.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; -use crate::MetaContainer; -use crate::TrackElementAsset; +use crate::{Asset, MetaContainer, TrackElementAsset}; glib::wrapper! { #[doc(alias = "GESEffectAsset")] diff --git a/gstreamer-editing-services/src/auto/effect_clip.rs b/gstreamer-editing-services/src/auto/effect_clip.rs index 4cb032c32..88729010c 100644 --- a/gstreamer-editing-services/src/auto/effect_clip.rs +++ b/gstreamer-editing-services/src/auto/effect_clip.rs @@ -3,16 +3,10 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::BaseEffectClip; -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::OperationClip; -use crate::TimelineElement; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{ + BaseEffectClip, Clip, Container, Extractable, MetaContainer, OperationClip, TimelineElement, +}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESEffectClip")] diff --git a/gstreamer-editing-services/src/auto/enums.rs b/gstreamer-editing-services/src/auto/enums.rs index 800d5069b..b83e6c3e7 100644 --- a/gstreamer-editing-services/src/auto/enums.rs +++ b/gstreamer-editing-services/src/auto/enums.rs @@ -3,17 +3,10 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use std::ffi::CStr; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use std::fmt; +use std::{ffi::CStr, fmt}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -33,6 +26,7 @@ pub enum AssetLoadingReturn { impl IntoGlib for AssetLoadingReturn { type GlibType = ffi::GESAssetLoadingReturn; + #[inline] fn into_glib(self) -> ffi::GESAssetLoadingReturn { match self { Self::Error => ffi::GES_ASSET_LOADING_ERROR, @@ -45,6 +39,7 @@ impl IntoGlib for AssetLoadingReturn { #[doc(hidden)] impl FromGlib for AssetLoadingReturn { + #[inline] unsafe fn from_glib(value: ffi::GESAssetLoadingReturn) -> Self { skip_assert_initialized!(); match value { @@ -78,6 +73,7 @@ pub enum ChildrenControlMode { impl IntoGlib for ChildrenControlMode { type GlibType = ffi::GESChildrenControlMode; + #[inline] fn into_glib(self) -> ffi::GESChildrenControlMode { match self { Self::Update => ffi::GES_CHILDREN_UPDATE, @@ -92,6 +88,7 @@ impl IntoGlib for ChildrenControlMode { #[doc(hidden)] impl FromGlib for ChildrenControlMode { + #[inline] unsafe fn from_glib(value: ffi::GESChildrenControlMode) -> Self { skip_assert_initialized!(); match value { @@ -148,6 +145,7 @@ impl fmt::Display for Edge { impl IntoGlib for Edge { type GlibType = ffi::GESEdge; + #[inline] fn into_glib(self) -> ffi::GESEdge { match self { Self::Start => ffi::GES_EDGE_START, @@ -160,6 +158,7 @@ impl IntoGlib for Edge { #[doc(hidden)] impl FromGlib for Edge { + #[inline] unsafe fn from_glib(value: ffi::GESEdge) -> Self { skip_assert_initialized!(); match value { @@ -172,6 +171,7 @@ impl FromGlib for Edge { } impl StaticType for Edge { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_edge_get_type()) } } @@ -184,6 +184,7 @@ impl glib::value::ValueType for Edge { unsafe impl<'a> FromValue<'a> for Edge { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -191,6 +192,7 @@ unsafe impl<'a> FromValue<'a> for Edge { } impl ToValue for Edge { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -199,6 +201,7 @@ impl ToValue for Edge { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -259,6 +262,7 @@ impl fmt::Display for EditMode { impl IntoGlib for EditMode { type GlibType = ffi::GESEditMode; + #[inline] fn into_glib(self) -> ffi::GESEditMode { match self { Self::Normal => ffi::GES_EDIT_MODE_NORMAL, @@ -273,6 +277,7 @@ impl IntoGlib for EditMode { #[doc(hidden)] impl FromGlib for EditMode { + #[inline] unsafe fn from_glib(value: ffi::GESEditMode) -> Self { skip_assert_initialized!(); match value { @@ -287,6 +292,7 @@ impl FromGlib for EditMode { } impl StaticType for EditMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_edit_mode_get_type()) } } @@ -299,6 +305,7 @@ impl glib::value::ValueType for EditMode { unsafe impl<'a> FromValue<'a> for EditMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -306,6 +313,7 @@ unsafe impl<'a> FromValue<'a> for EditMode { } impl ToValue for EditMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -314,6 +322,7 @@ impl ToValue for EditMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -357,6 +366,7 @@ pub enum Error { impl IntoGlib for Error { type GlibType = ffi::GESError; + #[inline] fn into_glib(self) -> ffi::GESError { match self { Self::AssetWrongId => ffi::GES_ERROR_ASSET_WRONG_ID, @@ -375,6 +385,7 @@ impl IntoGlib for Error { #[doc(hidden)] impl FromGlib for Error { + #[inline] unsafe fn from_glib(value: ffi::GESError) -> Self { skip_assert_initialized!(); match value { @@ -414,6 +425,7 @@ pub enum TextHAlign { impl IntoGlib for TextHAlign { type GlibType = ffi::GESTextHAlign; + #[inline] fn into_glib(self) -> ffi::GESTextHAlign { match self { Self::Left => ffi::GES_TEXT_HALIGN_LEFT, @@ -428,6 +440,7 @@ impl IntoGlib for TextHAlign { #[doc(hidden)] impl FromGlib for TextHAlign { + #[inline] unsafe fn from_glib(value: ffi::GESTextHAlign) -> Self { skip_assert_initialized!(); match value { @@ -442,6 +455,7 @@ impl FromGlib for TextHAlign { } impl StaticType for TextHAlign { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_text_halign_get_type()) } } @@ -454,6 +468,7 @@ impl glib::value::ValueType for TextHAlign { unsafe impl<'a> FromValue<'a> for TextHAlign { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -461,6 +476,7 @@ unsafe impl<'a> FromValue<'a> for TextHAlign { } impl ToValue for TextHAlign { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -469,6 +485,7 @@ impl ToValue for TextHAlign { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -506,6 +523,7 @@ pub enum TextVAlign { impl IntoGlib for TextVAlign { type GlibType = ffi::GESTextVAlign; + #[inline] fn into_glib(self) -> ffi::GESTextVAlign { match self { Self::Baseline => ffi::GES_TEXT_VALIGN_BASELINE, @@ -521,6 +539,7 @@ impl IntoGlib for TextVAlign { #[doc(hidden)] impl FromGlib for TextVAlign { + #[inline] unsafe fn from_glib(value: ffi::GESTextVAlign) -> Self { skip_assert_initialized!(); match value { @@ -536,6 +555,7 @@ impl FromGlib for TextVAlign { } impl StaticType for TextVAlign { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_text_valign_get_type()) } } @@ -548,6 +568,7 @@ impl glib::value::ValueType for TextVAlign { unsafe impl<'a> FromValue<'a> for TextVAlign { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -555,6 +576,7 @@ unsafe impl<'a> FromValue<'a> for TextVAlign { } impl ToValue for TextVAlign { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -563,6 +585,7 @@ impl ToValue for TextVAlign { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -902,6 +925,7 @@ impl FromGlib for VideoStandardTransitionTy } impl StaticType for VideoStandardTransitionType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_video_standard_transition_type_get_type()) } } @@ -914,6 +938,7 @@ impl glib::value::ValueType for VideoStandardTransitionType { unsafe impl<'a> FromValue<'a> for VideoStandardTransitionType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -921,6 +946,7 @@ unsafe impl<'a> FromValue<'a> for VideoStandardTransitionType { } impl ToValue for VideoStandardTransitionType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -929,6 +955,7 @@ impl ToValue for VideoStandardTransitionType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1044,6 +1071,7 @@ impl FromGlib for VideoTestPattern { } impl StaticType for VideoTestPattern { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_video_test_pattern_get_type()) } } @@ -1056,6 +1084,7 @@ impl glib::value::ValueType for VideoTestPattern { unsafe impl<'a> FromValue<'a> for VideoTestPattern { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1063,6 +1092,7 @@ unsafe impl<'a> FromValue<'a> for VideoTestPattern { } impl ToValue for VideoTestPattern { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1071,6 +1101,7 @@ impl ToValue for VideoTestPattern { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-editing-services/src/auto/extractable.rs b/gstreamer-editing-services/src/auto/extractable.rs index 5f0c71ccc..9174b0c46 100644 --- a/gstreamer-editing-services/src/auto/extractable.rs +++ b/gstreamer-editing-services/src/auto/extractable.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::Asset; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESExtractable")] diff --git a/gstreamer-editing-services/src/auto/flags.rs b/gstreamer-editing-services/src/auto/flags.rs index 8693586f5..2980f5348 100644 --- a/gstreamer-editing-services/src/auto/flags.rs +++ b/gstreamer-editing-services/src/auto/flags.rs @@ -4,13 +4,8 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; +use std::{ffi::CStr, fmt}; #[cfg(any(feature = "v1_20", feature = "dox"))] bitflags! { @@ -30,6 +25,7 @@ bitflags! { impl IntoGlib for MarkerFlags { type GlibType = ffi::GESMarkerFlags; + #[inline] fn into_glib(self) -> ffi::GESMarkerFlags { self.bits() } @@ -39,6 +35,7 @@ impl IntoGlib for MarkerFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for MarkerFlags { + #[inline] unsafe fn from_glib(value: ffi::GESMarkerFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -48,6 +45,7 @@ impl FromGlib for MarkerFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for MarkerFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_marker_flags_get_type()) } } @@ -64,6 +62,7 @@ impl glib::value::ValueType for MarkerFlags { unsafe impl<'a> FromValue<'a> for MarkerFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -73,6 +72,7 @@ unsafe impl<'a> FromValue<'a> for MarkerFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for MarkerFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -81,6 +81,7 @@ impl ToValue for MarkerFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -112,6 +113,7 @@ bitflags! { impl IntoGlib for MetaFlag { type GlibType = ffi::GESMetaFlag; + #[inline] fn into_glib(self) -> ffi::GESMetaFlag { self.bits() } @@ -119,6 +121,7 @@ impl IntoGlib for MetaFlag { #[doc(hidden)] impl FromGlib for MetaFlag { + #[inline] unsafe fn from_glib(value: ffi::GESMetaFlag) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -126,6 +129,7 @@ impl FromGlib for MetaFlag { } impl StaticType for MetaFlag { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_meta_flag_get_type()) } } @@ -138,6 +142,7 @@ impl glib::value::ValueType for MetaFlag { unsafe impl<'a> FromValue<'a> for MetaFlag { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -145,6 +150,7 @@ unsafe impl<'a> FromValue<'a> for MetaFlag { } impl ToValue for MetaFlag { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -153,6 +159,7 @@ impl ToValue for MetaFlag { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -186,6 +193,7 @@ bitflags! { impl IntoGlib for PipelineFlags { type GlibType = ffi::GESPipelineFlags; + #[inline] fn into_glib(self) -> ffi::GESPipelineFlags { self.bits() } @@ -193,6 +201,7 @@ impl IntoGlib for PipelineFlags { #[doc(hidden)] impl FromGlib for PipelineFlags { + #[inline] unsafe fn from_glib(value: ffi::GESPipelineFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -200,6 +209,7 @@ impl FromGlib for PipelineFlags { } impl StaticType for PipelineFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_pipeline_flags_get_type()) } } @@ -212,6 +222,7 @@ impl glib::value::ValueType for PipelineFlags { unsafe impl<'a> FromValue<'a> for PipelineFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -219,6 +230,7 @@ unsafe impl<'a> FromValue<'a> for PipelineFlags { } impl ToValue for PipelineFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -227,6 +239,7 @@ impl ToValue for PipelineFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -281,6 +294,7 @@ impl fmt::Display for TrackType { impl IntoGlib for TrackType { type GlibType = ffi::GESTrackType; + #[inline] fn into_glib(self) -> ffi::GESTrackType { self.bits() } @@ -288,6 +302,7 @@ impl IntoGlib for TrackType { #[doc(hidden)] impl FromGlib for TrackType { + #[inline] unsafe fn from_glib(value: ffi::GESTrackType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -295,6 +310,7 @@ impl FromGlib for TrackType { } impl StaticType for TrackType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::ges_track_type_get_type()) } } @@ -307,6 +323,7 @@ impl glib::value::ValueType for TrackType { unsafe impl<'a> FromValue<'a> for TrackType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -314,6 +331,7 @@ unsafe impl<'a> FromValue<'a> for TrackType { } impl ToValue for TrackType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -322,6 +340,7 @@ impl ToValue for TrackType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-editing-services/src/auto/formatter.rs b/gstreamer-editing-services/src/auto/formatter.rs index bea495018..954419b8e 100644 --- a/gstreamer-editing-services/src/auto/formatter.rs +++ b/gstreamer-editing-services/src/auto/formatter.rs @@ -4,11 +4,8 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Asset; -use crate::Extractable; -use crate::Timeline; -use glib::object::IsA; -use glib::translate::*; +use crate::{Asset, Extractable, Timeline}; +use glib::{prelude::*, translate::*}; use std::ptr; glib::wrapper! { @@ -29,7 +26,7 @@ impl Formatter { unsafe { let mut error = ptr::null_mut(); let is_ok = ffi::ges_formatter_can_load_uri(uri.to_glib_none().0, &mut error); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -44,7 +41,7 @@ impl Formatter { unsafe { let mut error = ptr::null_mut(); let is_ok = ffi::ges_formatter_can_save_uri(uri.to_glib_none().0, &mut error); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -90,7 +87,7 @@ impl> FormatterExt for O { uri.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -115,7 +112,7 @@ impl> FormatterExt for O { overwrite.into_glib(), &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/group.rs b/gstreamer-editing-services/src/auto/group.rs index 63f70c767..f6704f8a0 100644 --- a/gstreamer-editing-services/src/auto/group.rs +++ b/gstreamer-editing-services/src/auto/group.rs @@ -3,10 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::TimelineElement; +use crate::{Container, Extractable, MetaContainer, TimelineElement}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-editing-services/src/auto/image_source.rs b/gstreamer-editing-services/src/auto/image_source.rs index f322107ca..69d1529fa 100644 --- a/gstreamer-editing-services/src/auto/image_source.rs +++ b/gstreamer-editing-services/src/auto/image_source.rs @@ -3,15 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use crate::VideoSource; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESImageSource")] diff --git a/gstreamer-editing-services/src/auto/layer.rs b/gstreamer-editing-services/src/auto/layer.rs index b6fd092b5..cbb7c053c 100644 --- a/gstreamer-editing-services/src/auto/layer.rs +++ b/gstreamer-editing-services/src/auto/layer.rs @@ -4,25 +4,19 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Asset; -use crate::Clip; -use crate::Extractable; -use crate::MetaContainer; -use crate::Timeline; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::Track; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Asset, Clip, Extractable, MetaContainer, Timeline, TrackType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::ptr; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESLayer")] @@ -228,7 +222,7 @@ impl> LayerExt for O { clip.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/marker.rs b/gstreamer-editing-services/src/auto/marker.rs index 947eda815..817cd44f8 100644 --- a/gstreamer-editing-services/src/auto/marker.rs +++ b/gstreamer-editing-services/src/auto/marker.rs @@ -4,13 +4,12 @@ // DO NOT EDIT use crate::MetaContainer; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESMarker")] diff --git a/gstreamer-editing-services/src/auto/marker_list.rs b/gstreamer-editing-services/src/auto/marker_list.rs index d7155a910..b9c71c195 100644 --- a/gstreamer-editing-services/src/auto/marker_list.rs +++ b/gstreamer-editing-services/src/auto/marker_list.rs @@ -7,18 +7,12 @@ use crate::Marker; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] use crate::MarkerFlags; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::StaticType; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESMarkerList")] diff --git a/gstreamer-editing-services/src/auto/meta_container.rs b/gstreamer-editing-services/src/auto/meta_container.rs index 54670fc7a..43746506b 100644 --- a/gstreamer-editing-services/src/auto/meta_container.rs +++ b/gstreamer-editing-services/src/auto/meta_container.rs @@ -7,15 +7,12 @@ #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::MarkerList; use crate::MetaFlag; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; -use std::ptr; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GESMetaContainer")] diff --git a/gstreamer-editing-services/src/auto/multi_file_source.rs b/gstreamer-editing-services/src/auto/multi_file_source.rs index b58d965b9..264cc94d2 100644 --- a/gstreamer-editing-services/src/auto/multi_file_source.rs +++ b/gstreamer-editing-services/src/auto/multi_file_source.rs @@ -3,15 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use crate::VideoSource; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESMultiFileSource")] diff --git a/gstreamer-editing-services/src/auto/operation.rs b/gstreamer-editing-services/src/auto/operation.rs index 82005d028..84bf247f9 100644 --- a/gstreamer-editing-services/src/auto/operation.rs +++ b/gstreamer-editing-services/src/auto/operation.rs @@ -3,10 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::TimelineElement; -use crate::TrackElement; +use crate::{Extractable, MetaContainer, TimelineElement, TrackElement}; glib::wrapper! { #[doc(alias = "GESOperation")] diff --git a/gstreamer-editing-services/src/auto/operation_clip.rs b/gstreamer-editing-services/src/auto/operation_clip.rs index 046d20c9b..1bcb03895 100644 --- a/gstreamer-editing-services/src/auto/operation_clip.rs +++ b/gstreamer-editing-services/src/auto/operation_clip.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::TimelineElement; +use crate::{Clip, Container, Extractable, MetaContainer, TimelineElement}; glib::wrapper! { #[doc(alias = "GESOperationClip")] diff --git a/gstreamer-editing-services/src/auto/overlay_clip.rs b/gstreamer-editing-services/src/auto/overlay_clip.rs index d41e23916..c958c7c93 100644 --- a/gstreamer-editing-services/src/auto/overlay_clip.rs +++ b/gstreamer-editing-services/src/auto/overlay_clip.rs @@ -3,12 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::OperationClip; -use crate::TimelineElement; +use crate::{Clip, Container, Extractable, MetaContainer, OperationClip, TimelineElement}; glib::wrapper! { #[doc(alias = "GESOverlayClip")] diff --git a/gstreamer-editing-services/src/auto/pipeline.rs b/gstreamer-editing-services/src/auto/pipeline.rs index 68690f8ff..dfb1414d9 100644 --- a/gstreamer-editing-services/src/auto/pipeline.rs +++ b/gstreamer-editing-services/src/auto/pipeline.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::PipelineFlags; -use crate::Timeline; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{PipelineFlags, Timeline}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GESPipeline")] @@ -208,7 +203,7 @@ impl> GESPipelineExt for O { location.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -248,7 +243,7 @@ impl> GESPipelineExt for O { glib::result_from_gboolean!( ffi::ges_pipeline_set_timeline( self.as_ref().to_glib_none().0, - timeline.as_ref().to_glib_full() + timeline.as_ref().to_glib_none().0 ), "Failed to set timeline" ) diff --git a/gstreamer-editing-services/src/auto/project.rs b/gstreamer-editing-services/src/auto/project.rs index 707902e2e..23ba96e57 100644 --- a/gstreamer-editing-services/src/auto/project.rs +++ b/gstreamer-editing-services/src/auto/project.rs @@ -3,20 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::Formatter; -use crate::MetaContainer; -use crate::Timeline; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{Asset, MetaContainer, Timeline}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GESProject")] @@ -91,7 +87,7 @@ pub trait ProjectExt: 'static { &self, timeline: &impl IsA, uri: &str, - formatter_asset: Option<&impl IsA>, + formatter_asset: Option>, overwrite: bool, ) -> Result<(), glib::Error>; @@ -247,7 +243,7 @@ impl> ProjectExt for O { timeline.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -272,7 +268,7 @@ impl> ProjectExt for O { &self, timeline: &impl IsA, uri: &str, - formatter_asset: Option<&impl IsA>, + formatter_asset: Option>, overwrite: bool, ) -> Result<(), glib::Error> { unsafe { @@ -281,11 +277,11 @@ impl> ProjectExt for O { self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0, uri.to_glib_none().0, - formatter_asset.map(|p| p.as_ref()).to_glib_full(), + formatter_asset.map(|p| p.upcast()).into_glib_ptr(), overwrite.into_glib(), &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/source.rs b/gstreamer-editing-services/src/auto/source.rs index 0b5af4d0a..da02516c8 100644 --- a/gstreamer-editing-services/src/auto/source.rs +++ b/gstreamer-editing-services/src/auto/source.rs @@ -3,10 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::TimelineElement; -use crate::TrackElement; +use crate::{Extractable, MetaContainer, TimelineElement, TrackElement}; glib::wrapper! { #[doc(alias = "GESSource")] diff --git a/gstreamer-editing-services/src/auto/source_clip.rs b/gstreamer-editing-services/src/auto/source_clip.rs index 1237dfcab..c5fed3f26 100644 --- a/gstreamer-editing-services/src/auto/source_clip.rs +++ b/gstreamer-editing-services/src/auto/source_clip.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::TimelineElement; +use crate::{Clip, Container, Extractable, MetaContainer, TimelineElement}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use glib::translate::*; diff --git a/gstreamer-editing-services/src/auto/source_clip_asset.rs b/gstreamer-editing-services/src/auto/source_clip_asset.rs index a057830ec..b89c64482 100644 --- a/gstreamer-editing-services/src/auto/source_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/source_clip_asset.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; -use crate::ClipAsset; -use crate::MetaContainer; +use crate::{Asset, ClipAsset, MetaContainer}; glib::wrapper! { #[doc(alias = "GESSourceClipAsset")] diff --git a/gstreamer-editing-services/src/auto/test_clip.rs b/gstreamer-editing-services/src/auto/test_clip.rs index 390a61304..8d3be6760 100644 --- a/gstreamer-editing-services/src/auto/test_clip.rs +++ b/gstreamer-editing-services/src/auto/test_clip.rs @@ -3,22 +3,15 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::SourceClip; -use crate::TimelineElement; -use crate::VideoTestPattern; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + Clip, Container, Extractable, MetaContainer, SourceClip, TimelineElement, VideoTestPattern, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESTestClip")] diff --git a/gstreamer-editing-services/src/auto/text_overlay.rs b/gstreamer-editing-services/src/auto/text_overlay.rs index 6c2ab6985..c27fdeadb 100644 --- a/gstreamer-editing-services/src/auto/text_overlay.rs +++ b/gstreamer-editing-services/src/auto/text_overlay.rs @@ -4,15 +4,10 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Extractable; -use crate::MetaContainer; -use crate::Operation; -use crate::TextHAlign; -use crate::TextVAlign; -use crate::TimelineElement; -use crate::TrackElement; -use glib::object::IsA; -use glib::translate::*; +use crate::{ + Extractable, MetaContainer, Operation, TextHAlign, TextVAlign, TimelineElement, TrackElement, +}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESTextOverlay")] diff --git a/gstreamer-editing-services/src/auto/text_overlay_clip.rs b/gstreamer-editing-services/src/auto/text_overlay_clip.rs index e2a780938..4975ec63f 100644 --- a/gstreamer-editing-services/src/auto/text_overlay_clip.rs +++ b/gstreamer-editing-services/src/auto/text_overlay_clip.rs @@ -3,23 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::OperationClip; -use crate::OverlayClip; -use crate::TextHAlign; -use crate::TextVAlign; -use crate::TimelineElement; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + Clip, Container, Extractable, MetaContainer, OperationClip, OverlayClip, TextHAlign, + TextVAlign, TimelineElement, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESTextOverlayClip")] diff --git a/gstreamer-editing-services/src/auto/timeline.rs b/gstreamer-editing-services/src/auto/timeline.rs index 4c8c2d44d..a2da5ab4d 100644 --- a/gstreamer-editing-services/src/auto/timeline.rs +++ b/gstreamer-editing-services/src/auto/timeline.rs @@ -4,28 +4,18 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Asset; +use crate::{ + Asset, Extractable, Group, Layer, MetaContainer, TimelineElement, Track, TrackElement, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::Clip; -use crate::Extractable; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::FrameNumber; -use crate::Group; -use crate::Layer; -use crate::MetaContainer; -use crate::TimelineElement; -use crate::Track; -use crate::TrackElement; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{Clip, FrameNumber}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GESTimeline")] @@ -280,7 +270,7 @@ impl> TimelineExt for O { glib::result_from_gboolean!( ffi::ges_timeline_add_track( self.as_ref().to_glib_none().0, - track.as_ref().to_glib_full() + track.as_ref().to_glib_none().0 ), "Failed to add track" ) @@ -452,7 +442,7 @@ impl> TimelineExt for O { uri.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -535,7 +525,7 @@ impl> TimelineExt for O { overwrite.into_glib(), &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/timeline_element.rs b/gstreamer-editing-services/src/auto/timeline_element.rs index 6e1d6fb97..854567012 100644 --- a/gstreamer-editing-services/src/auto/timeline_element.rs +++ b/gstreamer-editing-services/src/auto/timeline_element.rs @@ -6,28 +6,14 @@ #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::Edge; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::EditMode; -use crate::Extractable; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use crate::Layer; -use crate::MetaContainer; -use crate::Timeline; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; -use std::ptr; +use crate::{Edge, EditMode, Layer}; +use crate::{Extractable, MetaContainer, Timeline, TrackType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GESTimelineElement")] @@ -358,7 +344,7 @@ impl> TimelineElementExt for O { position, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -652,7 +638,7 @@ impl> TimelineElementExt for O { value.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/title_clip.rs b/gstreamer-editing-services/src/auto/title_clip.rs index 19220b0bc..b4243b238 100644 --- a/gstreamer-editing-services/src/auto/title_clip.rs +++ b/gstreamer-editing-services/src/auto/title_clip.rs @@ -4,22 +4,16 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::SourceClip; -use crate::TextHAlign; -use crate::TextVAlign; -use crate::TimelineElement; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + Clip, Container, Extractable, MetaContainer, SourceClip, TextHAlign, TextVAlign, + TimelineElement, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESTitleClip")] diff --git a/gstreamer-editing-services/src/auto/title_source.rs b/gstreamer-editing-services/src/auto/title_source.rs index fdc667309..ef7657e07 100644 --- a/gstreamer-editing-services/src/auto/title_source.rs +++ b/gstreamer-editing-services/src/auto/title_source.rs @@ -4,16 +4,11 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TextHAlign; -use crate::TextVAlign; -use crate::TimelineElement; -use crate::TrackElement; -use crate::VideoSource; -use glib::object::IsA; -use glib::translate::*; +use crate::{ + Extractable, MetaContainer, Source, TextHAlign, TextVAlign, TimelineElement, TrackElement, + VideoSource, +}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESTitleSource")] diff --git a/gstreamer-editing-services/src/auto/track.rs b/gstreamer-editing-services/src/auto/track.rs index 302de9492..0d09bcff8 100644 --- a/gstreamer-editing-services/src/auto/track.rs +++ b/gstreamer-editing-services/src/auto/track.rs @@ -3,24 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::MetaContainer; -use crate::Timeline; -use crate::TrackElement; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{MetaContainer, Timeline, TrackElement, TrackType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::ptr; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESTrack")] @@ -35,9 +27,9 @@ impl Track { pub const NONE: Option<&'static Track> = None; #[doc(alias = "ges_track_new")] - pub fn new(type_: TrackType, caps: &gst::Caps) -> Track { + pub fn new(type_: TrackType, caps: gst::Caps) -> Track { assert_initialized_main_thread!(); - unsafe { from_glib_none(ffi::ges_track_new(type_.into_glib(), caps.to_glib_full())) } + unsafe { from_glib_none(ffi::ges_track_new(type_.into_glib(), caps.into_glib_ptr())) } } } @@ -168,7 +160,7 @@ impl> GESTrackExt for O { object.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -236,7 +228,7 @@ impl> GESTrackExt for O { object.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-editing-services/src/auto/track_element.rs b/gstreamer-editing-services/src/auto/track_element.rs index ad86c2740..daa24b2e2 100644 --- a/gstreamer-editing-services/src/auto/track_element.rs +++ b/gstreamer-editing-services/src/auto/track_element.rs @@ -4,23 +4,13 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Edge; -use crate::EditMode; -use crate::Extractable; -use crate::Layer; -use crate::MetaContainer; -use crate::TimelineElement; -use crate::Track; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; -use std::ptr; +use crate::{Edge, EditMode, Extractable, Layer, MetaContainer, TimelineElement, Track, TrackType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GESTrackElement")] diff --git a/gstreamer-editing-services/src/auto/track_element_asset.rs b/gstreamer-editing-services/src/auto/track_element_asset.rs index 68d0d0c82..c5d1b5894 100644 --- a/gstreamer-editing-services/src/auto/track_element_asset.rs +++ b/gstreamer-editing-services/src/auto/track_element_asset.rs @@ -3,19 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; -use crate::MetaContainer; -use crate::TrackType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; +use crate::{Asset, MetaContainer, TrackType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::mem; -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESTrackElementAsset")] diff --git a/gstreamer-editing-services/src/auto/transition.rs b/gstreamer-editing-services/src/auto/transition.rs index c34a826c9..92fe8dac5 100644 --- a/gstreamer-editing-services/src/auto/transition.rs +++ b/gstreamer-editing-services/src/auto/transition.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Operation; -use crate::TimelineElement; -use crate::TrackElement; +use crate::{Extractable, MetaContainer, Operation, TimelineElement, TrackElement}; glib::wrapper! { #[doc(alias = "GESTransition")] diff --git a/gstreamer-editing-services/src/auto/transition_clip.rs b/gstreamer-editing-services/src/auto/transition_clip.rs index 336b9b650..a9729f825 100644 --- a/gstreamer-editing-services/src/auto/transition_clip.rs +++ b/gstreamer-editing-services/src/auto/transition_clip.rs @@ -3,23 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::BaseTransitionClip; -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::OperationClip; -use crate::TimelineElement; -use crate::VideoStandardTransitionType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + BaseTransitionClip, Clip, Container, Extractable, MetaContainer, OperationClip, + TimelineElement, VideoStandardTransitionType, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESTransitionClip")] diff --git a/gstreamer-editing-services/src/auto/uri_clip.rs b/gstreamer-editing-services/src/auto/uri_clip.rs index 12883e024..88c1b8030 100644 --- a/gstreamer-editing-services/src/auto/uri_clip.rs +++ b/gstreamer-editing-services/src/auto/uri_clip.rs @@ -3,19 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clip; -use crate::Container; -use crate::Extractable; -use crate::MetaContainer; -use crate::SourceClip; -use crate::TimelineElement; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Clip, Container, Extractable, MetaContainer, SourceClip, TimelineElement}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESUriClip")] diff --git a/gstreamer-editing-services/src/auto/uri_clip_asset.rs b/gstreamer-editing-services/src/auto/uri_clip_asset.rs index a27c6020f..70270a499 100644 --- a/gstreamer-editing-services/src/auto/uri_clip_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_clip_asset.rs @@ -3,25 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; -use crate::ClipAsset; -use crate::MetaContainer; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::SourceClipAsset; -use crate::UriSourceAsset; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{Asset, ClipAsset, MetaContainer, UriSourceAsset}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] diff --git a/gstreamer-editing-services/src/auto/uri_source_asset.rs b/gstreamer-editing-services/src/auto/uri_source_asset.rs index cafa93639..80c336c82 100644 --- a/gstreamer-editing-services/src/auto/uri_source_asset.rs +++ b/gstreamer-editing-services/src/auto/uri_source_asset.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Asset; -use crate::MetaContainer; -use crate::TrackElementAsset; -use crate::UriClipAsset; -use glib::object::IsA; -use glib::translate::*; +use crate::{Asset, MetaContainer, TrackElementAsset, UriClipAsset}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESUriSourceAsset")] diff --git a/gstreamer-editing-services/src/auto/versions.txt b/gstreamer-editing-services/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-editing-services/src/auto/versions.txt +++ b/gstreamer-editing-services/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-editing-services/src/auto/video_source.rs b/gstreamer-editing-services/src/auto/video_source.rs index dd20b33b5..e34ed21ab 100644 --- a/gstreamer-editing-services/src/auto/video_source.rs +++ b/gstreamer-editing-services/src/auto/video_source.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use glib::object::IsA; +use crate::{Extractable, MetaContainer, Source, TimelineElement, TrackElement}; +use glib::prelude::*; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use glib::translate::*; diff --git a/gstreamer-editing-services/src/auto/video_test_source.rs b/gstreamer-editing-services/src/auto/video_test_source.rs index 915f3dba0..ebad1b438 100644 --- a/gstreamer-editing-services/src/auto/video_test_source.rs +++ b/gstreamer-editing-services/src/auto/video_test_source.rs @@ -3,15 +3,11 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use crate::VideoSource; -use crate::VideoTestPattern; -use glib::object::IsA; -use glib::translate::*; +use crate::{ + Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource, + VideoTestPattern, +}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESVideoTestSource")] diff --git a/gstreamer-editing-services/src/auto/video_track.rs b/gstreamer-editing-services/src/auto/video_track.rs index ff7bc0c59..211fd989f 100644 --- a/gstreamer-editing-services/src/auto/video_track.rs +++ b/gstreamer-editing-services/src/auto/video_track.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::MetaContainer; -use crate::Track; +use crate::{MetaContainer, Track}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-editing-services/src/auto/video_transition.rs b/gstreamer-editing-services/src/auto/video_transition.rs index 949163d8c..58770315c 100644 --- a/gstreamer-editing-services/src/auto/video_transition.rs +++ b/gstreamer-editing-services/src/auto/video_transition.rs @@ -4,22 +4,16 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Extractable; -use crate::MetaContainer; -use crate::Operation; -use crate::TimelineElement; -use crate::TrackElement; -use crate::Transition; -use crate::VideoStandardTransitionType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + Extractable, MetaContainer, Operation, TimelineElement, TrackElement, Transition, + VideoStandardTransitionType, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESVideoTransition")] diff --git a/gstreamer-editing-services/src/auto/video_uri_source.rs b/gstreamer-editing-services/src/auto/video_uri_source.rs index 5bcab93ff..62e202612 100644 --- a/gstreamer-editing-services/src/auto/video_uri_source.rs +++ b/gstreamer-editing-services/src/auto/video_uri_source.rs @@ -3,15 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Extractable; -use crate::MetaContainer; -use crate::Source; -use crate::TimelineElement; -use crate::TrackElement; -use crate::VideoSource; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GESVideoUriSource")] diff --git a/gstreamer-editing-services/src/auto/xml_formatter.rs b/gstreamer-editing-services/src/auto/xml_formatter.rs index bce6add65..f4cadd367 100644 --- a/gstreamer-editing-services/src/auto/xml_formatter.rs +++ b/gstreamer-editing-services/src/auto/xml_formatter.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::BaseXmlFormatter; -use crate::Extractable; -use crate::Formatter; +use crate::{BaseXmlFormatter, Extractable, Formatter}; glib::wrapper! { #[doc(alias = "GESXmlFormatter")] diff --git a/gstreamer-editing-services/sys/src/auto/versions.txt b/gstreamer-editing-services/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-editing-services/sys/src/auto/versions.txt +++ b/gstreamer-editing-services/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/egl/src/auto/gl_display_egl.rs b/gstreamer-gl/egl/src/auto/gl_display_egl.rs index 915c24923..43e1a0d81 100644 --- a/gstreamer-gl/egl/src/auto/gl_display_egl.rs +++ b/gstreamer-gl/egl/src/auto/gl_display_egl.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstGLDisplayEGL")] diff --git a/gstreamer-gl/egl/src/auto/versions.txt b/gstreamer-gl/egl/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/egl/src/auto/versions.txt +++ b/gstreamer-gl/egl/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/egl/sys/src/auto/versions.txt b/gstreamer-gl/egl/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/egl/sys/src/auto/versions.txt +++ b/gstreamer-gl/egl/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/src/auto/enums.rs b/gstreamer-gl/src/auto/enums.rs index aba93d7d0..5fd1940f3 100644 --- a/gstreamer-gl/src/auto/enums.rs +++ b/gstreamer-gl/src/auto/enums.rs @@ -3,16 +3,11 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; -use crate::GLSLProfile; -use glib::error::ErrorDomain; -use glib::object::IsA; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::Quark; -use glib::StaticType; -use glib::Type; +use crate::{GLContext, GLSLProfile}; +use glib::{ + error::ErrorDomain, prelude::*, translate::*, value::FromValue, value::ToValue, Quark, + StaticType, Type, +}; use std::mem; #[cfg(any(feature = "v1_20", feature = "dox"))] @@ -48,6 +43,7 @@ impl GLConfigCaveat { impl IntoGlib for GLConfigCaveat { type GlibType = ffi::GstGLConfigCaveat; + #[inline] fn into_glib(self) -> ffi::GstGLConfigCaveat { match self { Self::None => ffi::GST_GL_CONFIG_CAVEAT_NONE, @@ -62,6 +58,7 @@ impl IntoGlib for GLConfigCaveat { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for GLConfigCaveat { + #[inline] unsafe fn from_glib(value: ffi::GstGLConfigCaveat) -> Self { skip_assert_initialized!(); match value { @@ -76,6 +73,7 @@ impl FromGlib for GLConfigCaveat { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for GLConfigCaveat { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_config_caveat_get_type()) } } @@ -92,6 +90,7 @@ impl glib::value::ValueType for GLConfigCaveat { unsafe impl<'a> FromValue<'a> for GLConfigCaveat { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -101,6 +100,7 @@ unsafe impl<'a> FromValue<'a> for GLConfigCaveat { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for GLConfigCaveat { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -109,6 +109,7 @@ impl ToValue for GLConfigCaveat { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -148,6 +149,7 @@ pub enum GLContextError { impl IntoGlib for GLContextError { type GlibType = ffi::GstGLContextError; + #[inline] fn into_glib(self) -> ffi::GstGLContextError { match self { Self::Failed => ffi::GST_GL_CONTEXT_ERROR_FAILED, @@ -163,6 +165,7 @@ impl IntoGlib for GLContextError { #[doc(hidden)] impl FromGlib for GLContextError { + #[inline] unsafe fn from_glib(value: ffi::GstGLContextError) -> Self { skip_assert_initialized!(); match value { @@ -178,31 +181,31 @@ impl FromGlib for GLContextError { } impl ErrorDomain for GLContextError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_gl_context_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_GL_CONTEXT_ERROR_FAILED => Some(Self::Failed), - ffi::GST_GL_CONTEXT_ERROR_WRONG_CONFIG => Some(Self::WrongConfig), - ffi::GST_GL_CONTEXT_ERROR_WRONG_API => Some(Self::WrongApi), - ffi::GST_GL_CONTEXT_ERROR_OLD_LIBS => Some(Self::OldLibs), - ffi::GST_GL_CONTEXT_ERROR_CREATE_CONTEXT => Some(Self::CreateContext), - ffi::GST_GL_CONTEXT_ERROR_RESOURCE_UNAVAILABLE => Some(Self::ResourceUnavailable), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for GLContextError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_context_error_get_type()) } } @@ -215,6 +218,7 @@ impl glib::value::ValueType for GLContextError { unsafe impl<'a> FromValue<'a> for GLContextError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -222,6 +226,7 @@ unsafe impl<'a> FromValue<'a> for GLContextError { } impl ToValue for GLContextError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -230,6 +235,7 @@ impl ToValue for GLContextError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -406,6 +412,7 @@ impl FromGlib for GLFormat { } impl StaticType for GLFormat { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_format_get_type()) } } @@ -418,6 +425,7 @@ impl glib::value::ValueType for GLFormat { unsafe impl<'a> FromValue<'a> for GLFormat { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -425,6 +433,7 @@ unsafe impl<'a> FromValue<'a> for GLFormat { } impl ToValue for GLFormat { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -433,6 +442,7 @@ impl ToValue for GLFormat { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -464,6 +474,7 @@ pub enum GLQueryType { impl IntoGlib for GLQueryType { type GlibType = ffi::GstGLQueryType; + #[inline] fn into_glib(self) -> ffi::GstGLQueryType { match self { Self::None => ffi::GST_GL_QUERY_NONE, @@ -476,6 +487,7 @@ impl IntoGlib for GLQueryType { #[doc(hidden)] impl FromGlib for GLQueryType { + #[inline] unsafe fn from_glib(value: ffi::GstGLQueryType) -> Self { skip_assert_initialized!(); match value { @@ -488,6 +500,7 @@ impl FromGlib for GLQueryType { } impl StaticType for GLQueryType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_query_type_get_type()) } } @@ -500,6 +513,7 @@ impl glib::value::ValueType for GLQueryType { unsafe impl<'a> FromValue<'a> for GLQueryType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -507,6 +521,7 @@ unsafe impl<'a> FromValue<'a> for GLQueryType { } impl ToValue for GLQueryType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -515,6 +530,7 @@ impl ToValue for GLQueryType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -546,6 +562,7 @@ pub enum GLSLError { impl IntoGlib for GLSLError { type GlibType = ffi::GstGLSLError; + #[inline] fn into_glib(self) -> ffi::GstGLSLError { match self { Self::Compile => ffi::GST_GLSL_ERROR_COMPILE, @@ -558,6 +575,7 @@ impl IntoGlib for GLSLError { #[doc(hidden)] impl FromGlib for GLSLError { + #[inline] unsafe fn from_glib(value: ffi::GstGLSLError) -> Self { skip_assert_initialized!(); match value { @@ -570,28 +588,30 @@ impl FromGlib for GLSLError { } impl ErrorDomain for GLSLError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_glsl_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_GLSL_ERROR_COMPILE => Some(Self::Compile), - ffi::GST_GLSL_ERROR_LINK => Some(Self::Link), - ffi::GST_GLSL_ERROR_PROGRAM => Some(Self::Program), - value => Some(Self::__Unknown(value)), + match unsafe { from_glib(code) } { + value => Some(value), } } } impl StaticType for GLSLError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_glsl_error_get_type()) } } @@ -604,6 +624,7 @@ impl glib::value::ValueType for GLSLError { unsafe impl<'a> FromValue<'a> for GLSLError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -611,6 +632,7 @@ unsafe impl<'a> FromValue<'a> for GLSLError { } impl ToValue for GLSLError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -619,6 +641,7 @@ impl ToValue for GLSLError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -778,6 +801,7 @@ impl FromGlib for GLSLVersion { } impl StaticType for GLSLVersion { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_glsl_version_get_type()) } } @@ -790,6 +814,7 @@ impl glib::value::ValueType for GLSLVersion { unsafe impl<'a> FromValue<'a> for GLSLVersion { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -797,6 +822,7 @@ unsafe impl<'a> FromValue<'a> for GLSLVersion { } impl ToValue for GLSLVersion { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -805,6 +831,7 @@ impl ToValue for GLSLVersion { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -836,6 +863,7 @@ pub enum GLStereoDownmix { impl IntoGlib for GLStereoDownmix { type GlibType = ffi::GstGLStereoDownmix; + #[inline] fn into_glib(self) -> ffi::GstGLStereoDownmix { match self { Self::GreenMagentaDubois => ffi::GST_GL_STEREO_DOWNMIX_ANAGLYPH_GREEN_MAGENTA_DUBOIS, @@ -848,6 +876,7 @@ impl IntoGlib for GLStereoDownmix { #[doc(hidden)] impl FromGlib for GLStereoDownmix { + #[inline] unsafe fn from_glib(value: ffi::GstGLStereoDownmix) -> Self { skip_assert_initialized!(); match value { @@ -860,6 +889,7 @@ impl FromGlib for GLStereoDownmix { } impl StaticType for GLStereoDownmix { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_stereo_downmix_get_type()) } } @@ -872,6 +902,7 @@ impl glib::value::ValueType for GLStereoDownmix { unsafe impl<'a> FromValue<'a> for GLStereoDownmix { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -879,6 +910,7 @@ unsafe impl<'a> FromValue<'a> for GLStereoDownmix { } impl ToValue for GLStereoDownmix { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -887,6 +919,7 @@ impl ToValue for GLStereoDownmix { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -957,6 +990,7 @@ impl GLTextureTarget { impl IntoGlib for GLTextureTarget { type GlibType = ffi::GstGLTextureTarget; + #[inline] fn into_glib(self) -> ffi::GstGLTextureTarget { match self { Self::None => ffi::GST_GL_TEXTURE_TARGET_NONE, @@ -970,6 +1004,7 @@ impl IntoGlib for GLTextureTarget { #[doc(hidden)] impl FromGlib for GLTextureTarget { + #[inline] unsafe fn from_glib(value: ffi::GstGLTextureTarget) -> Self { skip_assert_initialized!(); match value { @@ -983,6 +1018,7 @@ impl FromGlib for GLTextureTarget { } impl StaticType for GLTextureTarget { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_texture_target_get_type()) } } @@ -995,6 +1031,7 @@ impl glib::value::ValueType for GLTextureTarget { unsafe impl<'a> FromValue<'a> for GLTextureTarget { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1002,6 +1039,7 @@ unsafe impl<'a> FromValue<'a> for GLTextureTarget { } impl ToValue for GLTextureTarget { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1010,6 +1048,7 @@ impl ToValue for GLTextureTarget { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1045,6 +1084,7 @@ pub enum GLUploadReturn { impl IntoGlib for GLUploadReturn { type GlibType = ffi::GstGLUploadReturn; + #[inline] fn into_glib(self) -> ffi::GstGLUploadReturn { match self { Self::Done => ffi::GST_GL_UPLOAD_DONE, @@ -1059,6 +1099,7 @@ impl IntoGlib for GLUploadReturn { #[doc(hidden)] impl FromGlib for GLUploadReturn { + #[inline] unsafe fn from_glib(value: ffi::GstGLUploadReturn) -> Self { skip_assert_initialized!(); match value { @@ -1073,6 +1114,7 @@ impl FromGlib for GLUploadReturn { } impl StaticType for GLUploadReturn { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_upload_return_get_type()) } } @@ -1085,6 +1127,7 @@ impl glib::value::ValueType for GLUploadReturn { unsafe impl<'a> FromValue<'a> for GLUploadReturn { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1092,6 +1135,7 @@ unsafe impl<'a> FromValue<'a> for GLUploadReturn { } impl ToValue for GLUploadReturn { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1100,6 +1144,7 @@ impl ToValue for GLUploadReturn { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1131,6 +1176,7 @@ pub enum GLWindowError { impl IntoGlib for GLWindowError { type GlibType = ffi::GstGLWindowError; + #[inline] fn into_glib(self) -> ffi::GstGLWindowError { match self { Self::Failed => ffi::GST_GL_WINDOW_ERROR_FAILED, @@ -1143,6 +1189,7 @@ impl IntoGlib for GLWindowError { #[doc(hidden)] impl FromGlib for GLWindowError { + #[inline] unsafe fn from_glib(value: ffi::GstGLWindowError) -> Self { skip_assert_initialized!(); match value { @@ -1155,28 +1202,31 @@ impl FromGlib for GLWindowError { } impl ErrorDomain for GLWindowError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_gl_window_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_GL_WINDOW_ERROR_FAILED => Some(Self::Failed), - ffi::GST_GL_WINDOW_ERROR_OLD_LIBS => Some(Self::OldLibs), - ffi::GST_GL_WINDOW_ERROR_RESOURCE_UNAVAILABLE => Some(Self::ResourceUnavailable), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for GLWindowError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_window_error_get_type()) } } @@ -1189,6 +1239,7 @@ impl glib::value::ValueType for GLWindowError { unsafe impl<'a> FromValue<'a> for GLWindowError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1196,6 +1247,7 @@ unsafe impl<'a> FromValue<'a> for GLWindowError { } impl ToValue for GLWindowError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1204,6 +1256,7 @@ impl ToValue for GLWindowError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-gl/src/auto/flags.rs b/gstreamer-gl/src/auto/flags.rs index abcc51ebc..bf4c937ba 100644 --- a/gstreamer-gl/src/auto/flags.rs +++ b/gstreamer-gl/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; use std::fmt; bitflags! { @@ -51,6 +47,7 @@ impl fmt::Display for GLAPI { impl IntoGlib for GLAPI { type GlibType = ffi::GstGLAPI; + #[inline] fn into_glib(self) -> ffi::GstGLAPI { self.bits() } @@ -58,6 +55,7 @@ impl IntoGlib for GLAPI { #[doc(hidden)] impl FromGlib for GLAPI { + #[inline] unsafe fn from_glib(value: ffi::GstGLAPI) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -65,6 +63,7 @@ impl FromGlib for GLAPI { } impl StaticType for GLAPI { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_api_get_type()) } } @@ -77,6 +76,7 @@ impl glib::value::ValueType for GLAPI { unsafe impl<'a> FromValue<'a> for GLAPI { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -84,6 +84,7 @@ unsafe impl<'a> FromValue<'a> for GLAPI { } impl ToValue for GLAPI { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -92,6 +93,7 @@ impl ToValue for GLAPI { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -138,6 +140,7 @@ impl GLConfigSurfaceType { impl IntoGlib for GLConfigSurfaceType { type GlibType = ffi::GstGLConfigSurfaceType; + #[inline] fn into_glib(self) -> ffi::GstGLConfigSurfaceType { self.bits() } @@ -147,6 +150,7 @@ impl IntoGlib for GLConfigSurfaceType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for GLConfigSurfaceType { + #[inline] unsafe fn from_glib(value: ffi::GstGLConfigSurfaceType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -156,6 +160,7 @@ impl FromGlib for GLConfigSurfaceType { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for GLConfigSurfaceType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_config_surface_type_get_type()) } } @@ -172,6 +177,7 @@ impl glib::value::ValueType for GLConfigSurfaceType { unsafe impl<'a> FromValue<'a> for GLConfigSurfaceType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -181,6 +187,7 @@ unsafe impl<'a> FromValue<'a> for GLConfigSurfaceType { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for GLConfigSurfaceType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -189,6 +196,7 @@ impl ToValue for GLConfigSurfaceType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -246,6 +254,7 @@ bitflags! { impl IntoGlib for GLDisplayType { type GlibType = ffi::GstGLDisplayType; + #[inline] fn into_glib(self) -> ffi::GstGLDisplayType { self.bits() } @@ -253,6 +262,7 @@ impl IntoGlib for GLDisplayType { #[doc(hidden)] impl FromGlib for GLDisplayType { + #[inline] unsafe fn from_glib(value: ffi::GstGLDisplayType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -260,6 +270,7 @@ impl FromGlib for GLDisplayType { } impl StaticType for GLDisplayType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_display_type_get_type()) } } @@ -272,6 +283,7 @@ impl glib::value::ValueType for GLDisplayType { unsafe impl<'a> FromValue<'a> for GLDisplayType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -279,6 +291,7 @@ unsafe impl<'a> FromValue<'a> for GLDisplayType { } impl ToValue for GLDisplayType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -287,6 +300,7 @@ impl ToValue for GLDisplayType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -346,6 +360,7 @@ impl fmt::Display for GLPlatform { impl IntoGlib for GLPlatform { type GlibType = ffi::GstGLPlatform; + #[inline] fn into_glib(self) -> ffi::GstGLPlatform { self.bits() } @@ -353,6 +368,7 @@ impl IntoGlib for GLPlatform { #[doc(hidden)] impl FromGlib for GLPlatform { + #[inline] unsafe fn from_glib(value: ffi::GstGLPlatform) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -360,6 +376,7 @@ impl FromGlib for GLPlatform { } impl StaticType for GLPlatform { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gl_platform_get_type()) } } @@ -372,6 +389,7 @@ impl glib::value::ValueType for GLPlatform { unsafe impl<'a> FromValue<'a> for GLPlatform { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -379,6 +397,7 @@ unsafe impl<'a> FromValue<'a> for GLPlatform { } impl ToValue for GLPlatform { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -387,6 +406,7 @@ impl ToValue for GLPlatform { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -431,6 +451,7 @@ impl GLSLProfile { impl IntoGlib for GLSLProfile { type GlibType = ffi::GstGLSLProfile; + #[inline] fn into_glib(self) -> ffi::GstGLSLProfile { self.bits() } @@ -438,6 +459,7 @@ impl IntoGlib for GLSLProfile { #[doc(hidden)] impl FromGlib for GLSLProfile { + #[inline] unsafe fn from_glib(value: ffi::GstGLSLProfile) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -445,6 +467,7 @@ impl FromGlib for GLSLProfile { } impl StaticType for GLSLProfile { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_glsl_profile_get_type()) } } @@ -457,6 +480,7 @@ impl glib::value::ValueType for GLSLProfile { unsafe impl<'a> FromValue<'a> for GLSLProfile { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -464,6 +488,7 @@ unsafe impl<'a> FromValue<'a> for GLSLProfile { } impl ToValue for GLSLProfile { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -472,6 +497,7 @@ impl ToValue for GLSLProfile { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-gl/src/auto/functions.rs b/gstreamer-gl/src/auto/functions.rs index a613bed99..f10ac8fd5 100644 --- a/gstreamer-gl/src/auto/functions.rs +++ b/gstreamer-gl/src/auto/functions.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLDisplay; -use crate::GLSLProfile; -use crate::GLSLVersion; -use glib::object::IsA; -use glib::translate::*; +use crate::{GLDisplay, GLSLProfile, GLSLVersion}; +use glib::{prelude::*, translate::*}; use std::mem; #[doc(alias = "gst_gl_check_extension")] diff --git a/gstreamer-gl/src/auto/gl_base_filter.rs b/gstreamer-gl/src/auto/gl_base_filter.rs index 8b9e0f780..d4d113875 100644 --- a/gstreamer-gl/src/auto/gl_base_filter.rs +++ b/gstreamer-gl/src/auto/gl_base_filter.rs @@ -4,14 +4,12 @@ // DO NOT EDIT use crate::GLContext; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstGLBaseFilter")] diff --git a/gstreamer-gl/src/auto/gl_base_src.rs b/gstreamer-gl/src/auto/gl_base_src.rs index 78775ff9b..e60f17cf7 100644 --- a/gstreamer-gl/src/auto/gl_base_src.rs +++ b/gstreamer-gl/src/auto/gl_base_src.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstGLBaseSrc")] diff --git a/gstreamer-gl/src/auto/gl_buffer_pool.rs b/gstreamer-gl/src/auto/gl_buffer_pool.rs index e6c623b6b..e173c7466 100644 --- a/gstreamer-gl/src/auto/gl_buffer_pool.rs +++ b/gstreamer-gl/src/auto/gl_buffer_pool.rs @@ -7,9 +7,7 @@ #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] use crate::GLAllocationParams; use crate::GLContext; -use glib::object::Cast; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstGLBufferPool")] diff --git a/gstreamer-gl/src/auto/gl_color_convert.rs b/gstreamer-gl/src/auto/gl_color_convert.rs index 26ff96770..f7a5b08ee 100644 --- a/gstreamer-gl/src/auto/gl_color_convert.rs +++ b/gstreamer-gl/src/auto/gl_color_convert.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::GLContext; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstGLColorConvert")] diff --git a/gstreamer-gl/src/auto/gl_context.rs b/gstreamer-gl/src/auto/gl_context.rs index 2ba417b45..d3e793840 100644 --- a/gstreamer-gl/src/auto/gl_context.rs +++ b/gstreamer-gl/src/auto/gl_context.rs @@ -3,16 +3,9 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLDisplay; -use crate::GLPlatform; -use crate::GLSLProfile; -use crate::GLSLVersion; -use crate::GLWindow; -use crate::GLAPI; -use glib::object::IsA; -use glib::translate::*; -use std::mem; -use std::ptr; +use crate::{GLDisplay, GLPlatform, GLSLProfile, GLSLVersion, GLWindow, GLAPI}; +use glib::{prelude::*, translate::*}; +use std::{mem, ptr}; glib::wrapper! { #[doc(alias = "GstGLContext")] @@ -126,13 +119,13 @@ pub trait GLContextExt: 'static { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(alias = "gst_gl_context_request_config")] - fn request_config(&self, gl_config: Option<&gst::Structure>) -> bool; + fn request_config(&self, gl_config: Option) -> bool; #[doc(alias = "gst_gl_context_set_shared_with")] fn set_shared_with(&self, share: &impl IsA); #[doc(alias = "gst_gl_context_set_window")] - fn set_window(&self, window: &impl IsA) -> Result<(), glib::error::BoolError>; + fn set_window(&self, window: impl IsA) -> Result<(), glib::error::BoolError>; #[doc(alias = "gst_gl_context_supports_glsl_profile_version")] fn supports_glsl_profile_version(&self, version: GLSLVersion, profile: GLSLProfile) -> bool; @@ -219,7 +212,7 @@ impl> GLContextExt for O { other_context.map(|p| p.as_ref()).to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -238,7 +231,7 @@ impl> GLContextExt for O { unsafe { let mut error = ptr::null_mut(); let is_ok = ffi::gst_gl_context_fill_info(self.as_ref().to_glib_none().0, &mut error); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -325,11 +318,11 @@ impl> GLContextExt for O { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] - fn request_config(&self, gl_config: Option<&gst::Structure>) -> bool { + fn request_config(&self, gl_config: Option) -> bool { unsafe { from_glib(ffi::gst_gl_context_request_config( self.as_ref().to_glib_none().0, - gl_config.to_glib_full(), + gl_config.into_glib_ptr(), )) } } @@ -343,12 +336,12 @@ impl> GLContextExt for O { } } - fn set_window(&self, window: &impl IsA) -> Result<(), glib::error::BoolError> { + fn set_window(&self, window: impl IsA) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::gst_gl_context_set_window( self.as_ref().to_glib_none().0, - window.as_ref().to_glib_full() + window.upcast().into_glib_ptr() ), "Failed to set window" ) diff --git a/gstreamer-gl/src/auto/gl_display.rs b/gstreamer-gl/src/auto/gl_display.rs index 442f54562..68fbc8e73 100644 --- a/gstreamer-gl/src/auto/gl_display.rs +++ b/gstreamer-gl/src/auto/gl_display.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; -use crate::GLDisplayType; -use crate::GLWindow; -use crate::GLAPI; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{GLContext, GLDisplayType, GLWindow, GLAPI}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GstGLDisplay")] @@ -127,7 +122,7 @@ impl> GLDisplayExt for O { &mut p_context, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(from_glib_full(p_context)) } else { diff --git a/gstreamer-gl/src/auto/gl_filter.rs b/gstreamer-gl/src/auto/gl_filter.rs index a0fd88214..dc31df001 100644 --- a/gstreamer-gl/src/auto/gl_filter.rs +++ b/gstreamer-gl/src/auto/gl_filter.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLBaseFilter; -use crate::GLMemory; -use crate::GLShader; -use glib::object::IsA; -use glib::translate::*; +use crate::{GLBaseFilter, GLMemory, GLShader}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstGLFilter")] diff --git a/gstreamer-gl/src/auto/gl_framebuffer.rs b/gstreamer-gl/src/auto/gl_framebuffer.rs index 63c4544ba..1422fd8a8 100644 --- a/gstreamer-gl/src/auto/gl_framebuffer.rs +++ b/gstreamer-gl/src/auto/gl_framebuffer.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLBaseMemory; -use crate::GLContext; -use glib::object::IsA; -use glib::translate::*; +use crate::{GLBaseMemory, GLContext}; +use glib::{prelude::*, translate::*}; use std::mem; glib::wrapper! { diff --git a/gstreamer-gl/src/auto/gl_memory_allocator.rs b/gstreamer-gl/src/auto/gl_memory_allocator.rs index b7da91ec1..aa8c18307 100644 --- a/gstreamer-gl/src/auto/gl_memory_allocator.rs +++ b/gstreamer-gl/src/auto/gl_memory_allocator.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLBaseMemoryAllocator; -use crate::GLContext; -use glib::object::IsA; -use glib::translate::*; +use crate::{GLBaseMemoryAllocator, GLContext}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstGLMemoryAllocator")] diff --git a/gstreamer-gl/src/auto/gl_overlay_compositor.rs b/gstreamer-gl/src/auto/gl_overlay_compositor.rs index 25c2074f1..7968f68d2 100644 --- a/gstreamer-gl/src/auto/gl_overlay_compositor.rs +++ b/gstreamer-gl/src/auto/gl_overlay_compositor.rs @@ -4,29 +4,13 @@ // DO NOT EDIT use crate::GLContext; -use glib::object::IsA; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::object::ObjectType as ObjectType_; +use glib::signal::{connect_raw, SignalHandlerId}; +use glib::{prelude::*, translate::*}; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::signal::connect_raw; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::StaticType; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::ToValue; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstGLOverlayCompositor")] diff --git a/gstreamer-gl/src/auto/gl_shader.rs b/gstreamer-gl/src/auto/gl_shader.rs index 8ce9bfbaf..c07754751 100644 --- a/gstreamer-gl/src/auto/gl_shader.rs +++ b/gstreamer-gl/src/auto/gl_shader.rs @@ -3,22 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; +use crate::{GLContext, GLSLStage}; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use crate::GLSLProfile; -use crate::GLSLStage; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use crate::GLSLVersion; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{GLSLProfile, GLSLVersion}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GstGLShader")] @@ -112,7 +106,7 @@ impl GLShader { stage.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -159,7 +153,7 @@ impl GLShader { unsafe { let mut error = ptr::null_mut(); let is_ok = ffi::gst_gl_shader_link(self.to_glib_none().0, &mut error); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-gl/src/auto/gl_upload.rs b/gstreamer-gl/src/auto/gl_upload.rs index a118e3790..5ecf36692 100644 --- a/gstreamer-gl/src/auto/gl_upload.rs +++ b/gstreamer-gl/src/auto/gl_upload.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::GLContext; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::ptr; glib::wrapper! { diff --git a/gstreamer-gl/src/auto/gl_video_allocation_params.rs b/gstreamer-gl/src/auto/gl_video_allocation_params.rs index 6b668f6d5..45b20f107 100644 --- a/gstreamer-gl/src/auto/gl_video_allocation_params.rs +++ b/gstreamer-gl/src/auto/gl_video_allocation_params.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; -use crate::GLFormat; -use crate::GLTextureTarget; -use glib::object::IsA; -use glib::translate::*; +use crate::{GLContext, GLFormat, GLTextureTarget}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-gl/src/auto/gl_view_convert.rs b/gstreamer-gl/src/auto/gl_view_convert.rs index c0eae1a28..8fad694a2 100644 --- a/gstreamer-gl/src/auto/gl_view_convert.rs +++ b/gstreamer-gl/src/auto/gl_view_convert.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; -use crate::GLStereoDownmix; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{GLContext, GLStereoDownmix}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstGLViewConvert")] diff --git a/gstreamer-gl/src/auto/gl_window.rs b/gstreamer-gl/src/auto/gl_window.rs index 12830a08a..ca9c4621e 100644 --- a/gstreamer-gl/src/auto/gl_window.rs +++ b/gstreamer-gl/src/auto/gl_window.rs @@ -3,16 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; -use crate::GLDisplay; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use crate::{GLContext, GLDisplay}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstGLWindow")] diff --git a/gstreamer-gl/src/auto/glsl_stage.rs b/gstreamer-gl/src/auto/glsl_stage.rs index 9b63ba789..23aaac4d7 100644 --- a/gstreamer-gl/src/auto/glsl_stage.rs +++ b/gstreamer-gl/src/auto/glsl_stage.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::GLContext; -use crate::GLSLProfile; -use crate::GLSLVersion; -use glib::object::IsA; -use glib::translate::*; +use crate::{GLContext, GLSLProfile, GLSLVersion}; +use glib::{prelude::*, translate::*}; use std::ptr; glib::wrapper! { @@ -100,7 +97,7 @@ impl GLSLStage { unsafe { let mut error = ptr::null_mut(); let is_ok = ffi::gst_glsl_stage_compile(self.to_glib_none().0, &mut error); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-gl/src/auto/versions.txt b/gstreamer-gl/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/src/auto/versions.txt +++ b/gstreamer-gl/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/sys/src/auto/versions.txt b/gstreamer-gl/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/sys/src/auto/versions.txt +++ b/gstreamer-gl/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/wayland/src/auto/versions.txt b/gstreamer-gl/wayland/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/wayland/src/auto/versions.txt +++ b/gstreamer-gl/wayland/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/wayland/sys/src/auto/versions.txt b/gstreamer-gl/wayland/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/wayland/sys/src/auto/versions.txt +++ b/gstreamer-gl/wayland/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/x11/src/auto/versions.txt b/gstreamer-gl/x11/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/x11/src/auto/versions.txt +++ b/gstreamer-gl/x11/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-gl/x11/sys/src/auto/versions.txt b/gstreamer-gl/x11/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-gl/x11/sys/src/auto/versions.txt +++ b/gstreamer-gl/x11/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-mpegts/src/auto/section.rs b/gstreamer-mpegts/src/auto/section.rs index 641dd0915..2df239a42 100644 --- a/gstreamer-mpegts/src/auto/section.rs +++ b/gstreamer-mpegts/src/auto/section.rs @@ -120,7 +120,7 @@ impl Section { //} //#[doc(alias = "gst_mpegts_section_from_atsc_mgt")] - //pub fn from_atsc_mgt(mgt: /*Ignored*/&mut AtscMGT) -> Section { + //pub fn from_atsc_mgt(mgt: /*Ignored*/AtscMGT) -> Section { // unsafe { TODO: call ffi:gst_mpegts_section_from_atsc_mgt() } //} @@ -135,22 +135,22 @@ impl Section { //} //#[doc(alias = "gst_mpegts_section_from_nit")] - //pub fn from_nit(nit: /*Ignored*/&mut NIT) -> Section { + //pub fn from_nit(nit: /*Ignored*/NIT) -> Section { // unsafe { TODO: call ffi:gst_mpegts_section_from_nit() } //} //#[doc(alias = "gst_mpegts_section_from_pat")] - //pub fn from_pat(programs: /*Ignored*/&[PatProgram], ts_id: u16) -> Section { + //pub fn from_pat(programs: /*Ignored*/Vec, ts_id: u16) -> Section { // unsafe { TODO: call ffi:gst_mpegts_section_from_pat() } //} //#[doc(alias = "gst_mpegts_section_from_pmt")] - //pub fn from_pmt(pmt: /*Ignored*/&mut PMT, pid: u16) -> Section { + //pub fn from_pmt(pmt: /*Ignored*/PMT, pid: u16) -> Section { // unsafe { TODO: call ffi:gst_mpegts_section_from_pmt() } //} //#[doc(alias = "gst_mpegts_section_from_sdt")] - //pub fn from_sdt(sdt: /*Ignored*/&mut SDT) -> Section { + //pub fn from_sdt(sdt: /*Ignored*/SDT) -> Section { // unsafe { TODO: call ffi:gst_mpegts_section_from_sdt() } //} } diff --git a/gstreamer-mpegts/src/auto/versions.txt b/gstreamer-mpegts/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-mpegts/src/auto/versions.txt +++ b/gstreamer-mpegts/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-mpegts/sys/src/auto/versions.txt b/gstreamer-mpegts/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-mpegts/sys/src/auto/versions.txt +++ b/gstreamer-mpegts/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-net/src/auto/net_client_clock.rs b/gstreamer-net/src/auto/net_client_clock.rs index 59b723bb7..e3593efce 100644 --- a/gstreamer-net/src/auto/net_client_clock.rs +++ b/gstreamer-net/src/auto/net_client_clock.rs @@ -3,16 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstNetClientClock")] diff --git a/gstreamer-net/src/auto/net_time_provider.rs b/gstreamer-net/src/auto/net_time_provider.rs index cf5e10f81..2ac74985a 100644 --- a/gstreamer-net/src/auto/net_time_provider.rs +++ b/gstreamer-net/src/auto/net_time_provider.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstNetTimeProvider")] diff --git a/gstreamer-net/src/auto/ntp_clock.rs b/gstreamer-net/src/auto/ntp_clock.rs index 7af49d00f..e51c0e03d 100644 --- a/gstreamer-net/src/auto/ntp_clock.rs +++ b/gstreamer-net/src/auto/ntp_clock.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::NetClientClock; -use glib::object::Cast; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstNtpClock")] diff --git a/gstreamer-net/src/auto/ptp_clock.rs b/gstreamer-net/src/auto/ptp_clock.rs index ebeb493af..3ab1e6c3a 100644 --- a/gstreamer-net/src/auto/ptp_clock.rs +++ b/gstreamer-net/src/auto/ptp_clock.rs @@ -3,14 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPtpClock")] diff --git a/gstreamer-net/src/auto/versions.txt b/gstreamer-net/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-net/src/auto/versions.txt +++ b/gstreamer-net/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-net/sys/src/auto/versions.txt b/gstreamer-net/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-net/sys/src/auto/versions.txt +++ b/gstreamer-net/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-pbutils/src/auto/audio_visualizer.rs b/gstreamer-pbutils/src/auto/audio_visualizer.rs index 72e0ddf50..bf9f9024d 100644 --- a/gstreamer-pbutils/src/auto/audio_visualizer.rs +++ b/gstreamer-pbutils/src/auto/audio_visualizer.rs @@ -4,15 +4,12 @@ // DO NOT EDIT use crate::AudioVisualizerShader; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstAudioVisualizer")] diff --git a/gstreamer-pbutils/src/auto/discoverer.rs b/gstreamer-pbutils/src/auto/discoverer.rs index 4823216e6..66163e1ab 100644 --- a/gstreamer-pbutils/src/auto/discoverer.rs +++ b/gstreamer-pbutils/src/auto/discoverer.rs @@ -4,19 +4,12 @@ // DO NOT EDIT use crate::DiscovererInfo; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::StaticType; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GstDiscoverer")] diff --git a/gstreamer-pbutils/src/auto/discoverer_info.rs b/gstreamer-pbutils/src/auto/discoverer_info.rs index 7baae1f7c..b50ddb9eb 100644 --- a/gstreamer-pbutils/src/auto/discoverer_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_info.rs @@ -4,13 +4,10 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::DiscovererAudioInfo; -use crate::DiscovererContainerInfo; -use crate::DiscovererResult; -use crate::DiscovererSerializeFlags; -use crate::DiscovererStreamInfo; -use crate::DiscovererSubtitleInfo; -use crate::DiscovererVideoInfo; +use crate::{ + DiscovererAudioInfo, DiscovererContainerInfo, DiscovererResult, DiscovererSerializeFlags, + DiscovererStreamInfo, DiscovererSubtitleInfo, DiscovererVideoInfo, +}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs index 6fc4a9a85..2c26aa57c 100644 --- a/gstreamer-pbutils/src/auto/discoverer_stream_info.rs +++ b/gstreamer-pbutils/src/auto/discoverer_stream_info.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstDiscovererStreamInfo")] diff --git a/gstreamer-pbutils/src/auto/encoding_container_profile.rs b/gstreamer-pbutils/src/auto/encoding_container_profile.rs index e58b69b80..b159f3ff8 100644 --- a/gstreamer-pbutils/src/auto/encoding_container_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_container_profile.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::EncodingProfile; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstEncodingContainerProfile")] diff --git a/gstreamer-pbutils/src/auto/encoding_profile.rs b/gstreamer-pbutils/src/auto/encoding_profile.rs index eae304eb2..fda96da9b 100644 --- a/gstreamer-pbutils/src/auto/encoding_profile.rs +++ b/gstreamer-pbutils/src/auto/encoding_profile.rs @@ -6,21 +6,11 @@ use crate::DiscovererInfo; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::object::Cast; -use glib::object::IsA; +use glib::signal::{connect_raw, SignalHandlerId}; +use glib::{prelude::*, translate::*}; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::connect_raw; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstEncodingProfile")] diff --git a/gstreamer-pbutils/src/auto/encoding_target.rs b/gstreamer-pbutils/src/auto/encoding_target.rs index c1be548b3..699b7235e 100644 --- a/gstreamer-pbutils/src/auto/encoding_target.rs +++ b/gstreamer-pbutils/src/auto/encoding_target.rs @@ -5,8 +5,7 @@ use crate::EncodingProfile; use glib::translate::*; -use std::fmt; -use std::ptr; +use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GstEncodingTarget")] @@ -93,7 +92,7 @@ impl EncodingTarget { unsafe { let mut error = ptr::null_mut(); let is_ok = ffi::gst_encoding_target_save(self.to_glib_none().0, &mut error); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -111,7 +110,7 @@ impl EncodingTarget { filepath.as_ref().to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-pbutils/src/auto/enums.rs b/gstreamer-pbutils/src/auto/enums.rs index 8e755eea1..be4241c85 100644 --- a/gstreamer-pbutils/src/auto/enums.rs +++ b/gstreamer-pbutils/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -41,6 +37,7 @@ pub enum AudioVisualizerShader { impl IntoGlib for AudioVisualizerShader { type GlibType = ffi::GstAudioVisualizerShader; + #[inline] fn into_glib(self) -> ffi::GstAudioVisualizerShader { match self { Self::None => ffi::GST_AUDIO_VISUALIZER_SHADER_NONE, @@ -60,6 +57,7 @@ impl IntoGlib for AudioVisualizerShader { #[doc(hidden)] impl FromGlib for AudioVisualizerShader { + #[inline] unsafe fn from_glib(value: ffi::GstAudioVisualizerShader) -> Self { skip_assert_initialized!(); match value { @@ -79,6 +77,7 @@ impl FromGlib for AudioVisualizerShader { } impl StaticType for AudioVisualizerShader { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_audio_visualizer_shader_get_type()) } } @@ -91,6 +90,7 @@ impl glib::value::ValueType for AudioVisualizerShader { unsafe impl<'a> FromValue<'a> for AudioVisualizerShader { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -98,6 +98,7 @@ unsafe impl<'a> FromValue<'a> for AudioVisualizerShader { } impl ToValue for AudioVisualizerShader { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -106,6 +107,7 @@ impl ToValue for AudioVisualizerShader { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -143,6 +145,7 @@ pub enum DiscovererResult { impl IntoGlib for DiscovererResult { type GlibType = ffi::GstDiscovererResult; + #[inline] fn into_glib(self) -> ffi::GstDiscovererResult { match self { Self::Ok => ffi::GST_DISCOVERER_OK, @@ -158,6 +161,7 @@ impl IntoGlib for DiscovererResult { #[doc(hidden)] impl FromGlib for DiscovererResult { + #[inline] unsafe fn from_glib(value: ffi::GstDiscovererResult) -> Self { skip_assert_initialized!(); match value { @@ -173,6 +177,7 @@ impl FromGlib for DiscovererResult { } impl StaticType for DiscovererResult { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_discoverer_result_get_type()) } } @@ -185,6 +190,7 @@ impl glib::value::ValueType for DiscovererResult { unsafe impl<'a> FromValue<'a> for DiscovererResult { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -192,6 +198,7 @@ unsafe impl<'a> FromValue<'a> for DiscovererResult { } impl ToValue for DiscovererResult { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -200,6 +207,7 @@ impl ToValue for DiscovererResult { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-pbutils/src/auto/flags.rs b/gstreamer-pbutils/src/auto/flags.rs index 9e1dc550c..9f831ff94 100644 --- a/gstreamer-pbutils/src/auto/flags.rs +++ b/gstreamer-pbutils/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; bitflags! { #[doc(alias = "GstDiscovererSerializeFlags")] @@ -26,6 +22,7 @@ bitflags! { impl IntoGlib for DiscovererSerializeFlags { type GlibType = ffi::GstDiscovererSerializeFlags; + #[inline] fn into_glib(self) -> ffi::GstDiscovererSerializeFlags { self.bits() } @@ -33,6 +30,7 @@ impl IntoGlib for DiscovererSerializeFlags { #[doc(hidden)] impl FromGlib for DiscovererSerializeFlags { + #[inline] unsafe fn from_glib(value: ffi::GstDiscovererSerializeFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -40,6 +38,7 @@ impl FromGlib for DiscovererSerializeFlags { } impl StaticType for DiscovererSerializeFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_discoverer_serialize_flags_get_type()) } } @@ -52,6 +51,7 @@ impl glib::value::ValueType for DiscovererSerializeFlags { unsafe impl<'a> FromValue<'a> for DiscovererSerializeFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -59,6 +59,7 @@ unsafe impl<'a> FromValue<'a> for DiscovererSerializeFlags { } impl ToValue for DiscovererSerializeFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -67,6 +68,7 @@ impl ToValue for DiscovererSerializeFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -112,6 +114,7 @@ bitflags! { impl IntoGlib for PbUtilsCapsDescriptionFlags { type GlibType = ffi::GstPbUtilsCapsDescriptionFlags; + #[inline] fn into_glib(self) -> ffi::GstPbUtilsCapsDescriptionFlags { self.bits() } @@ -121,6 +124,7 @@ impl IntoGlib for PbUtilsCapsDescriptionFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for PbUtilsCapsDescriptionFlags { + #[inline] unsafe fn from_glib(value: ffi::GstPbUtilsCapsDescriptionFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -130,6 +134,7 @@ impl FromGlib for PbUtilsCapsDescriptionFla #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for PbUtilsCapsDescriptionFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pb_utils_caps_description_flags_get_type()) } } @@ -146,6 +151,7 @@ impl glib::value::ValueType for PbUtilsCapsDescriptionFlags { unsafe impl<'a> FromValue<'a> for PbUtilsCapsDescriptionFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -155,6 +161,7 @@ unsafe impl<'a> FromValue<'a> for PbUtilsCapsDescriptionFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for PbUtilsCapsDescriptionFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -163,6 +170,7 @@ impl ToValue for PbUtilsCapsDescriptionFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-pbutils/src/auto/versions.txt b/gstreamer-pbutils/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-pbutils/src/auto/versions.txt +++ b/gstreamer-pbutils/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-pbutils/sys/src/auto/versions.txt b/gstreamer-pbutils/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-pbutils/sys/src/auto/versions.txt +++ b/gstreamer-pbutils/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-play/src/auto/enums.rs b/gstreamer-play/src/auto/enums.rs index 77f011bb7..d47800afa 100644 --- a/gstreamer-play/src/auto/enums.rs +++ b/gstreamer-play/src/auto/enums.rs @@ -4,17 +4,10 @@ // DO NOT EDIT use crate::PlayMediaInfo; -use glib::error::ErrorDomain; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::Quark; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; -use std::mem; -use std::ptr; +use glib::{ + error::ErrorDomain, translate::*, value::FromValue, value::ToValue, Quark, StaticType, Type, +}; +use std::{ffi::CStr, fmt, mem, ptr}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -57,6 +50,7 @@ impl fmt::Display for PlayColorBalanceType { impl IntoGlib for PlayColorBalanceType { type GlibType = ffi::GstPlayColorBalanceType; + #[inline] fn into_glib(self) -> ffi::GstPlayColorBalanceType { match self { Self::Hue => ffi::GST_PLAY_COLOR_BALANCE_HUE, @@ -70,6 +64,7 @@ impl IntoGlib for PlayColorBalanceType { #[doc(hidden)] impl FromGlib for PlayColorBalanceType { + #[inline] unsafe fn from_glib(value: ffi::GstPlayColorBalanceType) -> Self { skip_assert_initialized!(); match value { @@ -83,6 +78,7 @@ impl FromGlib for PlayColorBalanceType { } impl StaticType for PlayColorBalanceType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_play_color_balance_type_get_type()) } } @@ -95,6 +91,7 @@ impl glib::value::ValueType for PlayColorBalanceType { unsafe impl<'a> FromValue<'a> for PlayColorBalanceType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -102,6 +99,7 @@ unsafe impl<'a> FromValue<'a> for PlayColorBalanceType { } impl ToValue for PlayColorBalanceType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -110,6 +108,7 @@ impl ToValue for PlayColorBalanceType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -158,6 +157,7 @@ impl fmt::Display for PlayError { impl IntoGlib for PlayError { type GlibType = ffi::GstPlayError; + #[inline] fn into_glib(self) -> ffi::GstPlayError { match self { Self::Failed => ffi::GST_PLAY_ERROR_FAILED, @@ -168,6 +168,7 @@ impl IntoGlib for PlayError { #[doc(hidden)] impl FromGlib for PlayError { + #[inline] unsafe fn from_glib(value: ffi::GstPlayError) -> Self { skip_assert_initialized!(); match value { @@ -178,26 +179,31 @@ impl FromGlib for PlayError { } impl ErrorDomain for PlayError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_play_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_PLAY_ERROR_FAILED => Some(Self::Failed), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for PlayError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_play_error_get_type()) } } @@ -210,6 +216,7 @@ impl glib::value::ValueType for PlayError { unsafe impl<'a> FromValue<'a> for PlayError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -217,6 +224,7 @@ unsafe impl<'a> FromValue<'a> for PlayError { } impl ToValue for PlayError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -225,6 +233,7 @@ impl ToValue for PlayError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -467,6 +476,7 @@ impl FromGlib for PlayMessage { } impl StaticType for PlayMessage { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_play_message_get_type()) } } @@ -479,6 +489,7 @@ impl glib::value::ValueType for PlayMessage { unsafe impl<'a> FromValue<'a> for PlayMessage { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -486,6 +497,7 @@ unsafe impl<'a> FromValue<'a> for PlayMessage { } impl ToValue for PlayMessage { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -494,6 +506,7 @@ impl ToValue for PlayMessage { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -529,6 +542,7 @@ pub enum PlaySnapshotFormat { impl IntoGlib for PlaySnapshotFormat { type GlibType = ffi::GstPlaySnapshotFormat; + #[inline] fn into_glib(self) -> ffi::GstPlaySnapshotFormat { match self { Self::RawNative => ffi::GST_PLAY_THUMBNAIL_RAW_NATIVE, @@ -543,6 +557,7 @@ impl IntoGlib for PlaySnapshotFormat { #[doc(hidden)] impl FromGlib for PlaySnapshotFormat { + #[inline] unsafe fn from_glib(value: ffi::GstPlaySnapshotFormat) -> Self { skip_assert_initialized!(); match value { @@ -597,6 +612,7 @@ impl fmt::Display for PlayState { impl IntoGlib for PlayState { type GlibType = ffi::GstPlayState; + #[inline] fn into_glib(self) -> ffi::GstPlayState { match self { Self::Stopped => ffi::GST_PLAY_STATE_STOPPED, @@ -610,6 +626,7 @@ impl IntoGlib for PlayState { #[doc(hidden)] impl FromGlib for PlayState { + #[inline] unsafe fn from_glib(value: ffi::GstPlayState) -> Self { skip_assert_initialized!(); match value { @@ -623,6 +640,7 @@ impl FromGlib for PlayState { } impl StaticType for PlayState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_play_state_get_type()) } } @@ -635,6 +653,7 @@ impl glib::value::ValueType for PlayState { unsafe impl<'a> FromValue<'a> for PlayState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -642,6 +661,7 @@ unsafe impl<'a> FromValue<'a> for PlayState { } impl ToValue for PlayState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -650,6 +670,7 @@ impl ToValue for PlayState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-play/src/auto/play.rs b/gstreamer-play/src/auto/play.rs index 168af1be4..9cb478f4f 100644 --- a/gstreamer-play/src/auto/play.rs +++ b/gstreamer-play/src/auto/play.rs @@ -3,22 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::PlayAudioInfo; -use crate::PlayColorBalanceType; -use crate::PlayMediaInfo; -use crate::PlaySubtitleInfo; -use crate::PlayVideoInfo; -use crate::PlayVideoRenderer; -use crate::PlayVisualization; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + PlayAudioInfo, PlayColorBalanceType, PlayMediaInfo, PlaySubtitleInfo, PlayVideoInfo, + PlayVideoRenderer, PlayVisualization, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPlay")] @@ -31,11 +25,11 @@ glib::wrapper! { impl Play { #[doc(alias = "gst_play_new")] - pub fn new(video_renderer: Option<&impl IsA>) -> Play { + pub fn new(video_renderer: Option>) -> Play { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gst_play_new( - video_renderer.map(|p| p.as_ref()).to_glib_full(), + video_renderer.map(|p| p.upcast()).into_glib_ptr(), )) } } diff --git a/gstreamer-play/src/auto/play_media_info.rs b/gstreamer-play/src/auto/play_media_info.rs index a6df5bbcb..257bf41e4 100644 --- a/gstreamer-play/src/auto/play_media_info.rs +++ b/gstreamer-play/src/auto/play_media_info.rs @@ -3,10 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::PlayAudioInfo; -use crate::PlayStreamInfo; -use crate::PlaySubtitleInfo; -use crate::PlayVideoInfo; +use crate::{PlayAudioInfo, PlayStreamInfo, PlaySubtitleInfo, PlayVideoInfo}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-play/src/auto/play_signal_adapter.rs b/gstreamer-play/src/auto/play_signal_adapter.rs index f61d25213..64a473ba4 100644 --- a/gstreamer-play/src/auto/play_signal_adapter.rs +++ b/gstreamer-play/src/auto/play_signal_adapter.rs @@ -3,15 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Play; -use crate::PlayMediaInfo; -use crate::PlayState; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Play, PlayMediaInfo, PlayState}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPlaySignalAdapter")] diff --git a/gstreamer-play/src/auto/play_stream_info.rs b/gstreamer-play/src/auto/play_stream_info.rs index 13a0ea67e..5fc2f133c 100644 --- a/gstreamer-play/src/auto/play_stream_info.rs +++ b/gstreamer-play/src/auto/play_stream_info.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstPlayStreamInfo")] diff --git a/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs b/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs index 49568a36c..0ab060903 100644 --- a/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs +++ b/gstreamer-play/src/auto/play_video_overlay_video_renderer.rs @@ -4,16 +4,12 @@ // DO NOT EDIT use crate::PlayVideoRenderer; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPlayVideoOverlayVideoRenderer")] diff --git a/gstreamer-play/src/auto/play_video_renderer.rs b/gstreamer-play/src/auto/play_video_renderer.rs index a27cd8dc7..f3e40abf7 100644 --- a/gstreamer-play/src/auto/play_video_renderer.rs +++ b/gstreamer-play/src/auto/play_video_renderer.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; +use glib::prelude::*; glib::wrapper! { #[doc(alias = "GstPlayVideoRenderer")] diff --git a/gstreamer-play/src/auto/versions.txt b/gstreamer-play/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-play/src/auto/versions.txt +++ b/gstreamer-play/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-play/sys/src/auto/versions.txt b/gstreamer-play/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-play/sys/src/auto/versions.txt +++ b/gstreamer-play/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-player/src/auto/enums.rs b/gstreamer-player/src/auto/enums.rs index 51171833a..9faf5d623 100644 --- a/gstreamer-player/src/auto/enums.rs +++ b/gstreamer-player/src/auto/enums.rs @@ -3,15 +3,10 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::error::ErrorDomain; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::Quark; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{ + error::ErrorDomain, translate::*, value::FromValue, value::ToValue, Quark, StaticType, Type, +}; +use std::{ffi::CStr, fmt}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -54,6 +49,7 @@ impl fmt::Display for PlayerColorBalanceType { impl IntoGlib for PlayerColorBalanceType { type GlibType = ffi::GstPlayerColorBalanceType; + #[inline] fn into_glib(self) -> ffi::GstPlayerColorBalanceType { match self { Self::Hue => ffi::GST_PLAYER_COLOR_BALANCE_HUE, @@ -67,6 +63,7 @@ impl IntoGlib for PlayerColorBalanceType { #[doc(hidden)] impl FromGlib for PlayerColorBalanceType { + #[inline] unsafe fn from_glib(value: ffi::GstPlayerColorBalanceType) -> Self { skip_assert_initialized!(); match value { @@ -80,6 +77,7 @@ impl FromGlib for PlayerColorBalanceType { } impl StaticType for PlayerColorBalanceType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_player_color_balance_type_get_type()) } } @@ -92,6 +90,7 @@ impl glib::value::ValueType for PlayerColorBalanceType { unsafe impl<'a> FromValue<'a> for PlayerColorBalanceType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -99,6 +98,7 @@ unsafe impl<'a> FromValue<'a> for PlayerColorBalanceType { } impl ToValue for PlayerColorBalanceType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -107,6 +107,7 @@ impl ToValue for PlayerColorBalanceType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -155,6 +156,7 @@ impl fmt::Display for PlayerError { impl IntoGlib for PlayerError { type GlibType = ffi::GstPlayerError; + #[inline] fn into_glib(self) -> ffi::GstPlayerError { match self { Self::Failed => ffi::GST_PLAYER_ERROR_FAILED, @@ -165,6 +167,7 @@ impl IntoGlib for PlayerError { #[doc(hidden)] impl FromGlib for PlayerError { + #[inline] unsafe fn from_glib(value: ffi::GstPlayerError) -> Self { skip_assert_initialized!(); match value { @@ -175,26 +178,31 @@ impl FromGlib for PlayerError { } impl ErrorDomain for PlayerError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_player_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_PLAYER_ERROR_FAILED => Some(Self::Failed), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for PlayerError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_player_error_get_type()) } } @@ -207,6 +215,7 @@ impl glib::value::ValueType for PlayerError { unsafe impl<'a> FromValue<'a> for PlayerError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -214,6 +223,7 @@ unsafe impl<'a> FromValue<'a> for PlayerError { } impl ToValue for PlayerError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -222,6 +232,7 @@ impl ToValue for PlayerError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -257,6 +268,7 @@ pub enum PlayerSnapshotFormat { impl IntoGlib for PlayerSnapshotFormat { type GlibType = ffi::GstPlayerSnapshotFormat; + #[inline] fn into_glib(self) -> ffi::GstPlayerSnapshotFormat { match self { Self::RawNative => ffi::GST_PLAYER_THUMBNAIL_RAW_NATIVE, @@ -271,6 +283,7 @@ impl IntoGlib for PlayerSnapshotFormat { #[doc(hidden)] impl FromGlib for PlayerSnapshotFormat { + #[inline] unsafe fn from_glib(value: ffi::GstPlayerSnapshotFormat) -> Self { skip_assert_initialized!(); match value { @@ -325,6 +338,7 @@ impl fmt::Display for PlayerState { impl IntoGlib for PlayerState { type GlibType = ffi::GstPlayerState; + #[inline] fn into_glib(self) -> ffi::GstPlayerState { match self { Self::Stopped => ffi::GST_PLAYER_STATE_STOPPED, @@ -338,6 +352,7 @@ impl IntoGlib for PlayerState { #[doc(hidden)] impl FromGlib for PlayerState { + #[inline] unsafe fn from_glib(value: ffi::GstPlayerState) -> Self { skip_assert_initialized!(); match value { @@ -351,6 +366,7 @@ impl FromGlib for PlayerState { } impl StaticType for PlayerState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_player_state_get_type()) } } @@ -363,6 +379,7 @@ impl glib::value::ValueType for PlayerState { unsafe impl<'a> FromValue<'a> for PlayerState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -370,6 +387,7 @@ unsafe impl<'a> FromValue<'a> for PlayerState { } impl ToValue for PlayerState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -378,6 +396,7 @@ impl ToValue for PlayerState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index 3300fd02c..b5ac0e5ad 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -3,24 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::PlayerAudioInfo; -use crate::PlayerColorBalanceType; -use crate::PlayerMediaInfo; -use crate::PlayerSignalDispatcher; -use crate::PlayerState; -use crate::PlayerSubtitleInfo; -use crate::PlayerVideoInfo; -use crate::PlayerVideoRenderer; -use crate::PlayerVisualization; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + PlayerAudioInfo, PlayerColorBalanceType, PlayerMediaInfo, PlayerSignalDispatcher, PlayerState, + PlayerSubtitleInfo, PlayerVideoInfo, PlayerVideoRenderer, PlayerVisualization, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPlayer")] @@ -34,14 +26,14 @@ glib::wrapper! { impl Player { #[doc(alias = "gst_player_new")] pub fn new( - video_renderer: Option<&impl IsA>, - signal_dispatcher: Option<&impl IsA>, + video_renderer: Option>, + signal_dispatcher: Option>, ) -> Player { assert_initialized_main_thread!(); unsafe { from_glib_full(ffi::gst_player_new( - video_renderer.map(|p| p.as_ref()).to_glib_full(), - signal_dispatcher.map(|p| p.as_ref()).to_glib_full(), + video_renderer.map(|p| p.upcast()).into_glib_ptr(), + signal_dispatcher.map(|p| p.upcast()).into_glib_ptr(), )) } } diff --git a/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs b/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs index 71c8aafc3..8b81b832b 100644 --- a/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_gmain_context_signal_dispatcher.rs @@ -4,9 +4,7 @@ // DO NOT EDIT use crate::PlayerSignalDispatcher; -use glib::object::ObjectType as ObjectType_; -use glib::translate::*; -use glib::StaticType; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstPlayerGMainContextSignalDispatcher")] diff --git a/gstreamer-player/src/auto/player_media_info.rs b/gstreamer-player/src/auto/player_media_info.rs index 73aa1ca4b..5bbd22c4d 100644 --- a/gstreamer-player/src/auto/player_media_info.rs +++ b/gstreamer-player/src/auto/player_media_info.rs @@ -3,10 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::PlayerAudioInfo; -use crate::PlayerStreamInfo; -use crate::PlayerSubtitleInfo; -use crate::PlayerVideoInfo; +use crate::{PlayerAudioInfo, PlayerStreamInfo, PlayerSubtitleInfo, PlayerVideoInfo}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer-player/src/auto/player_signal_dispatcher.rs b/gstreamer-player/src/auto/player_signal_dispatcher.rs index efb0b6adc..6b2206faf 100644 --- a/gstreamer-player/src/auto/player_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_signal_dispatcher.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; +use glib::prelude::*; glib::wrapper! { #[doc(alias = "GstPlayerSignalDispatcher")] diff --git a/gstreamer-player/src/auto/player_stream_info.rs b/gstreamer-player/src/auto/player_stream_info.rs index a16a1f106..2c337afcf 100644 --- a/gstreamer-player/src/auto/player_stream_info.rs +++ b/gstreamer-player/src/auto/player_stream_info.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstPlayerStreamInfo")] diff --git a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs index 3fe51ad7e..6cbbeab45 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -4,16 +4,12 @@ // DO NOT EDIT use crate::PlayerVideoRenderer; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPlayerVideoOverlayVideoRenderer")] diff --git a/gstreamer-player/src/auto/player_video_renderer.rs b/gstreamer-player/src/auto/player_video_renderer.rs index 2a7ddac27..6d549dfcd 100644 --- a/gstreamer-player/src/auto/player_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_renderer.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; +use glib::prelude::*; glib::wrapper! { #[doc(alias = "GstPlayerVideoRenderer")] diff --git a/gstreamer-player/src/auto/versions.txt b/gstreamer-player/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-player/src/auto/versions.txt +++ b/gstreamer-player/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-player/sys/src/auto/versions.txt b/gstreamer-player/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-player/sys/src/auto/versions.txt +++ b/gstreamer-player/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-rtp/src/auto/enums.rs b/gstreamer-rtp/src/auto/enums.rs index 06fc2ad05..63bdd2b41 100644 --- a/gstreamer-rtp/src/auto/enums.rs +++ b/gstreamer-rtp/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -39,6 +35,7 @@ pub enum RTCPFBType { impl IntoGlib for RTCPFBType { type GlibType = ffi::GstRTCPFBType; + #[inline] fn into_glib(self) -> ffi::GstRTCPFBType { match self { Self::FbTypeInvalid => ffi::GST_RTCP_FB_TYPE_INVALID, @@ -57,6 +54,7 @@ impl IntoGlib for RTCPFBType { #[doc(hidden)] impl FromGlib for RTCPFBType { + #[inline] unsafe fn from_glib(value: ffi::GstRTCPFBType) -> Self { skip_assert_initialized!(); match value { @@ -75,6 +73,7 @@ impl FromGlib for RTCPFBType { } impl StaticType for RTCPFBType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtcpfb_type_get_type()) } } @@ -87,6 +86,7 @@ impl glib::value::ValueType for RTCPFBType { unsafe impl<'a> FromValue<'a> for RTCPFBType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -94,6 +94,7 @@ unsafe impl<'a> FromValue<'a> for RTCPFBType { } impl ToValue for RTCPFBType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -102,6 +103,7 @@ impl ToValue for RTCPFBType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -241,6 +243,7 @@ impl FromGlib for RTCPSDESType { } impl StaticType for RTCPSDESType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtcpsdes_type_get_type()) } } @@ -253,6 +256,7 @@ impl glib::value::ValueType for RTCPSDESType { unsafe impl<'a> FromValue<'a> for RTCPSDESType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -260,6 +264,7 @@ unsafe impl<'a> FromValue<'a> for RTCPSDESType { } impl ToValue for RTCPSDESType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -268,6 +273,7 @@ impl ToValue for RTCPSDESType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -311,6 +317,7 @@ pub enum RTCPType { impl IntoGlib for RTCPType { type GlibType = ffi::GstRTCPType; + #[inline] fn into_glib(self) -> ffi::GstRTCPType { match self { Self::Invalid => ffi::GST_RTCP_TYPE_INVALID, @@ -329,6 +336,7 @@ impl IntoGlib for RTCPType { #[doc(hidden)] impl FromGlib for RTCPType { + #[inline] unsafe fn from_glib(value: ffi::GstRTCPType) -> Self { skip_assert_initialized!(); match value { @@ -347,6 +355,7 @@ impl FromGlib for RTCPType { } impl StaticType for RTCPType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtcp_type_get_type()) } } @@ -359,6 +368,7 @@ impl glib::value::ValueType for RTCPType { unsafe impl<'a> FromValue<'a> for RTCPType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -366,6 +376,7 @@ unsafe impl<'a> FromValue<'a> for RTCPType { } impl ToValue for RTCPType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -374,6 +385,7 @@ impl ToValue for RTCPType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -419,6 +431,7 @@ pub enum RTCPXRType { impl IntoGlib for RTCPXRType { type GlibType = ffi::GstRTCPXRType; + #[inline] fn into_glib(self) -> ffi::GstRTCPXRType { match self { Self::Invalid => ffi::GST_RTCP_XR_TYPE_INVALID, @@ -438,6 +451,7 @@ impl IntoGlib for RTCPXRType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for RTCPXRType { + #[inline] unsafe fn from_glib(value: ffi::GstRTCPXRType) -> Self { skip_assert_initialized!(); match value { @@ -457,6 +471,7 @@ impl FromGlib for RTCPXRType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for RTCPXRType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtcpxr_type_get_type()) } } @@ -473,6 +488,7 @@ impl glib::value::ValueType for RTCPXRType { unsafe impl<'a> FromValue<'a> for RTCPXRType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -482,6 +498,7 @@ unsafe impl<'a> FromValue<'a> for RTCPXRType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for RTCPXRType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -490,6 +507,7 @@ impl ToValue for RTCPXRType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -639,6 +657,7 @@ impl FromGlib for RTPPayload { } impl StaticType for RTPPayload { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_payload_get_type()) } } @@ -651,6 +670,7 @@ impl glib::value::ValueType for RTPPayload { unsafe impl<'a> FromValue<'a> for RTPPayload { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -658,6 +678,7 @@ unsafe impl<'a> FromValue<'a> for RTPPayload { } impl ToValue for RTPPayload { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -666,6 +687,7 @@ impl ToValue for RTPPayload { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -701,6 +723,7 @@ pub enum RTPProfile { impl IntoGlib for RTPProfile { type GlibType = ffi::GstRTPProfile; + #[inline] fn into_glib(self) -> ffi::GstRTPProfile { match self { Self::Unknown => ffi::GST_RTP_PROFILE_UNKNOWN, @@ -715,6 +738,7 @@ impl IntoGlib for RTPProfile { #[doc(hidden)] impl FromGlib for RTPProfile { + #[inline] unsafe fn from_glib(value: ffi::GstRTPProfile) -> Self { skip_assert_initialized!(); match value { @@ -729,6 +753,7 @@ impl FromGlib for RTPProfile { } impl StaticType for RTPProfile { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_profile_get_type()) } } @@ -741,6 +766,7 @@ impl glib::value::ValueType for RTPProfile { unsafe impl<'a> FromValue<'a> for RTPProfile { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -748,6 +774,7 @@ unsafe impl<'a> FromValue<'a> for RTPProfile { } impl ToValue for RTPProfile { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -756,6 +783,7 @@ impl ToValue for RTPProfile { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-rtp/src/auto/flags.rs b/gstreamer-rtp/src/auto/flags.rs index 6f8dfc85e..532b56f60 100644 --- a/gstreamer-rtp/src/auto/flags.rs +++ b/gstreamer-rtp/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; bitflags! { #[doc(alias = "GstRTPBufferFlags")] @@ -24,6 +20,7 @@ bitflags! { impl IntoGlib for RTPBufferFlags { type GlibType = ffi::GstRTPBufferFlags; + #[inline] fn into_glib(self) -> ffi::GstRTPBufferFlags { self.bits() } @@ -31,6 +28,7 @@ impl IntoGlib for RTPBufferFlags { #[doc(hidden)] impl FromGlib for RTPBufferFlags { + #[inline] unsafe fn from_glib(value: ffi::GstRTPBufferFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -38,6 +36,7 @@ impl FromGlib for RTPBufferFlags { } impl StaticType for RTPBufferFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_buffer_flags_get_type()) } } @@ -50,6 +49,7 @@ impl glib::value::ValueType for RTPBufferFlags { unsafe impl<'a> FromValue<'a> for RTPBufferFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -57,6 +57,7 @@ unsafe impl<'a> FromValue<'a> for RTPBufferFlags { } impl ToValue for RTPBufferFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -65,6 +66,7 @@ impl ToValue for RTPBufferFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -90,6 +92,7 @@ bitflags! { impl IntoGlib for RTPBufferMapFlags { type GlibType = ffi::GstRTPBufferMapFlags; + #[inline] fn into_glib(self) -> ffi::GstRTPBufferMapFlags { self.bits() } @@ -97,6 +100,7 @@ impl IntoGlib for RTPBufferMapFlags { #[doc(hidden)] impl FromGlib for RTPBufferMapFlags { + #[inline] unsafe fn from_glib(value: ffi::GstRTPBufferMapFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -104,6 +108,7 @@ impl FromGlib for RTPBufferMapFlags { } impl StaticType for RTPBufferMapFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_buffer_map_flags_get_type()) } } @@ -116,6 +121,7 @@ impl glib::value::ValueType for RTPBufferMapFlags { unsafe impl<'a> FromValue<'a> for RTPBufferMapFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -123,6 +129,7 @@ unsafe impl<'a> FromValue<'a> for RTPBufferMapFlags { } impl ToValue for RTPBufferMapFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -131,6 +138,7 @@ impl ToValue for RTPBufferMapFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -168,6 +176,7 @@ bitflags! { impl IntoGlib for RTPHeaderExtensionDirection { type GlibType = ffi::GstRTPHeaderExtensionDirection; + #[inline] fn into_glib(self) -> ffi::GstRTPHeaderExtensionDirection { self.bits() } @@ -177,6 +186,7 @@ impl IntoGlib for RTPHeaderExtensionDirection { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for RTPHeaderExtensionDirection { + #[inline] unsafe fn from_glib(value: ffi::GstRTPHeaderExtensionDirection) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -186,6 +196,7 @@ impl FromGlib for RTPHeaderExtensionDirecti #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for RTPHeaderExtensionDirection { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_header_extension_direction_get_type()) } } @@ -202,6 +213,7 @@ impl glib::value::ValueType for RTPHeaderExtensionDirection { unsafe impl<'a> FromValue<'a> for RTPHeaderExtensionDirection { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -211,6 +223,7 @@ unsafe impl<'a> FromValue<'a> for RTPHeaderExtensionDirection { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for RTPHeaderExtensionDirection { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -219,6 +232,7 @@ impl ToValue for RTPHeaderExtensionDirection { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -252,6 +266,7 @@ bitflags! { impl IntoGlib for RTPHeaderExtensionFlags { type GlibType = ffi::GstRTPHeaderExtensionFlags; + #[inline] fn into_glib(self) -> ffi::GstRTPHeaderExtensionFlags { self.bits() } @@ -261,6 +276,7 @@ impl IntoGlib for RTPHeaderExtensionFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for RTPHeaderExtensionFlags { + #[inline] unsafe fn from_glib(value: ffi::GstRTPHeaderExtensionFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -270,6 +286,7 @@ impl FromGlib for RTPHeaderExtensionFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for RTPHeaderExtensionFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtp_header_extension_flags_get_type()) } } @@ -286,6 +303,7 @@ impl glib::value::ValueType for RTPHeaderExtensionFlags { unsafe impl<'a> FromValue<'a> for RTPHeaderExtensionFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -295,6 +313,7 @@ unsafe impl<'a> FromValue<'a> for RTPHeaderExtensionFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for RTPHeaderExtensionFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -303,6 +322,7 @@ impl ToValue for RTPHeaderExtensionFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-rtp/src/auto/rtp_base_depayload.rs b/gstreamer-rtp/src/auto/rtp_base_depayload.rs index 014342a63..4137cc705 100644 --- a/gstreamer-rtp/src/auto/rtp_base_depayload.rs +++ b/gstreamer-rtp/src/auto/rtp_base_depayload.rs @@ -6,20 +6,12 @@ #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] use crate::RTPHeaderExtension; -use glib::object::Cast; -use glib::object::IsA; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::object::ObjectExt; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -#[cfg(any(feature = "v1_16", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTPBaseDepayload")] diff --git a/gstreamer-rtp/src/auto/rtp_base_payload.rs b/gstreamer-rtp/src/auto/rtp_base_payload.rs index 828f41777..0f280e9b4 100644 --- a/gstreamer-rtp/src/auto/rtp_base_payload.rs +++ b/gstreamer-rtp/src/auto/rtp_base_payload.rs @@ -6,18 +6,12 @@ #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] use crate::RTPHeaderExtension; -use glib::object::Cast; -use glib::object::IsA; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::object::ObjectExt; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTPBasePayload")] diff --git a/gstreamer-rtp/src/auto/rtp_header_extension.rs b/gstreamer-rtp/src/auto/rtp_header_extension.rs index 910d7851b..3c122371a 100644 --- a/gstreamer-rtp/src/auto/rtp_header_extension.rs +++ b/gstreamer-rtp/src/auto/rtp_header_extension.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTPHeaderExtensionDirection; -use crate::RTPHeaderExtensionFlags; -use glib::object::IsA; -use glib::translate::*; +use crate::{RTPHeaderExtensionDirection, RTPHeaderExtensionFlags}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstRTPHeaderExtension")] diff --git a/gstreamer-rtp/src/auto/versions.txt b/gstreamer-rtp/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-rtp/src/auto/versions.txt +++ b/gstreamer-rtp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-rtp/sys/src/auto/versions.txt b/gstreamer-rtp/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-rtp/sys/src/auto/versions.txt +++ b/gstreamer-rtp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-rtsp-server/src/auto/enums.rs b/gstreamer-rtsp-server/src/auto/enums.rs index a014f751e..7fa4bae5d 100644 --- a/gstreamer-rtsp-server/src/auto/enums.rs +++ b/gstreamer-rtsp-server/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -31,6 +27,7 @@ pub enum RTSPAddressPoolResult { impl IntoGlib for RTSPAddressPoolResult { type GlibType = ffi::GstRTSPAddressPoolResult; + #[inline] fn into_glib(self) -> ffi::GstRTSPAddressPoolResult { match self { Self::Ok => ffi::GST_RTSP_ADDRESS_POOL_OK, @@ -45,6 +42,7 @@ impl IntoGlib for RTSPAddressPoolResult { #[doc(hidden)] impl FromGlib for RTSPAddressPoolResult { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPAddressPoolResult) -> Self { skip_assert_initialized!(); match value { @@ -76,6 +74,7 @@ pub enum RTSPFilterResult { impl IntoGlib for RTSPFilterResult { type GlibType = ffi::GstRTSPFilterResult; + #[inline] fn into_glib(self) -> ffi::GstRTSPFilterResult { match self { Self::Remove => ffi::GST_RTSP_FILTER_REMOVE, @@ -88,6 +87,7 @@ impl IntoGlib for RTSPFilterResult { #[doc(hidden)] impl FromGlib for RTSPFilterResult { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPFilterResult) -> Self { skip_assert_initialized!(); match value { @@ -123,6 +123,7 @@ pub enum RTSPMediaStatus { impl IntoGlib for RTSPMediaStatus { type GlibType = ffi::GstRTSPMediaStatus; + #[inline] fn into_glib(self) -> ffi::GstRTSPMediaStatus { match self { Self::Unprepared => ffi::GST_RTSP_MEDIA_STATUS_UNPREPARED, @@ -138,6 +139,7 @@ impl IntoGlib for RTSPMediaStatus { #[doc(hidden)] impl FromGlib for RTSPMediaStatus { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPMediaStatus) -> Self { skip_assert_initialized!(); match value { @@ -170,6 +172,7 @@ pub enum RTSPPublishClockMode { impl IntoGlib for RTSPPublishClockMode { type GlibType = ffi::GstRTSPPublishClockMode; + #[inline] fn into_glib(self) -> ffi::GstRTSPPublishClockMode { match self { Self::None => ffi::GST_RTSP_PUBLISH_CLOCK_MODE_NONE, @@ -182,6 +185,7 @@ impl IntoGlib for RTSPPublishClockMode { #[doc(hidden)] impl FromGlib for RTSPPublishClockMode { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPPublishClockMode) -> Self { skip_assert_initialized!(); match value { @@ -194,6 +198,7 @@ impl FromGlib for RTSPPublishClockMode { } impl StaticType for RTSPPublishClockMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_publish_clock_mode_get_type()) } } @@ -206,6 +211,7 @@ impl glib::value::ValueType for RTSPPublishClockMode { unsafe impl<'a> FromValue<'a> for RTSPPublishClockMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -213,6 +219,7 @@ unsafe impl<'a> FromValue<'a> for RTSPPublishClockMode { } impl ToValue for RTSPPublishClockMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -221,6 +228,7 @@ impl ToValue for RTSPPublishClockMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -252,6 +260,7 @@ pub enum RTSPSuspendMode { impl IntoGlib for RTSPSuspendMode { type GlibType = ffi::GstRTSPSuspendMode; + #[inline] fn into_glib(self) -> ffi::GstRTSPSuspendMode { match self { Self::None => ffi::GST_RTSP_SUSPEND_MODE_NONE, @@ -264,6 +273,7 @@ impl IntoGlib for RTSPSuspendMode { #[doc(hidden)] impl FromGlib for RTSPSuspendMode { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPSuspendMode) -> Self { skip_assert_initialized!(); match value { @@ -276,6 +286,7 @@ impl FromGlib for RTSPSuspendMode { } impl StaticType for RTSPSuspendMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_suspend_mode_get_type()) } } @@ -288,6 +299,7 @@ impl glib::value::ValueType for RTSPSuspendMode { unsafe impl<'a> FromValue<'a> for RTSPSuspendMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -295,6 +307,7 @@ unsafe impl<'a> FromValue<'a> for RTSPSuspendMode { } impl ToValue for RTSPSuspendMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -303,6 +316,7 @@ impl ToValue for RTSPSuspendMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -332,6 +346,7 @@ pub enum RTSPThreadType { impl IntoGlib for RTSPThreadType { type GlibType = ffi::GstRTSPThreadType; + #[inline] fn into_glib(self) -> ffi::GstRTSPThreadType { match self { Self::Client => ffi::GST_RTSP_THREAD_TYPE_CLIENT, @@ -343,6 +358,7 @@ impl IntoGlib for RTSPThreadType { #[doc(hidden)] impl FromGlib for RTSPThreadType { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPThreadType) -> Self { skip_assert_initialized!(); match value { diff --git a/gstreamer-rtsp-server/src/auto/flags.rs b/gstreamer-rtsp-server/src/auto/flags.rs index 62946b350..0f1a069f2 100644 --- a/gstreamer-rtsp-server/src/auto/flags.rs +++ b/gstreamer-rtsp-server/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; bitflags! { #[doc(alias = "GstRTSPAddressFlags")] @@ -30,6 +26,7 @@ bitflags! { impl IntoGlib for RTSPAddressFlags { type GlibType = ffi::GstRTSPAddressFlags; + #[inline] fn into_glib(self) -> ffi::GstRTSPAddressFlags { self.bits() } @@ -37,6 +34,7 @@ impl IntoGlib for RTSPAddressFlags { #[doc(hidden)] impl FromGlib for RTSPAddressFlags { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPAddressFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -57,6 +55,7 @@ bitflags! { impl IntoGlib for RTSPTransportMode { type GlibType = ffi::GstRTSPTransportMode; + #[inline] fn into_glib(self) -> ffi::GstRTSPTransportMode { self.bits() } @@ -64,6 +63,7 @@ impl IntoGlib for RTSPTransportMode { #[doc(hidden)] impl FromGlib for RTSPTransportMode { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPTransportMode) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -71,6 +71,7 @@ impl FromGlib for RTSPTransportMode { } impl StaticType for RTSPTransportMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_transport_mode_get_type()) } } @@ -83,6 +84,7 @@ impl glib::value::ValueType for RTSPTransportMode { unsafe impl<'a> FromValue<'a> for RTSPTransportMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -90,6 +92,7 @@ unsafe impl<'a> FromValue<'a> for RTSPTransportMode { } impl ToValue for RTSPTransportMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -98,6 +101,7 @@ impl ToValue for RTSPTransportMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs index c18a7317e..8b14da15f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_address_pool.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPAddress; -use crate::RTSPAddressFlags; -use glib::object::IsA; -use glib::translate::*; +use crate::{RTSPAddress, RTSPAddressFlags}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstRTSPAddressPool")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs index 7b7fceeb3..b02e34183 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_auth.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_auth.rs @@ -4,13 +4,12 @@ // DO NOT EDIT use crate::RTSPToken; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPAuth")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_client.rs index 9f80e444f..e14a3e271 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_client.rs @@ -3,25 +3,19 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPAuth; -use crate::RTSPContext; -use crate::RTSPFilterResult; -use crate::RTSPMountPoints; -use crate::RTSPSession; -use crate::RTSPSessionPool; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::RTSPStreamTransport; -use crate::RTSPThreadPool; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + RTSPAuth, RTSPContext, RTSPFilterResult, RTSPMountPoints, RTSPSession, RTSPSessionPool, + RTSPThreadPool, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPClient")] @@ -103,7 +97,7 @@ pub trait RTSPClientExt: 'static { fn set_auth(&self, auth: Option<&impl IsA>); //#[doc(alias = "gst_rtsp_client_set_connection")] - //fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool; + //fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -440,7 +434,7 @@ impl> RTSPClientExt for O { } } - //fn set_connection(&self, conn: /*Ignored*/&mut gst_rtsp::RTSPConnection) -> bool { + //fn set_connection(&self, conn: /*Ignored*/gst_rtsp::RTSPConnection) -> bool { // unsafe { TODO: call ffi:gst_rtsp_client_set_connection() } //} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_media.rs index d784fd7b2..37c3b5d78 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media.rs @@ -3,26 +3,19 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPAddressPool; -use crate::RTSPMediaStatus; -use crate::RTSPPublishClockMode; -use crate::RTSPStream; -use crate::RTSPStreamTransport; -use crate::RTSPSuspendMode; -use crate::RTSPThread; -use crate::RTSPTransportMode; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; +use crate::{ + RTSPAddressPool, RTSPMediaStatus, RTSPPublishClockMode, RTSPStream, RTSPStreamTransport, + RTSPSuspendMode, RTSPThread, RTSPTransportMode, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::mem; -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPMedia")] @@ -37,9 +30,9 @@ impl RTSPMedia { pub const NONE: Option<&'static RTSPMedia> = None; #[doc(alias = "gst_rtsp_media_new")] - pub fn new(element: &impl IsA) -> RTSPMedia { + pub fn new(element: impl IsA) -> RTSPMedia { assert_initialized_main_thread!(); - unsafe { from_glib_full(ffi::gst_rtsp_media_new(element.as_ref().to_glib_full())) } + unsafe { from_glib_full(ffi::gst_rtsp_media_new(element.upcast().into_glib_ptr())) } } } @@ -207,7 +200,7 @@ pub trait RTSPMediaExt: 'static { fn n_streams(&self) -> u32; #[doc(alias = "gst_rtsp_media_prepare")] - fn prepare(&self, thread: Option<&RTSPThread>) -> Result<(), glib::error::BoolError>; + fn prepare(&self, thread: Option) -> Result<(), glib::error::BoolError>; //#[doc(alias = "gst_rtsp_media_seek")] //fn seek(&self, range: /*Ignored*/&mut gst_rtsp::RTSPTimeRange) -> bool; @@ -773,10 +766,10 @@ impl> RTSPMediaExt for O { unsafe { ffi::gst_rtsp_media_n_streams(self.as_ref().to_glib_none().0) } } - fn prepare(&self, thread: Option<&RTSPThread>) -> Result<(), glib::error::BoolError> { + fn prepare(&self, thread: Option) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( - ffi::gst_rtsp_media_prepare(self.as_ref().to_glib_none().0, thread.to_glib_full()), + ffi::gst_rtsp_media_prepare(self.as_ref().to_glib_none().0, thread.into_glib_ptr()), "Failed to prepare media" ) } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs index 8782faa40..a8b93a857 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory.rs @@ -3,20 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPAddressPool; -use crate::RTSPMedia; -use crate::RTSPPublishClockMode; -use crate::RTSPSuspendMode; -use crate::RTSPTransportMode; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{RTSPAddressPool, RTSPMedia, RTSPPublishClockMode, RTSPSuspendMode, RTSPTransportMode}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPMediaFactory")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs index 14fe82e60..7e048831c 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_media_factory_uri.rs @@ -4,15 +4,12 @@ // DO NOT EDIT use crate::RTSPMediaFactory; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPMediaFactoryURI")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs index a34ff5c69..e5ea40d42 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_mount_points.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::RTSPMediaFactory; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::mem; glib::wrapper! { @@ -38,7 +37,7 @@ unsafe impl Sync for RTSPMountPoints {} pub trait RTSPMountPointsExt: 'static { #[doc(alias = "gst_rtsp_mount_points_add_factory")] - fn add_factory(&self, path: &str, factory: &impl IsA); + fn add_factory(&self, path: &str, factory: impl IsA); #[doc(alias = "gst_rtsp_mount_points_make_path")] fn make_path(&self, url: &gst_rtsp::RTSPUrl) -> Result; @@ -52,12 +51,12 @@ pub trait RTSPMountPointsExt: 'static { } impl> RTSPMountPointsExt for O { - fn add_factory(&self, path: &str, factory: &impl IsA) { + fn add_factory(&self, path: &str, factory: impl IsA) { unsafe { ffi::gst_rtsp_mount_points_add_factory( self.as_ref().to_glib_none().0, path.to_glib_none().0, - factory.as_ref().to_glib_full(), + factory.upcast().into_glib_ptr(), ); } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_client.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_client.rs index 98a31fc5c..e35a954d2 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_client.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_client.rs @@ -6,10 +6,7 @@ use crate::RTSPClient; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::object::Cast; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstRTSPOnvifClient")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs index e8cfa8562..8e0add493 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::RTSPMedia; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstRTSPOnvifMedia")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs index a48e99675..d5c74f04a 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_media_factory.rs @@ -4,9 +4,7 @@ // DO NOT EDIT use crate::RTSPMediaFactory; -use glib::object::Cast; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstRTSPOnvifMediaFactory")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_onvif_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_onvif_server.rs index a223bf9a2..170291385 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_onvif_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_onvif_server.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::RTSPServer; -use glib::object::Cast; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstRTSPOnvifServer")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_server.rs b/gstreamer-rtsp-server/src/auto/rtsp_server.rs index 4e5d718d6..c119ad97f 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_server.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_server.rs @@ -3,22 +3,15 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPAuth; -use crate::RTSPClient; -use crate::RTSPFilterResult; -use crate::RTSPMountPoints; -use crate::RTSPSessionPool; -use crate::RTSPThreadPool; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{ + RTSPAuth, RTSPClient, RTSPFilterResult, RTSPMountPoints, RTSPSessionPool, RTSPThreadPool, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GstRTSPServer")] @@ -153,7 +146,7 @@ pub trait RTSPServerExt: 'static { #[doc(alias = "gst_rtsp_server_transfer_connection")] fn transfer_connection( &self, - socket: &impl IsA, + socket: impl IsA, ip: &str, port: i32, initial_buffer: Option<&str>, @@ -420,7 +413,7 @@ impl> RTSPServerExt for O { fn transfer_connection( &self, - socket: &impl IsA, + socket: impl IsA, ip: &str, port: i32, initial_buffer: Option<&str>, @@ -429,7 +422,7 @@ impl> RTSPServerExt for O { glib::result_from_gboolean!( ffi::gst_rtsp_server_transfer_connection( self.as_ref().to_glib_none().0, - socket.as_ref().to_glib_full(), + socket.upcast().into_glib_ptr(), ip.to_glib_none().0, port, initial_buffer.to_glib_none().0 diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session.rs b/gstreamer-rtsp-server/src/auto/rtsp_session.rs index 36f1156db..325db8b26 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPFilterResult; -use crate::RTSPMedia; -use crate::RTSPSessionMedia; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{RTSPFilterResult, RTSPMedia, RTSPSessionMedia}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPSession")] @@ -67,7 +62,7 @@ pub trait RTSPSessionExt: 'static { fn is_expired_usec(&self, now: i64) -> bool; #[doc(alias = "gst_rtsp_session_manage_media")] - fn manage_media(&self, path: &str, media: &impl IsA) -> RTSPSessionMedia; + fn manage_media(&self, path: &str, media: impl IsA) -> RTSPSessionMedia; //#[doc(alias = "gst_rtsp_session_next_timeout")] //fn next_timeout(&self, now: /*Ignored*/&mut glib::TimeVal) -> i32; @@ -200,12 +195,12 @@ impl> RTSPSessionExt for O { } } - fn manage_media(&self, path: &str, media: &impl IsA) -> RTSPSessionMedia { + fn manage_media(&self, path: &str, media: impl IsA) -> RTSPSessionMedia { unsafe { from_glib_none(ffi::gst_rtsp_session_manage_media( self.as_ref().to_glib_none().0, path.to_glib_none().0, - media.as_ref().to_glib_full(), + media.upcast().into_glib_ptr(), )) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs index e7404a859..7e7e16ec7 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_media.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPMedia; -use crate::RTSPStreamTransport; -use glib::object::IsA; -use glib::translate::*; +use crate::{RTSPMedia, RTSPStreamTransport}; +use glib::{prelude::*, translate::*}; use std::mem; glib::wrapper! { @@ -22,12 +20,12 @@ impl RTSPSessionMedia { pub const NONE: Option<&'static RTSPSessionMedia> = None; #[doc(alias = "gst_rtsp_session_media_new")] - pub fn new(path: &str, media: &impl IsA) -> RTSPSessionMedia { + pub fn new(path: &str, media: impl IsA) -> RTSPSessionMedia { skip_assert_initialized!(); unsafe { from_glib_full(ffi::gst_rtsp_session_media_new( path.to_glib_none().0, - media.as_ref().to_glib_full(), + media.upcast().into_glib_ptr(), )) } } @@ -74,7 +72,7 @@ pub trait RTSPSessionMediaExt: 'static { fn set_state(&self, state: gst::State) -> Result<(), glib::error::BoolError>; //#[doc(alias = "gst_rtsp_session_media_set_transport")] - //fn set_transport(&self, stream: &impl IsA, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> RTSPStreamTransport; + //fn set_transport(&self, stream: &impl IsA, tr: /*Ignored*/gst_rtsp::RTSPTransport) -> RTSPStreamTransport; } impl> RTSPSessionMediaExt for O { @@ -159,7 +157,7 @@ impl> RTSPSessionMediaExt for O { } } - //fn set_transport(&self, stream: &impl IsA, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> RTSPStreamTransport { + //fn set_transport(&self, stream: &impl IsA, tr: /*Ignored*/gst_rtsp::RTSPTransport) -> RTSPStreamTransport { // unsafe { TODO: call ffi:gst_rtsp_session_media_set_transport() } //} } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs index 27d346b13..e7293350d 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_session_pool.rs @@ -3,15 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPFilterResult; -use crate::RTSPSession; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{RTSPFilterResult, RTSPSession}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPSessionPool")] diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs index 5db8a976c..b807e3487 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream.rs @@ -3,19 +3,15 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPAddress; -use crate::RTSPAddressPool; -use crate::RTSPFilterResult; -use crate::RTSPPublishClockMode; -use crate::RTSPStreamTransport; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use crate::{ + RTSPAddress, RTSPAddressPool, RTSPFilterResult, RTSPPublishClockMode, RTSPStreamTransport, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPStream")] @@ -272,10 +268,10 @@ pub trait RTSPStreamExt: 'static { ) -> Result<(), glib::error::BoolError>; #[doc(alias = "gst_rtsp_stream_recv_rtcp")] - fn recv_rtcp(&self, buffer: &gst::Buffer) -> Result; + fn recv_rtcp(&self, buffer: gst::Buffer) -> Result; #[doc(alias = "gst_rtsp_stream_recv_rtp")] - fn recv_rtp(&self, buffer: &gst::Buffer) -> Result; + fn recv_rtp(&self, buffer: gst::Buffer) -> Result; #[doc(alias = "gst_rtsp_stream_remove_transport")] fn remove_transport( @@ -882,20 +878,20 @@ impl> RTSPStreamExt for O { } } - fn recv_rtcp(&self, buffer: &gst::Buffer) -> Result { + fn recv_rtcp(&self, buffer: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_rtsp_stream_recv_rtcp( self.as_ref().to_glib_none().0, - buffer.to_glib_full(), + buffer.into_glib_ptr(), )) } } - fn recv_rtp(&self, buffer: &gst::Buffer) -> Result { + fn recv_rtp(&self, buffer: gst::Buffer) -> Result { unsafe { try_from_glib(ffi::gst_rtsp_stream_recv_rtp( self.as_ref().to_glib_none().0, - buffer.to_glib_full(), + buffer.into_glib_ptr(), )) } } diff --git a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs index fb508f86d..128c757d0 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_stream_transport.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::RTSPStream; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::boxed::Box as Box_; glib::wrapper! { @@ -21,7 +20,7 @@ impl RTSPStreamTransport { pub const NONE: Option<&'static RTSPStreamTransport> = None; //#[doc(alias = "gst_rtsp_stream_transport_new")] - //pub fn new(stream: &impl IsA, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) -> RTSPStreamTransport { + //pub fn new(stream: &impl IsA, tr: /*Ignored*/gst_rtsp::RTSPTransport) -> RTSPStreamTransport { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_new() } //} } @@ -58,7 +57,7 @@ pub trait RTSPStreamTransportExt: 'static { fn recv_data( &self, channel: u32, - buffer: &gst::Buffer, + buffer: gst::Buffer, ) -> Result; #[doc(alias = "gst_rtsp_stream_transport_send_rtcp")] @@ -103,7 +102,7 @@ pub trait RTSPStreamTransportExt: 'static { fn set_timed_out(&self, timedout: bool); //#[doc(alias = "gst_rtsp_stream_transport_set_transport")] - //fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport); + //fn set_transport(&self, tr: /*Ignored*/gst_rtsp::RTSPTransport); #[doc(alias = "gst_rtsp_stream_transport_set_url")] fn set_url(&self, url: Option<&gst_rtsp::RTSPUrl>); @@ -164,13 +163,13 @@ impl> RTSPStreamTransportExt for O { fn recv_data( &self, channel: u32, - buffer: &gst::Buffer, + buffer: gst::Buffer, ) -> Result { unsafe { try_from_glib(ffi::gst_rtsp_stream_transport_recv_data( self.as_ref().to_glib_none().0, channel, - buffer.to_glib_full(), + buffer.into_glib_ptr(), )) } } @@ -316,7 +315,7 @@ impl> RTSPStreamTransportExt for O { } } - //fn set_transport(&self, tr: /*Ignored*/&mut gst_rtsp::RTSPTransport) { + //fn set_transport(&self, tr: /*Ignored*/gst_rtsp::RTSPTransport) { // unsafe { TODO: call ffi:gst_rtsp_stream_transport_set_transport() } //} diff --git a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs index 96d88a7ff..ca5e84568 100644 --- a/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs +++ b/gstreamer-rtsp-server/src/auto/rtsp_thread_pool.rs @@ -3,16 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::RTSPContext; -use crate::RTSPThread; -use crate::RTSPThreadType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{RTSPContext, RTSPThread, RTSPThreadType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRTSPThreadPool")] diff --git a/gstreamer-rtsp-server/src/auto/versions.txt b/gstreamer-rtsp-server/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-rtsp-server/src/auto/versions.txt +++ b/gstreamer-rtsp-server/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-rtsp-server/sys/src/auto/versions.txt b/gstreamer-rtsp-server/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-rtsp-server/sys/src/auto/versions.txt +++ b/gstreamer-rtsp-server/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-rtsp/src/auto/enums.rs b/gstreamer-rtsp/src/auto/enums.rs index 926e1ae6f..dbab73cc3 100644 --- a/gstreamer-rtsp/src/auto/enums.rs +++ b/gstreamer-rtsp/src/auto/enums.rs @@ -3,11 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -27,6 +23,7 @@ pub enum RTSPAuthMethod { impl IntoGlib for RTSPAuthMethod { type GlibType = ffi::GstRTSPAuthMethod; + #[inline] fn into_glib(self) -> ffi::GstRTSPAuthMethod { match self { Self::None => ffi::GST_RTSP_AUTH_NONE, @@ -39,6 +36,7 @@ impl IntoGlib for RTSPAuthMethod { #[doc(hidden)] impl FromGlib for RTSPAuthMethod { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPAuthMethod) -> Self { skip_assert_initialized!(); match value { @@ -51,6 +49,7 @@ impl FromGlib for RTSPAuthMethod { } impl StaticType for RTSPAuthMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_auth_method_get_type()) } } @@ -63,6 +62,7 @@ impl glib::value::ValueType for RTSPAuthMethod { unsafe impl<'a> FromValue<'a> for RTSPAuthMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -70,6 +70,7 @@ unsafe impl<'a> FromValue<'a> for RTSPAuthMethod { } impl ToValue for RTSPAuthMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -78,6 +79,7 @@ impl ToValue for RTSPAuthMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -109,6 +111,7 @@ pub enum RTSPFamily { impl IntoGlib for RTSPFamily { type GlibType = ffi::GstRTSPFamily; + #[inline] fn into_glib(self) -> ffi::GstRTSPFamily { match self { Self::None => ffi::GST_RTSP_FAM_NONE, @@ -121,6 +124,7 @@ impl IntoGlib for RTSPFamily { #[doc(hidden)] impl FromGlib for RTSPFamily { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPFamily) -> Self { skip_assert_initialized!(); match value { @@ -133,6 +137,7 @@ impl FromGlib for RTSPFamily { } impl StaticType for RTSPFamily { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_family_get_type()) } } @@ -145,6 +150,7 @@ impl glib::value::ValueType for RTSPFamily { unsafe impl<'a> FromValue<'a> for RTSPFamily { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -152,6 +158,7 @@ unsafe impl<'a> FromValue<'a> for RTSPFamily { } impl ToValue for RTSPFamily { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -160,6 +167,7 @@ impl ToValue for RTSPFamily { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -563,6 +571,7 @@ impl FromGlib for RTSPHeaderField { } impl StaticType for RTSPHeaderField { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_header_field_get_type()) } } @@ -575,6 +584,7 @@ impl glib::value::ValueType for RTSPHeaderField { unsafe impl<'a> FromValue<'a> for RTSPHeaderField { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -582,6 +592,7 @@ unsafe impl<'a> FromValue<'a> for RTSPHeaderField { } impl ToValue for RTSPHeaderField { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -590,6 +601,7 @@ impl ToValue for RTSPHeaderField { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -627,6 +639,7 @@ pub enum RTSPMsgType { impl IntoGlib for RTSPMsgType { type GlibType = ffi::GstRTSPMsgType; + #[inline] fn into_glib(self) -> ffi::GstRTSPMsgType { match self { Self::Invalid => ffi::GST_RTSP_MESSAGE_INVALID, @@ -642,6 +655,7 @@ impl IntoGlib for RTSPMsgType { #[doc(hidden)] impl FromGlib for RTSPMsgType { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPMsgType) -> Self { skip_assert_initialized!(); match value { @@ -657,6 +671,7 @@ impl FromGlib for RTSPMsgType { } impl StaticType for RTSPMsgType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_msg_type_get_type()) } } @@ -669,6 +684,7 @@ impl glib::value::ValueType for RTSPMsgType { unsafe impl<'a> FromValue<'a> for RTSPMsgType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -676,6 +692,7 @@ unsafe impl<'a> FromValue<'a> for RTSPMsgType { } impl ToValue for RTSPMsgType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -684,6 +701,7 @@ impl ToValue for RTSPMsgType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -719,6 +737,7 @@ pub enum RTSPRangeUnit { impl IntoGlib for RTSPRangeUnit { type GlibType = ffi::GstRTSPRangeUnit; + #[inline] fn into_glib(self) -> ffi::GstRTSPRangeUnit { match self { Self::Smpte => ffi::GST_RTSP_RANGE_SMPTE, @@ -733,6 +752,7 @@ impl IntoGlib for RTSPRangeUnit { #[doc(hidden)] impl FromGlib for RTSPRangeUnit { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPRangeUnit) -> Self { skip_assert_initialized!(); match value { @@ -747,6 +767,7 @@ impl FromGlib for RTSPRangeUnit { } impl StaticType for RTSPRangeUnit { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_range_unit_get_type()) } } @@ -759,6 +780,7 @@ impl glib::value::ValueType for RTSPRangeUnit { unsafe impl<'a> FromValue<'a> for RTSPRangeUnit { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -766,6 +788,7 @@ unsafe impl<'a> FromValue<'a> for RTSPRangeUnit { } impl ToValue for RTSPRangeUnit { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -774,6 +797,7 @@ impl ToValue for RTSPRangeUnit { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -889,6 +913,7 @@ impl FromGlib for RTSPResult { } impl StaticType for RTSPResult { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_result_get_type()) } } @@ -901,6 +926,7 @@ impl glib::value::ValueType for RTSPResult { unsafe impl<'a> FromValue<'a> for RTSPResult { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -908,6 +934,7 @@ unsafe impl<'a> FromValue<'a> for RTSPResult { } impl ToValue for RTSPResult { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -916,6 +943,7 @@ impl ToValue for RTSPResult { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -953,6 +981,7 @@ pub enum RTSPState { impl IntoGlib for RTSPState { type GlibType = ffi::GstRTSPState; + #[inline] fn into_glib(self) -> ffi::GstRTSPState { match self { Self::Invalid => ffi::GST_RTSP_STATE_INVALID, @@ -968,6 +997,7 @@ impl IntoGlib for RTSPState { #[doc(hidden)] impl FromGlib for RTSPState { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPState) -> Self { skip_assert_initialized!(); match value { @@ -983,6 +1013,7 @@ impl FromGlib for RTSPState { } impl StaticType for RTSPState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_state_get_type()) } } @@ -995,6 +1026,7 @@ impl glib::value::ValueType for RTSPState { unsafe impl<'a> FromValue<'a> for RTSPState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1002,6 +1034,7 @@ unsafe impl<'a> FromValue<'a> for RTSPState { } impl ToValue for RTSPState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1010,6 +1043,7 @@ impl ToValue for RTSPState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1245,6 +1279,7 @@ impl FromGlib for RTSPStatusCode { } impl StaticType for RTSPStatusCode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_status_code_get_type()) } } @@ -1257,6 +1292,7 @@ impl glib::value::ValueType for RTSPStatusCode { unsafe impl<'a> FromValue<'a> for RTSPStatusCode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1264,6 +1300,7 @@ unsafe impl<'a> FromValue<'a> for RTSPStatusCode { } impl ToValue for RTSPStatusCode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1272,6 +1309,7 @@ impl ToValue for RTSPStatusCode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1307,6 +1345,7 @@ pub enum RTSPTimeType { impl IntoGlib for RTSPTimeType { type GlibType = ffi::GstRTSPTimeType; + #[inline] fn into_glib(self) -> ffi::GstRTSPTimeType { match self { Self::Seconds => ffi::GST_RTSP_TIME_SECONDS, @@ -1321,6 +1360,7 @@ impl IntoGlib for RTSPTimeType { #[doc(hidden)] impl FromGlib for RTSPTimeType { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPTimeType) -> Self { skip_assert_initialized!(); match value { @@ -1335,6 +1375,7 @@ impl FromGlib for RTSPTimeType { } impl StaticType for RTSPTimeType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_time_type_get_type()) } } @@ -1347,6 +1388,7 @@ impl glib::value::ValueType for RTSPTimeType { unsafe impl<'a> FromValue<'a> for RTSPTimeType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1354,6 +1396,7 @@ unsafe impl<'a> FromValue<'a> for RTSPTimeType { } impl ToValue for RTSPTimeType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1362,6 +1405,7 @@ impl ToValue for RTSPTimeType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-rtsp/src/auto/flags.rs b/gstreamer-rtsp/src/auto/flags.rs index 27071335f..1a2e80fb6 100644 --- a/gstreamer-rtsp/src/auto/flags.rs +++ b/gstreamer-rtsp/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; bitflags! { #[doc(alias = "GstRTSPEvent")] @@ -24,6 +20,7 @@ bitflags! { impl IntoGlib for RTSPEvent { type GlibType = ffi::GstRTSPEvent; + #[inline] fn into_glib(self) -> ffi::GstRTSPEvent { self.bits() } @@ -31,6 +28,7 @@ impl IntoGlib for RTSPEvent { #[doc(hidden)] impl FromGlib for RTSPEvent { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPEvent) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -38,6 +36,7 @@ impl FromGlib for RTSPEvent { } impl StaticType for RTSPEvent { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_event_get_type()) } } @@ -50,6 +49,7 @@ impl glib::value::ValueType for RTSPEvent { unsafe impl<'a> FromValue<'a> for RTSPEvent { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -57,6 +57,7 @@ unsafe impl<'a> FromValue<'a> for RTSPEvent { } impl ToValue for RTSPEvent { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -65,6 +66,7 @@ impl ToValue for RTSPEvent { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -98,6 +100,7 @@ bitflags! { impl IntoGlib for RTSPLowerTrans { type GlibType = ffi::GstRTSPLowerTrans; + #[inline] fn into_glib(self) -> ffi::GstRTSPLowerTrans { self.bits() } @@ -105,6 +108,7 @@ impl IntoGlib for RTSPLowerTrans { #[doc(hidden)] impl FromGlib for RTSPLowerTrans { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPLowerTrans) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -112,6 +116,7 @@ impl FromGlib for RTSPLowerTrans { } impl StaticType for RTSPLowerTrans { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_lower_trans_get_type()) } } @@ -124,6 +129,7 @@ impl glib::value::ValueType for RTSPLowerTrans { unsafe impl<'a> FromValue<'a> for RTSPLowerTrans { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -131,6 +137,7 @@ unsafe impl<'a> FromValue<'a> for RTSPLowerTrans { } impl ToValue for RTSPLowerTrans { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -139,6 +146,7 @@ impl ToValue for RTSPLowerTrans { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -196,6 +204,7 @@ impl RTSPMethod { impl IntoGlib for RTSPMethod { type GlibType = ffi::GstRTSPMethod; + #[inline] fn into_glib(self) -> ffi::GstRTSPMethod { self.bits() } @@ -203,6 +212,7 @@ impl IntoGlib for RTSPMethod { #[doc(hidden)] impl FromGlib for RTSPMethod { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPMethod) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -210,6 +220,7 @@ impl FromGlib for RTSPMethod { } impl StaticType for RTSPMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_method_get_type()) } } @@ -222,6 +233,7 @@ impl glib::value::ValueType for RTSPMethod { unsafe impl<'a> FromValue<'a> for RTSPMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -229,6 +241,7 @@ unsafe impl<'a> FromValue<'a> for RTSPMethod { } impl ToValue for RTSPMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -237,6 +250,7 @@ impl ToValue for RTSPMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -268,6 +282,7 @@ bitflags! { impl IntoGlib for RTSPProfile { type GlibType = ffi::GstRTSPProfile; + #[inline] fn into_glib(self) -> ffi::GstRTSPProfile { self.bits() } @@ -275,6 +290,7 @@ impl IntoGlib for RTSPProfile { #[doc(hidden)] impl FromGlib for RTSPProfile { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPProfile) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -282,6 +298,7 @@ impl FromGlib for RTSPProfile { } impl StaticType for RTSPProfile { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_profile_get_type()) } } @@ -294,6 +311,7 @@ impl glib::value::ValueType for RTSPProfile { unsafe impl<'a> FromValue<'a> for RTSPProfile { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -301,6 +319,7 @@ unsafe impl<'a> FromValue<'a> for RTSPProfile { } impl ToValue for RTSPProfile { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -309,6 +328,7 @@ impl ToValue for RTSPProfile { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -336,6 +356,7 @@ bitflags! { impl IntoGlib for RTSPTransMode { type GlibType = ffi::GstRTSPTransMode; + #[inline] fn into_glib(self) -> ffi::GstRTSPTransMode { self.bits() } @@ -343,6 +364,7 @@ impl IntoGlib for RTSPTransMode { #[doc(hidden)] impl FromGlib for RTSPTransMode { + #[inline] unsafe fn from_glib(value: ffi::GstRTSPTransMode) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -350,6 +372,7 @@ impl FromGlib for RTSPTransMode { } impl StaticType for RTSPTransMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rtsp_trans_mode_get_type()) } } @@ -362,6 +385,7 @@ impl glib::value::ValueType for RTSPTransMode { unsafe impl<'a> FromValue<'a> for RTSPTransMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -369,6 +393,7 @@ unsafe impl<'a> FromValue<'a> for RTSPTransMode { } impl ToValue for RTSPTransMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -377,6 +402,7 @@ impl ToValue for RTSPTransMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-rtsp/src/auto/versions.txt b/gstreamer-rtsp/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-rtsp/src/auto/versions.txt +++ b/gstreamer-rtsp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-rtsp/sys/src/auto/versions.txt b/gstreamer-rtsp/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-rtsp/sys/src/auto/versions.txt +++ b/gstreamer-rtsp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-sdp/src/auto/versions.txt b/gstreamer-sdp/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-sdp/src/auto/versions.txt +++ b/gstreamer-sdp/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-sdp/sys/src/auto/versions.txt b/gstreamer-sdp/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-sdp/sys/src/auto/versions.txt +++ b/gstreamer-sdp/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-tag/sys/src/auto/versions.txt b/gstreamer-tag/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-tag/sys/src/auto/versions.txt +++ b/gstreamer-tag/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-validate/src/auto/bin_monitor.rs b/gstreamer-validate/src/auto/bin_monitor.rs index 857d70f3b..1866c522a 100644 --- a/gstreamer-validate/src/auto/bin_monitor.rs +++ b/gstreamer-validate/src/auto/bin_monitor.rs @@ -3,19 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ElementMonitor; -use crate::Monitor; -use crate::Reporter; -use crate::Runner; -use crate::Scenario; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ElementMonitor, Monitor, Reporter, Runner, Scenario}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstValidateBinMonitor")] diff --git a/gstreamer-validate/src/auto/element_monitor.rs b/gstreamer-validate/src/auto/element_monitor.rs index c66647242..25118b044 100644 --- a/gstreamer-validate/src/auto/element_monitor.rs +++ b/gstreamer-validate/src/auto/element_monitor.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Monitor; -use crate::Reporter; -use crate::Runner; -use glib::object::IsA; -use glib::translate::*; +use crate::{Monitor, Reporter, Runner}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstValidateElementMonitor")] diff --git a/gstreamer-validate/src/auto/enums.rs b/gstreamer-validate/src/auto/enums.rs index 125241cfe..e3afcf72f 100644 --- a/gstreamer-validate/src/auto/enums.rs +++ b/gstreamer-validate/src/auto/enums.rs @@ -3,13 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; +use std::{ffi::CStr, fmt}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -68,6 +63,7 @@ impl fmt::Display for ReportLevel { impl IntoGlib for ReportLevel { type GlibType = ffi::GstValidateReportLevel; + #[inline] fn into_glib(self) -> ffi::GstValidateReportLevel { match self { Self::Critical => ffi::GST_VALIDATE_REPORT_LEVEL_CRITICAL, @@ -84,6 +80,7 @@ impl IntoGlib for ReportLevel { #[doc(hidden)] impl FromGlib for ReportLevel { + #[inline] unsafe fn from_glib(value: ffi::GstValidateReportLevel) -> Self { skip_assert_initialized!(); match value { @@ -100,6 +97,7 @@ impl FromGlib for ReportLevel { } impl StaticType for ReportLevel { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_validate_report_level_get_type()) } } @@ -112,6 +110,7 @@ impl glib::value::ValueType for ReportLevel { unsafe impl<'a> FromValue<'a> for ReportLevel { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -119,6 +118,7 @@ unsafe impl<'a> FromValue<'a> for ReportLevel { } impl ToValue for ReportLevel { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -127,6 +127,7 @@ impl ToValue for ReportLevel { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -168,6 +169,7 @@ pub enum ReportingDetails { impl IntoGlib for ReportingDetails { type GlibType = ffi::GstValidateReportingDetails; + #[inline] fn into_glib(self) -> ffi::GstValidateReportingDetails { match self { Self::Unknown => ffi::GST_VALIDATE_SHOW_UNKNOWN, @@ -185,6 +187,7 @@ impl IntoGlib for ReportingDetails { #[doc(hidden)] impl FromGlib for ReportingDetails { + #[inline] unsafe fn from_glib(value: ffi::GstValidateReportingDetails) -> Self { skip_assert_initialized!(); match value { @@ -202,6 +205,7 @@ impl FromGlib for ReportingDetails { } impl StaticType for ReportingDetails { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_validate_reporting_details_get_type()) } } @@ -214,6 +218,7 @@ impl glib::value::ValueType for ReportingDetails { unsafe impl<'a> FromValue<'a> for ReportingDetails { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -221,6 +226,7 @@ unsafe impl<'a> FromValue<'a> for ReportingDetails { } impl ToValue for ReportingDetails { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -229,6 +235,7 @@ impl ToValue for ReportingDetails { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-validate/src/auto/flags.rs b/gstreamer-validate/src/auto/flags.rs index 56f56a8b0..3068eb8f0 100644 --- a/gstreamer-validate/src/auto/flags.rs +++ b/gstreamer-validate/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; bitflags! { #[doc(alias = "GstValidateIssueFlags")] @@ -28,6 +24,7 @@ bitflags! { impl IntoGlib for IssueFlags { type GlibType = ffi::GstValidateIssueFlags; + #[inline] fn into_glib(self) -> ffi::GstValidateIssueFlags { self.bits() } @@ -35,6 +32,7 @@ impl IntoGlib for IssueFlags { #[doc(hidden)] impl FromGlib for IssueFlags { + #[inline] unsafe fn from_glib(value: ffi::GstValidateIssueFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -42,6 +40,7 @@ impl FromGlib for IssueFlags { } impl StaticType for IssueFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_validate_issue_flags_get_type()) } } @@ -54,6 +53,7 @@ impl glib::value::ValueType for IssueFlags { unsafe impl<'a> FromValue<'a> for IssueFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -61,6 +61,7 @@ unsafe impl<'a> FromValue<'a> for IssueFlags { } impl ToValue for IssueFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -69,6 +70,7 @@ impl ToValue for IssueFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-validate/src/auto/monitor.rs b/gstreamer-validate/src/auto/monitor.rs index aeea7c9e2..1e3583012 100644 --- a/gstreamer-validate/src/auto/monitor.rs +++ b/gstreamer-validate/src/auto/monitor.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Reporter; -use crate::Runner; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Reporter, Runner}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstValidateMonitor")] diff --git a/gstreamer-validate/src/auto/pad_monitor.rs b/gstreamer-validate/src/auto/pad_monitor.rs index a29706c9a..de7fa6666 100644 --- a/gstreamer-validate/src/auto/pad_monitor.rs +++ b/gstreamer-validate/src/auto/pad_monitor.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ElementMonitor; -use crate::Monitor; -use crate::Reporter; -use crate::Runner; -use glib::object::IsA; -use glib::translate::*; +use crate::{ElementMonitor, Monitor, Reporter, Runner}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstValidatePadMonitor")] diff --git a/gstreamer-validate/src/auto/pipeline_monitor.rs b/gstreamer-validate/src/auto/pipeline_monitor.rs index 23b167ee8..5276f99bb 100644 --- a/gstreamer-validate/src/auto/pipeline_monitor.rs +++ b/gstreamer-validate/src/auto/pipeline_monitor.rs @@ -3,13 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::BinMonitor; -use crate::ElementMonitor; -use crate::Monitor; -use crate::Reporter; -use crate::Runner; -use glib::object::IsA; -use glib::translate::*; +use crate::{BinMonitor, ElementMonitor, Monitor, Reporter, Runner}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstValidatePipelineMonitor")] diff --git a/gstreamer-validate/src/auto/report.rs b/gstreamer-validate/src/auto/report.rs index 5856d91a4..d9edb9cd3 100644 --- a/gstreamer-validate/src/auto/report.rs +++ b/gstreamer-validate/src/auto/report.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Issue; -use crate::ReportLevel; -use crate::Reporter; -use crate::ReportingDetails; -use glib::object::IsA; -use glib::translate::*; +use crate::{Issue, ReportLevel, Reporter, ReportingDetails}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] diff --git a/gstreamer-validate/src/auto/reporter.rs b/gstreamer-validate/src/auto/reporter.rs index 0508858cd..0bd8e55f1 100644 --- a/gstreamer-validate/src/auto/reporter.rs +++ b/gstreamer-validate/src/auto/reporter.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Report; -use crate::ReportingDetails; -use crate::Runner; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{Report, ReportingDetails, Runner}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstValidateReporter")] @@ -68,7 +64,7 @@ pub trait ReporterExt: 'static { fn set_handle_g_logs(&self); #[doc(alias = "gst_validate_reporter_set_name")] - fn set_name(&self, name: Option<&str>); + fn set_name(&self, name: Option); #[doc(alias = "gst_validate_reporter_set_runner")] fn set_runner(&self, runner: &impl IsA); @@ -148,11 +144,11 @@ impl> ReporterExt for O { } } - fn set_name(&self, name: Option<&str>) { + fn set_name(&self, name: Option) { unsafe { ffi::gst_validate_reporter_set_name( self.as_ref().to_glib_none().0, - name.to_glib_full(), + name.into_glib_ptr(), ); } } diff --git a/gstreamer-validate/src/auto/runner.rs b/gstreamer-validate/src/auto/runner.rs index bf8dbc8de..a7b777a50 100644 --- a/gstreamer-validate/src/auto/runner.rs +++ b/gstreamer-validate/src/auto/runner.rs @@ -3,15 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Report; -use crate::ReportingDetails; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Report, ReportingDetails}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstValidateRunner")] diff --git a/gstreamer-validate/src/auto/scenario.rs b/gstreamer-validate/src/auto/scenario.rs index c8b590088..74af24c09 100644 --- a/gstreamer-validate/src/auto/scenario.rs +++ b/gstreamer-validate/src/auto/scenario.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Action; -use crate::Reporter; -use crate::Runner; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Action, Reporter, Runner}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstValidateScenario")] diff --git a/gstreamer-validate/src/auto/versions.txt b/gstreamer-validate/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-validate/src/auto/versions.txt +++ b/gstreamer-validate/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-validate/sys/src/auto/versions.txt b/gstreamer-validate/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-validate/sys/src/auto/versions.txt +++ b/gstreamer-validate/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-video/src/auto/color_balance.rs b/gstreamer-video/src/auto/color_balance.rs index 1aa73dfbf..2139496b4 100644 --- a/gstreamer-video/src/auto/color_balance.rs +++ b/gstreamer-video/src/auto/color_balance.rs @@ -3,15 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ColorBalanceChannel; -use crate::ColorBalanceType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ColorBalanceChannel, ColorBalanceType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstColorBalance")] diff --git a/gstreamer-video/src/auto/color_balance_channel.rs b/gstreamer-video/src/auto/color_balance_channel.rs index dcd01889b..c21086857 100644 --- a/gstreamer-video/src/auto/color_balance_channel.rs +++ b/gstreamer-video/src/auto/color_balance_channel.rs @@ -3,13 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstColorBalanceChannel")] diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index 1cb92bb41..2945dd8d8 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -3,13 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; +use std::{ffi::CStr, fmt}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -27,6 +22,7 @@ pub enum ColorBalanceType { impl IntoGlib for ColorBalanceType { type GlibType = ffi::GstColorBalanceType; + #[inline] fn into_glib(self) -> ffi::GstColorBalanceType { match self { Self::Hardware => ffi::GST_COLOR_BALANCE_HARDWARE, @@ -38,6 +34,7 @@ impl IntoGlib for ColorBalanceType { #[doc(hidden)] impl FromGlib for ColorBalanceType { + #[inline] unsafe fn from_glib(value: ffi::GstColorBalanceType) -> Self { skip_assert_initialized!(); match value { @@ -49,6 +46,7 @@ impl FromGlib for ColorBalanceType { } impl StaticType for ColorBalanceType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_color_balance_type_get_type()) } } @@ -61,6 +59,7 @@ impl glib::value::ValueType for ColorBalanceType { unsafe impl<'a> FromValue<'a> for ColorBalanceType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -68,6 +67,7 @@ unsafe impl<'a> FromValue<'a> for ColorBalanceType { } impl ToValue for ColorBalanceType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -76,6 +76,7 @@ impl ToValue for ColorBalanceType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -180,6 +181,7 @@ impl FromGlib for NavigationCommand { } impl StaticType for NavigationCommand { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_navigation_command_get_type()) } } @@ -192,6 +194,7 @@ impl glib::value::ValueType for NavigationCommand { unsafe impl<'a> FromValue<'a> for NavigationCommand { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -199,6 +202,7 @@ unsafe impl<'a> FromValue<'a> for NavigationCommand { } impl ToValue for NavigationCommand { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -207,6 +211,7 @@ impl ToValue for NavigationCommand { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -326,6 +331,7 @@ impl FromGlib for NavigationEventType { } impl StaticType for NavigationEventType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_navigation_event_type_get_type()) } } @@ -338,6 +344,7 @@ impl glib::value::ValueType for NavigationEventType { unsafe impl<'a> FromValue<'a> for NavigationEventType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -345,6 +352,7 @@ unsafe impl<'a> FromValue<'a> for NavigationEventType { } impl ToValue for NavigationEventType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -353,6 +361,7 @@ impl ToValue for NavigationEventType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -388,6 +397,7 @@ pub enum NavigationMessageType { impl IntoGlib for NavigationMessageType { type GlibType = ffi::GstNavigationMessageType; + #[inline] fn into_glib(self) -> ffi::GstNavigationMessageType { match self { Self::Invalid => ffi::GST_NAVIGATION_MESSAGE_INVALID, @@ -402,6 +412,7 @@ impl IntoGlib for NavigationMessageType { #[doc(hidden)] impl FromGlib for NavigationMessageType { + #[inline] unsafe fn from_glib(value: ffi::GstNavigationMessageType) -> Self { skip_assert_initialized!(); match value { @@ -416,6 +427,7 @@ impl FromGlib for NavigationMessageType { } impl StaticType for NavigationMessageType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_navigation_message_type_get_type()) } } @@ -428,6 +440,7 @@ impl glib::value::ValueType for NavigationMessageType { unsafe impl<'a> FromValue<'a> for NavigationMessageType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -435,6 +448,7 @@ unsafe impl<'a> FromValue<'a> for NavigationMessageType { } impl ToValue for NavigationMessageType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -443,6 +457,7 @@ impl ToValue for NavigationMessageType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -474,6 +489,7 @@ pub enum NavigationQueryType { impl IntoGlib for NavigationQueryType { type GlibType = ffi::GstNavigationQueryType; + #[inline] fn into_glib(self) -> ffi::GstNavigationQueryType { match self { Self::Invalid => ffi::GST_NAVIGATION_QUERY_INVALID, @@ -486,6 +502,7 @@ impl IntoGlib for NavigationQueryType { #[doc(hidden)] impl FromGlib for NavigationQueryType { + #[inline] unsafe fn from_glib(value: ffi::GstNavigationQueryType) -> Self { skip_assert_initialized!(); match value { @@ -498,6 +515,7 @@ impl FromGlib for NavigationQueryType { } impl StaticType for NavigationQueryType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_navigation_query_type_get_type()) } } @@ -510,6 +528,7 @@ impl glib::value::ValueType for NavigationQueryType { unsafe impl<'a> FromValue<'a> for NavigationQueryType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -517,6 +536,7 @@ unsafe impl<'a> FromValue<'a> for NavigationQueryType { } impl ToValue for NavigationQueryType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -525,6 +545,7 @@ impl ToValue for NavigationQueryType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -560,6 +581,7 @@ pub enum VideoAFDSpec { impl IntoGlib for VideoAFDSpec { type GlibType = ffi::GstVideoAFDSpec; + #[inline] fn into_glib(self) -> ffi::GstVideoAFDSpec { match self { Self::DvbEtsi => ffi::GST_VIDEO_AFD_SPEC_DVB_ETSI, @@ -574,6 +596,7 @@ impl IntoGlib for VideoAFDSpec { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(hidden)] impl FromGlib for VideoAFDSpec { + #[inline] unsafe fn from_glib(value: ffi::GstVideoAFDSpec) -> Self { skip_assert_initialized!(); match value { @@ -588,6 +611,7 @@ impl FromGlib for VideoAFDSpec { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl StaticType for VideoAFDSpec { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_afd_spec_get_type()) } } @@ -604,6 +628,7 @@ impl glib::value::ValueType for VideoAFDSpec { unsafe impl<'a> FromValue<'a> for VideoAFDSpec { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -613,6 +638,7 @@ unsafe impl<'a> FromValue<'a> for VideoAFDSpec { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl ToValue for VideoAFDSpec { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -621,6 +647,7 @@ impl ToValue for VideoAFDSpec { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -674,6 +701,7 @@ pub enum VideoAFDValue { impl IntoGlib for VideoAFDValue { type GlibType = ffi::GstVideoAFDValue; + #[inline] fn into_glib(self) -> ffi::GstVideoAFDValue { match self { Self::Unavailable => ffi::GST_VIDEO_AFD_UNAVAILABLE, @@ -696,6 +724,7 @@ impl IntoGlib for VideoAFDValue { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(hidden)] impl FromGlib for VideoAFDValue { + #[inline] unsafe fn from_glib(value: ffi::GstVideoAFDValue) -> Self { skip_assert_initialized!(); match value { @@ -718,6 +747,7 @@ impl FromGlib for VideoAFDValue { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl StaticType for VideoAFDValue { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_afd_value_get_type()) } } @@ -734,6 +764,7 @@ impl glib::value::ValueType for VideoAFDValue { unsafe impl<'a> FromValue<'a> for VideoAFDValue { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -743,6 +774,7 @@ unsafe impl<'a> FromValue<'a> for VideoAFDValue { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl ToValue for VideoAFDValue { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -751,6 +783,7 @@ impl ToValue for VideoAFDValue { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -784,6 +817,7 @@ pub enum VideoAlphaMode { impl IntoGlib for VideoAlphaMode { type GlibType = ffi::GstVideoAlphaMode; + #[inline] fn into_glib(self) -> ffi::GstVideoAlphaMode { match self { Self::Copy => ffi::GST_VIDEO_ALPHA_MODE_COPY, @@ -796,6 +830,7 @@ impl IntoGlib for VideoAlphaMode { #[doc(hidden)] impl FromGlib for VideoAlphaMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoAlphaMode) -> Self { skip_assert_initialized!(); match value { @@ -808,6 +843,7 @@ impl FromGlib for VideoAlphaMode { } impl StaticType for VideoAlphaMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_alpha_mode_get_type()) } } @@ -820,6 +856,7 @@ impl glib::value::ValueType for VideoAlphaMode { unsafe impl<'a> FromValue<'a> for VideoAlphaMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -827,6 +864,7 @@ unsafe impl<'a> FromValue<'a> for VideoAlphaMode { } impl ToValue for VideoAlphaMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -835,6 +873,7 @@ impl ToValue for VideoAlphaMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -884,6 +923,7 @@ impl VideoCaptionType { impl IntoGlib for VideoCaptionType { type GlibType = ffi::GstVideoCaptionType; + #[inline] fn into_glib(self) -> ffi::GstVideoCaptionType { match self { Self::Unknown => ffi::GST_VIDEO_CAPTION_TYPE_UNKNOWN, @@ -900,6 +940,7 @@ impl IntoGlib for VideoCaptionType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for VideoCaptionType { + #[inline] unsafe fn from_glib(value: ffi::GstVideoCaptionType) -> Self { skip_assert_initialized!(); match value { @@ -916,6 +957,7 @@ impl FromGlib for VideoCaptionType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for VideoCaptionType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_caption_type_get_type()) } } @@ -932,6 +974,7 @@ impl glib::value::ValueType for VideoCaptionType { unsafe impl<'a> FromValue<'a> for VideoCaptionType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -941,6 +984,7 @@ unsafe impl<'a> FromValue<'a> for VideoCaptionType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for VideoCaptionType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -949,6 +993,7 @@ impl ToValue for VideoCaptionType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -984,6 +1029,7 @@ pub enum VideoChromaMode { impl IntoGlib for VideoChromaMode { type GlibType = ffi::GstVideoChromaMode; + #[inline] fn into_glib(self) -> ffi::GstVideoChromaMode { match self { Self::Full => ffi::GST_VIDEO_CHROMA_MODE_FULL, @@ -997,6 +1043,7 @@ impl IntoGlib for VideoChromaMode { #[doc(hidden)] impl FromGlib for VideoChromaMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoChromaMode) -> Self { skip_assert_initialized!(); match value { @@ -1010,6 +1057,7 @@ impl FromGlib for VideoChromaMode { } impl StaticType for VideoChromaMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_chroma_mode_get_type()) } } @@ -1022,6 +1070,7 @@ impl glib::value::ValueType for VideoChromaMode { unsafe impl<'a> FromValue<'a> for VideoChromaMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1029,6 +1078,7 @@ unsafe impl<'a> FromValue<'a> for VideoChromaMode { } impl ToValue for VideoChromaMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1037,6 +1087,7 @@ impl ToValue for VideoChromaMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1094,6 +1145,7 @@ impl VideoColorMatrix { impl IntoGlib for VideoColorMatrix { type GlibType = ffi::GstVideoColorMatrix; + #[inline] fn into_glib(self) -> ffi::GstVideoColorMatrix { match self { Self::Unknown => ffi::GST_VIDEO_COLOR_MATRIX_UNKNOWN, @@ -1110,6 +1162,7 @@ impl IntoGlib for VideoColorMatrix { #[doc(hidden)] impl FromGlib for VideoColorMatrix { + #[inline] unsafe fn from_glib(value: ffi::GstVideoColorMatrix) -> Self { skip_assert_initialized!(); match value { @@ -1126,6 +1179,7 @@ impl FromGlib for VideoColorMatrix { } impl StaticType for VideoColorMatrix { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_color_matrix_get_type()) } } @@ -1138,6 +1192,7 @@ impl glib::value::ValueType for VideoColorMatrix { unsafe impl<'a> FromValue<'a> for VideoColorMatrix { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1145,6 +1200,7 @@ unsafe impl<'a> FromValue<'a> for VideoColorMatrix { } impl ToValue for VideoColorMatrix { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1153,6 +1209,7 @@ impl ToValue for VideoColorMatrix { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1301,6 +1358,7 @@ impl FromGlib for VideoColorPrimaries { } impl StaticType for VideoColorPrimaries { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_color_primaries_get_type()) } } @@ -1313,6 +1371,7 @@ impl glib::value::ValueType for VideoColorPrimaries { unsafe impl<'a> FromValue<'a> for VideoColorPrimaries { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1320,6 +1379,7 @@ unsafe impl<'a> FromValue<'a> for VideoColorPrimaries { } impl ToValue for VideoColorPrimaries { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1328,6 +1388,7 @@ impl ToValue for VideoColorPrimaries { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1363,6 +1424,7 @@ pub enum VideoDitherMethod { impl IntoGlib for VideoDitherMethod { type GlibType = ffi::GstVideoDitherMethod; + #[inline] fn into_glib(self) -> ffi::GstVideoDitherMethod { match self { Self::None => ffi::GST_VIDEO_DITHER_NONE, @@ -1377,6 +1439,7 @@ impl IntoGlib for VideoDitherMethod { #[doc(hidden)] impl FromGlib for VideoDitherMethod { + #[inline] unsafe fn from_glib(value: ffi::GstVideoDitherMethod) -> Self { skip_assert_initialized!(); match value { @@ -1391,6 +1454,7 @@ impl FromGlib for VideoDitherMethod { } impl StaticType for VideoDitherMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_dither_method_get_type()) } } @@ -1403,6 +1467,7 @@ impl glib::value::ValueType for VideoDitherMethod { unsafe impl<'a> FromValue<'a> for VideoDitherMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1410,6 +1475,7 @@ unsafe impl<'a> FromValue<'a> for VideoDitherMethod { } impl ToValue for VideoDitherMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1418,6 +1484,7 @@ impl ToValue for VideoDitherMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1468,6 +1535,7 @@ impl fmt::Display for VideoFieldOrder { impl IntoGlib for VideoFieldOrder { type GlibType = ffi::GstVideoFieldOrder; + #[inline] fn into_glib(self) -> ffi::GstVideoFieldOrder { match self { Self::Unknown => ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN, @@ -1480,6 +1548,7 @@ impl IntoGlib for VideoFieldOrder { #[doc(hidden)] impl FromGlib for VideoFieldOrder { + #[inline] unsafe fn from_glib(value: ffi::GstVideoFieldOrder) -> Self { skip_assert_initialized!(); match value { @@ -1492,6 +1561,7 @@ impl FromGlib for VideoFieldOrder { } impl StaticType for VideoFieldOrder { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_field_order_get_type()) } } @@ -1504,6 +1574,7 @@ impl glib::value::ValueType for VideoFieldOrder { unsafe impl<'a> FromValue<'a> for VideoFieldOrder { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1511,6 +1582,7 @@ unsafe impl<'a> FromValue<'a> for VideoFieldOrder { } impl ToValue for VideoFieldOrder { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1519,6 +1591,7 @@ impl ToValue for VideoFieldOrder { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2175,6 +2248,7 @@ impl FromGlib for VideoFormat { } impl StaticType for VideoFormat { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_format_get_type()) } } @@ -2187,6 +2261,7 @@ impl glib::value::ValueType for VideoFormat { unsafe impl<'a> FromValue<'a> for VideoFormat { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2194,6 +2269,7 @@ unsafe impl<'a> FromValue<'a> for VideoFormat { } impl ToValue for VideoFormat { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2202,6 +2278,7 @@ impl ToValue for VideoFormat { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2231,6 +2308,7 @@ pub enum VideoGammaMode { impl IntoGlib for VideoGammaMode { type GlibType = ffi::GstVideoGammaMode; + #[inline] fn into_glib(self) -> ffi::GstVideoGammaMode { match self { Self::None => ffi::GST_VIDEO_GAMMA_MODE_NONE, @@ -2242,6 +2320,7 @@ impl IntoGlib for VideoGammaMode { #[doc(hidden)] impl FromGlib for VideoGammaMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoGammaMode) -> Self { skip_assert_initialized!(); match value { @@ -2253,6 +2332,7 @@ impl FromGlib for VideoGammaMode { } impl StaticType for VideoGammaMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_gamma_mode_get_type()) } } @@ -2265,6 +2345,7 @@ impl glib::value::ValueType for VideoGammaMode { unsafe impl<'a> FromValue<'a> for VideoGammaMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2272,6 +2353,7 @@ unsafe impl<'a> FromValue<'a> for VideoGammaMode { } impl ToValue for VideoGammaMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2280,6 +2362,7 @@ impl ToValue for VideoGammaMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2348,6 +2431,7 @@ impl fmt::Display for VideoInterlaceMode { impl IntoGlib for VideoInterlaceMode { type GlibType = ffi::GstVideoInterlaceMode; + #[inline] fn into_glib(self) -> ffi::GstVideoInterlaceMode { match self { Self::Progressive => ffi::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE, @@ -2363,6 +2447,7 @@ impl IntoGlib for VideoInterlaceMode { #[doc(hidden)] impl FromGlib for VideoInterlaceMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoInterlaceMode) -> Self { skip_assert_initialized!(); match value { @@ -2378,6 +2463,7 @@ impl FromGlib for VideoInterlaceMode { } impl StaticType for VideoInterlaceMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_interlace_mode_get_type()) } } @@ -2390,6 +2476,7 @@ impl glib::value::ValueType for VideoInterlaceMode { unsafe impl<'a> FromValue<'a> for VideoInterlaceMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2397,6 +2484,7 @@ unsafe impl<'a> FromValue<'a> for VideoInterlaceMode { } impl ToValue for VideoInterlaceMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2405,6 +2493,7 @@ impl ToValue for VideoInterlaceMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2438,6 +2527,7 @@ pub enum VideoMatrixMode { impl IntoGlib for VideoMatrixMode { type GlibType = ffi::GstVideoMatrixMode; + #[inline] fn into_glib(self) -> ffi::GstVideoMatrixMode { match self { Self::Full => ffi::GST_VIDEO_MATRIX_MODE_FULL, @@ -2451,6 +2541,7 @@ impl IntoGlib for VideoMatrixMode { #[doc(hidden)] impl FromGlib for VideoMatrixMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoMatrixMode) -> Self { skip_assert_initialized!(); match value { @@ -2464,6 +2555,7 @@ impl FromGlib for VideoMatrixMode { } impl StaticType for VideoMatrixMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_matrix_mode_get_type()) } } @@ -2476,6 +2568,7 @@ impl glib::value::ValueType for VideoMatrixMode { unsafe impl<'a> FromValue<'a> for VideoMatrixMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2483,6 +2576,7 @@ unsafe impl<'a> FromValue<'a> for VideoMatrixMode { } impl ToValue for VideoMatrixMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2491,6 +2585,7 @@ impl ToValue for VideoMatrixMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2536,6 +2631,7 @@ pub enum VideoMultiviewFramePacking { impl IntoGlib for VideoMultiviewFramePacking { type GlibType = ffi::GstVideoMultiviewFramePacking; + #[inline] fn into_glib(self) -> ffi::GstVideoMultiviewFramePacking { match self { Self::None => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE, @@ -2557,6 +2653,7 @@ impl IntoGlib for VideoMultiviewFramePacking { #[doc(hidden)] impl FromGlib for VideoMultiviewFramePacking { + #[inline] unsafe fn from_glib(value: ffi::GstVideoMultiviewFramePacking) -> Self { skip_assert_initialized!(); match value { @@ -2578,6 +2675,7 @@ impl FromGlib for VideoMultiviewFramePacking } impl StaticType for VideoMultiviewFramePacking { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_multiview_frame_packing_get_type()) } } @@ -2590,6 +2688,7 @@ impl glib::value::ValueType for VideoMultiviewFramePacking { unsafe impl<'a> FromValue<'a> for VideoMultiviewFramePacking { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2597,6 +2696,7 @@ unsafe impl<'a> FromValue<'a> for VideoMultiviewFramePacking { } impl ToValue for VideoMultiviewFramePacking { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2605,6 +2705,7 @@ impl ToValue for VideoMultiviewFramePacking { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2722,6 +2823,7 @@ impl FromGlib for VideoMultiviewMode { } impl StaticType for VideoMultiviewMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_multiview_mode_get_type()) } } @@ -2734,6 +2836,7 @@ impl glib::value::ValueType for VideoMultiviewMode { unsafe impl<'a> FromValue<'a> for VideoMultiviewMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2741,6 +2844,7 @@ unsafe impl<'a> FromValue<'a> for VideoMultiviewMode { } impl ToValue for VideoMultiviewMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2749,6 +2853,7 @@ impl ToValue for VideoMultiviewMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2794,6 +2899,7 @@ pub enum VideoOrientationMethod { impl IntoGlib for VideoOrientationMethod { type GlibType = ffi::GstVideoOrientationMethod; + #[inline] fn into_glib(self) -> ffi::GstVideoOrientationMethod { match self { Self::Identity => ffi::GST_VIDEO_ORIENTATION_IDENTITY, @@ -2813,6 +2919,7 @@ impl IntoGlib for VideoOrientationMethod { #[doc(hidden)] impl FromGlib for VideoOrientationMethod { + #[inline] unsafe fn from_glib(value: ffi::GstVideoOrientationMethod) -> Self { skip_assert_initialized!(); match value { @@ -2832,6 +2939,7 @@ impl FromGlib for VideoOrientationMethod { } impl StaticType for VideoOrientationMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_orientation_method_get_type()) } } @@ -2844,6 +2952,7 @@ impl glib::value::ValueType for VideoOrientationMethod { unsafe impl<'a> FromValue<'a> for VideoOrientationMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2851,6 +2960,7 @@ unsafe impl<'a> FromValue<'a> for VideoOrientationMethod { } impl ToValue for VideoOrientationMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2859,6 +2969,7 @@ impl ToValue for VideoOrientationMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2890,6 +3001,7 @@ pub enum VideoPrimariesMode { impl IntoGlib for VideoPrimariesMode { type GlibType = ffi::GstVideoPrimariesMode; + #[inline] fn into_glib(self) -> ffi::GstVideoPrimariesMode { match self { Self::None => ffi::GST_VIDEO_PRIMARIES_MODE_NONE, @@ -2902,6 +3014,7 @@ impl IntoGlib for VideoPrimariesMode { #[doc(hidden)] impl FromGlib for VideoPrimariesMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoPrimariesMode) -> Self { skip_assert_initialized!(); match value { @@ -2914,6 +3027,7 @@ impl FromGlib for VideoPrimariesMode { } impl StaticType for VideoPrimariesMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_primaries_mode_get_type()) } } @@ -2926,6 +3040,7 @@ impl glib::value::ValueType for VideoPrimariesMode { unsafe impl<'a> FromValue<'a> for VideoPrimariesMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2933,6 +3048,7 @@ unsafe impl<'a> FromValue<'a> for VideoPrimariesMode { } impl ToValue for VideoPrimariesMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2941,6 +3057,7 @@ impl ToValue for VideoPrimariesMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2976,6 +3093,7 @@ pub enum VideoResamplerMethod { impl IntoGlib for VideoResamplerMethod { type GlibType = ffi::GstVideoResamplerMethod; + #[inline] fn into_glib(self) -> ffi::GstVideoResamplerMethod { match self { Self::Nearest => ffi::GST_VIDEO_RESAMPLER_METHOD_NEAREST, @@ -2990,6 +3108,7 @@ impl IntoGlib for VideoResamplerMethod { #[doc(hidden)] impl FromGlib for VideoResamplerMethod { + #[inline] unsafe fn from_glib(value: ffi::GstVideoResamplerMethod) -> Self { skip_assert_initialized!(); match value { @@ -3004,6 +3123,7 @@ impl FromGlib for VideoResamplerMethod { } impl StaticType for VideoResamplerMethod { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_resampler_method_get_type()) } } @@ -3016,6 +3136,7 @@ impl glib::value::ValueType for VideoResamplerMethod { unsafe impl<'a> FromValue<'a> for VideoResamplerMethod { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3023,6 +3144,7 @@ unsafe impl<'a> FromValue<'a> for VideoResamplerMethod { } impl ToValue for VideoResamplerMethod { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3031,6 +3153,7 @@ impl ToValue for VideoResamplerMethod { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3064,6 +3187,7 @@ pub enum VideoTileMode { impl IntoGlib for VideoTileMode { type GlibType = ffi::GstVideoTileMode; + #[inline] fn into_glib(self) -> ffi::GstVideoTileMode { match self { Self::Unknown => ffi::GST_VIDEO_TILE_MODE_UNKNOWN, @@ -3077,6 +3201,7 @@ impl IntoGlib for VideoTileMode { #[doc(hidden)] impl FromGlib for VideoTileMode { + #[inline] unsafe fn from_glib(value: ffi::GstVideoTileMode) -> Self { skip_assert_initialized!(); match value { @@ -3090,6 +3215,7 @@ impl FromGlib for VideoTileMode { } impl StaticType for VideoTileMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_tile_mode_get_type()) } } @@ -3102,6 +3228,7 @@ impl glib::value::ValueType for VideoTileMode { unsafe impl<'a> FromValue<'a> for VideoTileMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3109,6 +3236,7 @@ unsafe impl<'a> FromValue<'a> for VideoTileMode { } impl ToValue for VideoTileMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3117,6 +3245,7 @@ impl ToValue for VideoTileMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3293,6 +3422,7 @@ impl FromGlib for VideoTransferFunction { } impl StaticType for VideoTransferFunction { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_transfer_function_get_type()) } } @@ -3305,6 +3435,7 @@ impl glib::value::ValueType for VideoTransferFunction { unsafe impl<'a> FromValue<'a> for VideoTransferFunction { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3312,6 +3443,7 @@ unsafe impl<'a> FromValue<'a> for VideoTransferFunction { } impl ToValue for VideoTransferFunction { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3320,6 +3452,7 @@ impl ToValue for VideoTransferFunction { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index 633917bc1..c52491b59 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -4,11 +4,7 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; use std::fmt; #[cfg(any(feature = "v1_22", feature = "dox"))] @@ -57,6 +53,7 @@ bitflags! { impl IntoGlib for NavigationModifierType { type GlibType = ffi::GstNavigationModifierType; + #[inline] fn into_glib(self) -> ffi::GstNavigationModifierType { self.bits() } @@ -66,6 +63,7 @@ impl IntoGlib for NavigationModifierType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] #[doc(hidden)] impl FromGlib for NavigationModifierType { + #[inline] unsafe fn from_glib(value: ffi::GstNavigationModifierType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -75,6 +73,7 @@ impl FromGlib for NavigationModifierType { #[cfg(any(feature = "v1_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] impl StaticType for NavigationModifierType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_navigation_modifier_type_get_type()) } } @@ -91,6 +90,7 @@ impl glib::value::ValueType for NavigationModifierType { unsafe impl<'a> FromValue<'a> for NavigationModifierType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -100,6 +100,7 @@ unsafe impl<'a> FromValue<'a> for NavigationModifierType { #[cfg(any(feature = "v1_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] impl ToValue for NavigationModifierType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -108,6 +109,7 @@ impl ToValue for NavigationModifierType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -157,6 +159,7 @@ bitflags! { impl IntoGlib for VideoBufferFlags { type GlibType = ffi::GstVideoBufferFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoBufferFlags { self.bits() } @@ -164,6 +167,7 @@ impl IntoGlib for VideoBufferFlags { #[doc(hidden)] impl FromGlib for VideoBufferFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoBufferFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -171,6 +175,7 @@ impl FromGlib for VideoBufferFlags { } impl StaticType for VideoBufferFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_buffer_flags_get_type()) } } @@ -183,6 +188,7 @@ impl glib::value::ValueType for VideoBufferFlags { unsafe impl<'a> FromValue<'a> for VideoBufferFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -190,6 +196,7 @@ unsafe impl<'a> FromValue<'a> for VideoBufferFlags { } impl ToValue for VideoBufferFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -198,6 +205,7 @@ impl ToValue for VideoBufferFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -254,6 +262,7 @@ impl fmt::Display for VideoChromaSite { impl IntoGlib for VideoChromaSite { type GlibType = ffi::GstVideoChromaSite; + #[inline] fn into_glib(self) -> ffi::GstVideoChromaSite { self.bits() } @@ -261,6 +270,7 @@ impl IntoGlib for VideoChromaSite { #[doc(hidden)] impl FromGlib for VideoChromaSite { + #[inline] unsafe fn from_glib(value: ffi::GstVideoChromaSite) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -268,6 +278,7 @@ impl FromGlib for VideoChromaSite { } impl StaticType for VideoChromaSite { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_chroma_site_get_type()) } } @@ -280,6 +291,7 @@ impl glib::value::ValueType for VideoChromaSite { unsafe impl<'a> FromValue<'a> for VideoChromaSite { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -287,6 +299,7 @@ unsafe impl<'a> FromValue<'a> for VideoChromaSite { } impl ToValue for VideoChromaSite { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -295,6 +308,7 @@ impl ToValue for VideoChromaSite { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -330,6 +344,7 @@ bitflags! { impl IntoGlib for VideoCodecFrameFlags { type GlibType = ffi::GstVideoCodecFrameFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoCodecFrameFlags { self.bits() } @@ -337,6 +352,7 @@ impl IntoGlib for VideoCodecFrameFlags { #[doc(hidden)] impl FromGlib for VideoCodecFrameFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoCodecFrameFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -346,6 +362,7 @@ impl FromGlib for VideoCodecFrameFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for VideoCodecFrameFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_codec_frame_flags_get_type()) } } @@ -362,6 +379,7 @@ impl glib::value::ValueType for VideoCodecFrameFlags { unsafe impl<'a> FromValue<'a> for VideoCodecFrameFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -371,6 +389,7 @@ unsafe impl<'a> FromValue<'a> for VideoCodecFrameFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for VideoCodecFrameFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -379,6 +398,7 @@ impl ToValue for VideoCodecFrameFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -412,6 +432,7 @@ bitflags! { impl IntoGlib for VideoDecoderRequestSyncPointFlags { type GlibType = ffi::GstVideoDecoderRequestSyncPointFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoDecoderRequestSyncPointFlags { self.bits() } @@ -421,6 +442,7 @@ impl IntoGlib for VideoDecoderRequestSyncPointFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for VideoDecoderRequestSyncPointFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoDecoderRequestSyncPointFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -430,6 +452,7 @@ impl FromGlib for VideoDecoderRequest #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for VideoDecoderRequestSyncPointFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_decoder_request_sync_point_flags_get_type()) } } @@ -446,6 +469,7 @@ impl glib::value::ValueType for VideoDecoderRequestSyncPointFlags { unsafe impl<'a> FromValue<'a> for VideoDecoderRequestSyncPointFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -455,6 +479,7 @@ unsafe impl<'a> FromValue<'a> for VideoDecoderRequestSyncPointFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for VideoDecoderRequestSyncPointFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -463,6 +488,7 @@ impl ToValue for VideoDecoderRequestSyncPointFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -492,6 +518,7 @@ bitflags! { impl IntoGlib for VideoFlags { type GlibType = ffi::GstVideoFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoFlags { self.bits() } @@ -499,6 +526,7 @@ impl IntoGlib for VideoFlags { #[doc(hidden)] impl FromGlib for VideoFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -506,6 +534,7 @@ impl FromGlib for VideoFlags { } impl StaticType for VideoFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_flags_get_type()) } } @@ -518,6 +547,7 @@ impl glib::value::ValueType for VideoFlags { unsafe impl<'a> FromValue<'a> for VideoFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -525,6 +555,7 @@ unsafe impl<'a> FromValue<'a> for VideoFlags { } impl ToValue for VideoFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -533,6 +564,7 @@ impl ToValue for VideoFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -578,6 +610,7 @@ bitflags! { impl IntoGlib for VideoFormatFlags { type GlibType = ffi::GstVideoFormatFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoFormatFlags { self.bits() } @@ -585,6 +618,7 @@ impl IntoGlib for VideoFormatFlags { #[doc(hidden)] impl FromGlib for VideoFormatFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoFormatFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -592,6 +626,7 @@ impl FromGlib for VideoFormatFlags { } impl StaticType for VideoFormatFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_format_flags_get_type()) } } @@ -604,6 +639,7 @@ impl glib::value::ValueType for VideoFormatFlags { unsafe impl<'a> FromValue<'a> for VideoFormatFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -611,6 +647,7 @@ unsafe impl<'a> FromValue<'a> for VideoFormatFlags { } impl ToValue for VideoFormatFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -619,6 +656,7 @@ impl ToValue for VideoFormatFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -662,6 +700,7 @@ bitflags! { impl IntoGlib for VideoFrameFlags { type GlibType = ffi::GstVideoFrameFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoFrameFlags { self.bits() } @@ -669,6 +708,7 @@ impl IntoGlib for VideoFrameFlags { #[doc(hidden)] impl FromGlib for VideoFrameFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoFrameFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -676,6 +716,7 @@ impl FromGlib for VideoFrameFlags { } impl StaticType for VideoFrameFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_frame_flags_get_type()) } } @@ -688,6 +729,7 @@ impl glib::value::ValueType for VideoFrameFlags { unsafe impl<'a> FromValue<'a> for VideoFrameFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -695,6 +737,7 @@ unsafe impl<'a> FromValue<'a> for VideoFrameFlags { } impl ToValue for VideoFrameFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -703,6 +746,7 @@ impl ToValue for VideoFrameFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -740,6 +784,7 @@ bitflags! { impl IntoGlib for VideoMultiviewFlags { type GlibType = ffi::GstVideoMultiviewFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoMultiviewFlags { self.bits() } @@ -747,6 +792,7 @@ impl IntoGlib for VideoMultiviewFlags { #[doc(hidden)] impl FromGlib for VideoMultiviewFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoMultiviewFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -754,6 +800,7 @@ impl FromGlib for VideoMultiviewFlags { } impl StaticType for VideoMultiviewFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_multiview_flags_get_type()) } } @@ -766,6 +813,7 @@ impl glib::value::ValueType for VideoMultiviewFlags { unsafe impl<'a> FromValue<'a> for VideoMultiviewFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -773,6 +821,7 @@ unsafe impl<'a> FromValue<'a> for VideoMultiviewFlags { } impl ToValue for VideoMultiviewFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -781,6 +830,7 @@ impl ToValue for VideoMultiviewFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -808,6 +858,7 @@ bitflags! { impl IntoGlib for VideoOverlayFormatFlags { type GlibType = ffi::GstVideoOverlayFormatFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoOverlayFormatFlags { self.bits() } @@ -815,6 +866,7 @@ impl IntoGlib for VideoOverlayFormatFlags { #[doc(hidden)] impl FromGlib for VideoOverlayFormatFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoOverlayFormatFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -824,6 +876,7 @@ impl FromGlib for VideoOverlayFormatFlags { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for VideoOverlayFormatFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_overlay_format_flags_get_type()) } } @@ -840,6 +893,7 @@ impl glib::value::ValueType for VideoOverlayFormatFlags { unsafe impl<'a> FromValue<'a> for VideoOverlayFormatFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -849,6 +903,7 @@ unsafe impl<'a> FromValue<'a> for VideoOverlayFormatFlags { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for VideoOverlayFormatFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -857,6 +912,7 @@ impl ToValue for VideoOverlayFormatFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -886,6 +942,7 @@ bitflags! { impl IntoGlib for VideoPackFlags { type GlibType = ffi::GstVideoPackFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoPackFlags { self.bits() } @@ -893,6 +950,7 @@ impl IntoGlib for VideoPackFlags { #[doc(hidden)] impl FromGlib for VideoPackFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoPackFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -900,6 +958,7 @@ impl FromGlib for VideoPackFlags { } impl StaticType for VideoPackFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_pack_flags_get_type()) } } @@ -912,6 +971,7 @@ impl glib::value::ValueType for VideoPackFlags { unsafe impl<'a> FromValue<'a> for VideoPackFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -919,6 +979,7 @@ unsafe impl<'a> FromValue<'a> for VideoPackFlags { } impl ToValue for VideoPackFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -927,6 +988,7 @@ impl ToValue for VideoPackFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -954,6 +1016,7 @@ bitflags! { impl IntoGlib for VideoTimeCodeFlags { type GlibType = ffi::GstVideoTimeCodeFlags; + #[inline] fn into_glib(self) -> ffi::GstVideoTimeCodeFlags { self.bits() } @@ -961,6 +1024,7 @@ impl IntoGlib for VideoTimeCodeFlags { #[doc(hidden)] impl FromGlib for VideoTimeCodeFlags { + #[inline] unsafe fn from_glib(value: ffi::GstVideoTimeCodeFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -970,6 +1034,7 @@ impl FromGlib for VideoTimeCodeFlags { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl StaticType for VideoTimeCodeFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_video_time_code_flags_get_type()) } } @@ -986,6 +1051,7 @@ impl glib::value::ValueType for VideoTimeCodeFlags { unsafe impl<'a> FromValue<'a> for VideoTimeCodeFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -995,6 +1061,7 @@ unsafe impl<'a> FromValue<'a> for VideoTimeCodeFlags { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl ToValue for VideoTimeCodeFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1003,6 +1070,7 @@ impl ToValue for VideoTimeCodeFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-video/src/auto/navigation.rs b/gstreamer-video/src/auto/navigation.rs index fed08dd79..cacbd4760 100644 --- a/gstreamer-video/src/auto/navigation.rs +++ b/gstreamer-video/src/auto/navigation.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::NavigationCommand; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstNavigation")] diff --git a/gstreamer-video/src/auto/versions.txt b/gstreamer-video/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-video/src/auto/versions.txt +++ b/gstreamer-video/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-video/src/auto/video_aggregator.rs b/gstreamer-video/src/auto/video_aggregator.rs index 145a49b5e..b067aee5b 100644 --- a/gstreamer-video/src/auto/video_aggregator.rs +++ b/gstreamer-video/src/auto/video_aggregator.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; +use glib::prelude::*; glib::wrapper! { #[doc(alias = "GstVideoAggregator")] diff --git a/gstreamer-video/src/auto/video_aggregator_convert_pad.rs b/gstreamer-video/src/auto/video_aggregator_convert_pad.rs index 270cb088f..8e327953e 100644 --- a/gstreamer-video/src/auto/video_aggregator_convert_pad.rs +++ b/gstreamer-video/src/auto/video_aggregator_convert_pad.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::VideoAggregatorPad; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstVideoAggregatorConvertPad")] diff --git a/gstreamer-video/src/auto/video_aggregator_pad.rs b/gstreamer-video/src/auto/video_aggregator_pad.rs index a586168fa..988ad7a23 100644 --- a/gstreamer-video/src/auto/video_aggregator_pad.rs +++ b/gstreamer-video/src/auto/video_aggregator_pad.rs @@ -3,15 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstVideoAggregatorPad")] diff --git a/gstreamer-video/src/auto/video_aggregator_parallel_convert_pad.rs b/gstreamer-video/src/auto/video_aggregator_parallel_convert_pad.rs index 00bf37289..da0c886a7 100644 --- a/gstreamer-video/src/auto/video_aggregator_parallel_convert_pad.rs +++ b/gstreamer-video/src/auto/video_aggregator_parallel_convert_pad.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::VideoAggregatorConvertPad; -use crate::VideoAggregatorPad; +use crate::{VideoAggregatorConvertPad, VideoAggregatorPad}; glib::wrapper! { #[doc(alias = "GstVideoAggregatorParallelConvertPad")] diff --git a/gstreamer-video/src/auto/video_buffer_pool.rs b/gstreamer-video/src/auto/video_buffer_pool.rs index 5c4cc835c..ab3c0c837 100644 --- a/gstreamer-video/src/auto/video_buffer_pool.rs +++ b/gstreamer-video/src/auto/video_buffer_pool.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstVideoBufferPool")] diff --git a/gstreamer-video/src/auto/video_decoder.rs b/gstreamer-video/src/auto/video_decoder.rs index 8dc7a1857..9b86c4288 100644 --- a/gstreamer-video/src/auto/video_decoder.rs +++ b/gstreamer-video/src/auto/video_decoder.rs @@ -9,27 +9,11 @@ use crate::VideoCodecFrame; use crate::VideoDecoderRequestSyncPointFlags; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::object::Cast; -use glib::object::IsA; +use glib::signal::{connect_raw, SignalHandlerId}; +use glib::{prelude::*, translate::*}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::signal::connect_raw; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::signal::SignalHandlerId; -use glib::translate::*; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::StaticType; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::ToValue; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstVideoDecoder")] diff --git a/gstreamer-video/src/auto/video_encoder.rs b/gstreamer-video/src/auto/video_encoder.rs index 15e75c530..e42e79383 100644 --- a/gstreamer-video/src/auto/video_encoder.rs +++ b/gstreamer-video/src/auto/video_encoder.rs @@ -4,15 +4,12 @@ // DO NOT EDIT use crate::VideoCodecFrame; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstVideoEncoder")] @@ -54,7 +51,7 @@ pub trait VideoEncoderExt: 'static { fn proxy_getcaps(&self, caps: Option<&gst::Caps>, filter: Option<&gst::Caps>) -> gst::Caps; #[doc(alias = "gst_video_encoder_set_headers")] - fn set_headers(&self, headers: &[&gst::Buffer]); + fn set_headers(&self, headers: Vec); #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] @@ -140,11 +137,11 @@ impl> VideoEncoderExt for O { } } - fn set_headers(&self, headers: &[&gst::Buffer]) { + fn set_headers(&self, headers: Vec) { unsafe { ffi::gst_video_encoder_set_headers( self.as_ref().to_glib_none().0, - headers.to_glib_full(), + headers.into_glib_ptr(), ); } } diff --git a/gstreamer-video/src/auto/video_orientation.rs b/gstreamer-video/src/auto/video_orientation.rs index 917192bd7..ec5a63dcb 100644 --- a/gstreamer-video/src/auto/video_orientation.rs +++ b/gstreamer-video/src/auto/video_orientation.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::mem; glib::wrapper! { diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index dc3e8b76e..94fc4987b 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstVideoOverlay")] diff --git a/gstreamer-video/src/auto/video_sink.rs b/gstreamer-video/src/auto/video_sink.rs index 48fcffc5c..4fcfea1fb 100644 --- a/gstreamer-video/src/auto/video_sink.rs +++ b/gstreamer-video/src/auto/video_sink.rs @@ -4,15 +4,12 @@ // DO NOT EDIT #![allow(deprecated)] -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstVideoSink")] diff --git a/gstreamer-video/sys/src/auto/versions.txt b/gstreamer-video/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-video/sys/src/auto/versions.txt +++ b/gstreamer-video/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-webrtc/src/auto/enums.rs b/gstreamer-webrtc/src/auto/enums.rs index 688f8f5b5..b0182fa75 100644 --- a/gstreamer-webrtc/src/auto/enums.rs +++ b/gstreamer-webrtc/src/auto/enums.rs @@ -5,17 +5,9 @@ #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::error::ErrorDomain; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::Quark; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{error::ErrorDomain, Quark}; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; +use std::{ffi::CStr, fmt}; #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] @@ -41,6 +33,7 @@ pub enum WebRTCBundlePolicy { impl IntoGlib for WebRTCBundlePolicy { type GlibType = ffi::GstWebRTCBundlePolicy; + #[inline] fn into_glib(self) -> ffi::GstWebRTCBundlePolicy { match self { Self::None => ffi::GST_WEBRTC_BUNDLE_POLICY_NONE, @@ -56,6 +49,7 @@ impl IntoGlib for WebRTCBundlePolicy { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for WebRTCBundlePolicy { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCBundlePolicy) -> Self { skip_assert_initialized!(); match value { @@ -71,6 +65,7 @@ impl FromGlib for WebRTCBundlePolicy { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCBundlePolicy { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_bundle_policy_get_type()) } } @@ -87,6 +82,7 @@ impl glib::value::ValueType for WebRTCBundlePolicy { unsafe impl<'a> FromValue<'a> for WebRTCBundlePolicy { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -96,6 +92,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCBundlePolicy { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for WebRTCBundlePolicy { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -104,6 +101,7 @@ impl ToValue for WebRTCBundlePolicy { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -139,6 +137,7 @@ pub enum WebRTCDTLSSetup { impl IntoGlib for WebRTCDTLSSetup { type GlibType = ffi::GstWebRTCDTLSSetup; + #[inline] fn into_glib(self) -> ffi::GstWebRTCDTLSSetup { match self { Self::None => ffi::GST_WEBRTC_DTLS_SETUP_NONE, @@ -152,6 +151,7 @@ impl IntoGlib for WebRTCDTLSSetup { #[doc(hidden)] impl FromGlib for WebRTCDTLSSetup { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCDTLSSetup) -> Self { skip_assert_initialized!(); match value { @@ -165,6 +165,7 @@ impl FromGlib for WebRTCDTLSSetup { } impl StaticType for WebRTCDTLSSetup { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_dtls_setup_get_type()) } } @@ -177,6 +178,7 @@ impl glib::value::ValueType for WebRTCDTLSSetup { unsafe impl<'a> FromValue<'a> for WebRTCDTLSSetup { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -184,6 +186,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCDTLSSetup { } impl ToValue for WebRTCDTLSSetup { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -192,6 +195,7 @@ impl ToValue for WebRTCDTLSSetup { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -227,6 +231,7 @@ pub enum WebRTCDTLSTransportState { impl IntoGlib for WebRTCDTLSTransportState { type GlibType = ffi::GstWebRTCDTLSTransportState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCDTLSTransportState { match self { Self::New => ffi::GST_WEBRTC_DTLS_TRANSPORT_STATE_NEW, @@ -241,6 +246,7 @@ impl IntoGlib for WebRTCDTLSTransportState { #[doc(hidden)] impl FromGlib for WebRTCDTLSTransportState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCDTLSTransportState) -> Self { skip_assert_initialized!(); match value { @@ -255,6 +261,7 @@ impl FromGlib for WebRTCDTLSTransportState { } impl StaticType for WebRTCDTLSTransportState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_dtls_transport_state_get_type()) } } @@ -267,6 +274,7 @@ impl glib::value::ValueType for WebRTCDTLSTransportState { unsafe impl<'a> FromValue<'a> for WebRTCDTLSTransportState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -274,6 +282,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCDTLSTransportState { } impl ToValue for WebRTCDTLSTransportState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -282,6 +291,7 @@ impl ToValue for WebRTCDTLSTransportState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -319,6 +329,7 @@ pub enum WebRTCDataChannelState { impl IntoGlib for WebRTCDataChannelState { type GlibType = ffi::GstWebRTCDataChannelState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCDataChannelState { match self { Self::Connecting => ffi::GST_WEBRTC_DATA_CHANNEL_STATE_CONNECTING, @@ -334,6 +345,7 @@ impl IntoGlib for WebRTCDataChannelState { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for WebRTCDataChannelState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCDataChannelState) -> Self { skip_assert_initialized!(); match value { @@ -349,6 +361,7 @@ impl FromGlib for WebRTCDataChannelState { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCDataChannelState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_data_channel_state_get_type()) } } @@ -365,6 +378,7 @@ impl glib::value::ValueType for WebRTCDataChannelState { unsafe impl<'a> FromValue<'a> for WebRTCDataChannelState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -374,6 +388,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCDataChannelState { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for WebRTCDataChannelState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -382,6 +397,7 @@ impl ToValue for WebRTCDataChannelState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -439,6 +455,7 @@ pub enum WebRTCError { impl IntoGlib for WebRTCError { type GlibType = ffi::GstWebRTCError; + #[inline] fn into_glib(self) -> ffi::GstWebRTCError { match self { Self::DataChannelFailure => ffi::GST_WEBRTC_ERROR_DATA_CHANNEL_FAILURE, @@ -465,6 +482,7 @@ impl IntoGlib for WebRTCError { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for WebRTCError { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCError) -> Self { skip_assert_initialized!(); match value { @@ -491,35 +509,24 @@ impl FromGlib for WebRTCError { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ErrorDomain for WebRTCError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_webrtc_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_WEBRTC_ERROR_DATA_CHANNEL_FAILURE => Some(Self::DataChannelFailure), - ffi::GST_WEBRTC_ERROR_DTLS_FAILURE => Some(Self::DtlsFailure), - ffi::GST_WEBRTC_ERROR_FINGERPRINT_FAILURE => Some(Self::FingerprintFailure), - ffi::GST_WEBRTC_ERROR_SCTP_FAILURE => Some(Self::SctpFailure), - ffi::GST_WEBRTC_ERROR_SDP_SYNTAX_ERROR => Some(Self::SdpSyntaxError), - ffi::GST_WEBRTC_ERROR_HARDWARE_ENCODER_NOT_AVAILABLE => { - Some(Self::HardwareEncoderNotAvailable) - } - ffi::GST_WEBRTC_ERROR_ENCODER_ERROR => Some(Self::EncoderError), - ffi::GST_WEBRTC_ERROR_INVALID_STATE => Some(Self::InvalidState), - ffi::GST_WEBRTC_ERROR_INTERNAL_FAILURE => Some(Self::InternalFailure), - #[cfg(any(feature = "v1_22", feature = "dox"))] - ffi::GST_WEBRTC_ERROR_INVALID_MODIFICATION => Some(Self::InvalidModification), - #[cfg(any(feature = "v1_22", feature = "dox"))] - ffi::GST_WEBRTC_ERROR_TYPE_ERROR => Some(Self::TypeError), - value => Some(Self::__Unknown(value)), + match unsafe { from_glib(code) } { + value => Some(value), } } } @@ -527,6 +534,7 @@ impl ErrorDomain for WebRTCError { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for WebRTCError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_error_get_type()) } } @@ -543,6 +551,7 @@ impl glib::value::ValueType for WebRTCError { unsafe impl<'a> FromValue<'a> for WebRTCError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -552,6 +561,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCError { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for WebRTCError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -560,6 +570,7 @@ impl ToValue for WebRTCError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -595,6 +606,7 @@ pub enum WebRTCFECType { impl IntoGlib for WebRTCFECType { type GlibType = ffi::GstWebRTCFECType; + #[inline] fn into_glib(self) -> ffi::GstWebRTCFECType { match self { Self::None => ffi::GST_WEBRTC_FEC_TYPE_NONE, @@ -608,6 +620,7 @@ impl IntoGlib for WebRTCFECType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))] #[doc(hidden)] impl FromGlib for WebRTCFECType { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCFECType) -> Self { skip_assert_initialized!(); match value { @@ -621,6 +634,7 @@ impl FromGlib for WebRTCFECType { #[cfg(any(feature = "v1_14_1", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))] impl StaticType for WebRTCFECType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_fec_type_get_type()) } } @@ -637,6 +651,7 @@ impl glib::value::ValueType for WebRTCFECType { unsafe impl<'a> FromValue<'a> for WebRTCFECType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -646,6 +661,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCFECType { #[cfg(any(feature = "v1_14_1", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_14_1")))] impl ToValue for WebRTCFECType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -654,6 +670,7 @@ impl ToValue for WebRTCFECType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -685,6 +702,7 @@ pub enum WebRTCICEComponent { impl IntoGlib for WebRTCICEComponent { type GlibType = ffi::GstWebRTCICEComponent; + #[inline] fn into_glib(self) -> ffi::GstWebRTCICEComponent { match self { Self::Rtp => ffi::GST_WEBRTC_ICE_COMPONENT_RTP, @@ -696,6 +714,7 @@ impl IntoGlib for WebRTCICEComponent { #[doc(hidden)] impl FromGlib for WebRTCICEComponent { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCICEComponent) -> Self { skip_assert_initialized!(); match value { @@ -707,6 +726,7 @@ impl FromGlib for WebRTCICEComponent { } impl StaticType for WebRTCICEComponent { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_ice_component_get_type()) } } @@ -719,6 +739,7 @@ impl glib::value::ValueType for WebRTCICEComponent { unsafe impl<'a> FromValue<'a> for WebRTCICEComponent { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -726,6 +747,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCICEComponent { } impl ToValue for WebRTCICEComponent { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -734,6 +756,7 @@ impl ToValue for WebRTCICEComponent { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -773,6 +796,7 @@ pub enum WebRTCICEConnectionState { impl IntoGlib for WebRTCICEConnectionState { type GlibType = ffi::GstWebRTCICEConnectionState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCICEConnectionState { match self { Self::New => ffi::GST_WEBRTC_ICE_CONNECTION_STATE_NEW, @@ -789,6 +813,7 @@ impl IntoGlib for WebRTCICEConnectionState { #[doc(hidden)] impl FromGlib for WebRTCICEConnectionState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCICEConnectionState) -> Self { skip_assert_initialized!(); match value { @@ -805,6 +830,7 @@ impl FromGlib for WebRTCICEConnectionState { } impl StaticType for WebRTCICEConnectionState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_ice_connection_state_get_type()) } } @@ -817,6 +843,7 @@ impl glib::value::ValueType for WebRTCICEConnectionState { unsafe impl<'a> FromValue<'a> for WebRTCICEConnectionState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -824,6 +851,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCICEConnectionState { } impl ToValue for WebRTCICEConnectionState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -832,6 +860,7 @@ impl ToValue for WebRTCICEConnectionState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -863,6 +892,7 @@ pub enum WebRTCICEGatheringState { impl IntoGlib for WebRTCICEGatheringState { type GlibType = ffi::GstWebRTCICEGatheringState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCICEGatheringState { match self { Self::New => ffi::GST_WEBRTC_ICE_GATHERING_STATE_NEW, @@ -875,6 +905,7 @@ impl IntoGlib for WebRTCICEGatheringState { #[doc(hidden)] impl FromGlib for WebRTCICEGatheringState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCICEGatheringState) -> Self { skip_assert_initialized!(); match value { @@ -887,6 +918,7 @@ impl FromGlib for WebRTCICEGatheringState { } impl StaticType for WebRTCICEGatheringState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_ice_gathering_state_get_type()) } } @@ -899,6 +931,7 @@ impl glib::value::ValueType for WebRTCICEGatheringState { unsafe impl<'a> FromValue<'a> for WebRTCICEGatheringState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -906,6 +939,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCICEGatheringState { } impl ToValue for WebRTCICEGatheringState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -914,6 +948,7 @@ impl ToValue for WebRTCICEGatheringState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -943,6 +978,7 @@ pub enum WebRTCICERole { impl IntoGlib for WebRTCICERole { type GlibType = ffi::GstWebRTCICERole; + #[inline] fn into_glib(self) -> ffi::GstWebRTCICERole { match self { Self::Controlled => ffi::GST_WEBRTC_ICE_ROLE_CONTROLLED, @@ -954,6 +990,7 @@ impl IntoGlib for WebRTCICERole { #[doc(hidden)] impl FromGlib for WebRTCICERole { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCICERole) -> Self { skip_assert_initialized!(); match value { @@ -965,6 +1002,7 @@ impl FromGlib for WebRTCICERole { } impl StaticType for WebRTCICERole { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_ice_role_get_type()) } } @@ -977,6 +1015,7 @@ impl glib::value::ValueType for WebRTCICERole { unsafe impl<'a> FromValue<'a> for WebRTCICERole { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -984,6 +1023,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCICERole { } impl ToValue for WebRTCICERole { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -992,6 +1032,7 @@ impl ToValue for WebRTCICERole { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1025,6 +1066,7 @@ pub enum WebRTCICETransportPolicy { impl IntoGlib for WebRTCICETransportPolicy { type GlibType = ffi::GstWebRTCICETransportPolicy; + #[inline] fn into_glib(self) -> ffi::GstWebRTCICETransportPolicy { match self { Self::All => ffi::GST_WEBRTC_ICE_TRANSPORT_POLICY_ALL, @@ -1038,6 +1080,7 @@ impl IntoGlib for WebRTCICETransportPolicy { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for WebRTCICETransportPolicy { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCICETransportPolicy) -> Self { skip_assert_initialized!(); match value { @@ -1051,6 +1094,7 @@ impl FromGlib for WebRTCICETransportPolicy { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCICETransportPolicy { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_ice_transport_policy_get_type()) } } @@ -1067,6 +1111,7 @@ impl glib::value::ValueType for WebRTCICETransportPolicy { unsafe impl<'a> FromValue<'a> for WebRTCICETransportPolicy { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1076,6 +1121,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCICETransportPolicy { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for WebRTCICETransportPolicy { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1084,6 +1130,7 @@ impl ToValue for WebRTCICETransportPolicy { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1121,6 +1168,7 @@ pub enum WebRTCKind { impl IntoGlib for WebRTCKind { type GlibType = ffi::GstWebRTCKind; + #[inline] fn into_glib(self) -> ffi::GstWebRTCKind { match self { Self::Unknown => ffi::GST_WEBRTC_KIND_UNKNOWN, @@ -1135,6 +1183,7 @@ impl IntoGlib for WebRTCKind { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for WebRTCKind { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCKind) -> Self { skip_assert_initialized!(); match value { @@ -1149,6 +1198,7 @@ impl FromGlib for WebRTCKind { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for WebRTCKind { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_kind_get_type()) } } @@ -1165,6 +1215,7 @@ impl glib::value::ValueType for WebRTCKind { unsafe impl<'a> FromValue<'a> for WebRTCKind { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1174,6 +1225,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCKind { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for WebRTCKind { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1182,6 +1234,7 @@ impl ToValue for WebRTCKind { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1221,6 +1274,7 @@ pub enum WebRTCPeerConnectionState { impl IntoGlib for WebRTCPeerConnectionState { type GlibType = ffi::GstWebRTCPeerConnectionState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCPeerConnectionState { match self { Self::New => ffi::GST_WEBRTC_PEER_CONNECTION_STATE_NEW, @@ -1236,6 +1290,7 @@ impl IntoGlib for WebRTCPeerConnectionState { #[doc(hidden)] impl FromGlib for WebRTCPeerConnectionState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCPeerConnectionState) -> Self { skip_assert_initialized!(); match value { @@ -1251,6 +1306,7 @@ impl FromGlib for WebRTCPeerConnectionState { } impl StaticType for WebRTCPeerConnectionState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_peer_connection_state_get_type()) } } @@ -1263,6 +1319,7 @@ impl glib::value::ValueType for WebRTCPeerConnectionState { unsafe impl<'a> FromValue<'a> for WebRTCPeerConnectionState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1270,6 +1327,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCPeerConnectionState { } impl ToValue for WebRTCPeerConnectionState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1278,6 +1336,7 @@ impl ToValue for WebRTCPeerConnectionState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1315,6 +1374,7 @@ pub enum WebRTCPriorityType { impl IntoGlib for WebRTCPriorityType { type GlibType = ffi::GstWebRTCPriorityType; + #[inline] fn into_glib(self) -> ffi::GstWebRTCPriorityType { match self { Self::VeryLow => ffi::GST_WEBRTC_PRIORITY_TYPE_VERY_LOW, @@ -1330,6 +1390,7 @@ impl IntoGlib for WebRTCPriorityType { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for WebRTCPriorityType { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCPriorityType) -> Self { skip_assert_initialized!(); match value { @@ -1345,6 +1406,7 @@ impl FromGlib for WebRTCPriorityType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCPriorityType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_priority_type_get_type()) } } @@ -1361,6 +1423,7 @@ impl glib::value::ValueType for WebRTCPriorityType { unsafe impl<'a> FromValue<'a> for WebRTCPriorityType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1370,6 +1433,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCPriorityType { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for WebRTCPriorityType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1378,6 +1442,7 @@ impl ToValue for WebRTCPriorityType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1415,6 +1480,7 @@ pub enum WebRTCRTPTransceiverDirection { impl IntoGlib for WebRTCRTPTransceiverDirection { type GlibType = ffi::GstWebRTCRTPTransceiverDirection; + #[inline] fn into_glib(self) -> ffi::GstWebRTCRTPTransceiverDirection { match self { Self::None => ffi::GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_NONE, @@ -1429,6 +1495,7 @@ impl IntoGlib for WebRTCRTPTransceiverDirection { #[doc(hidden)] impl FromGlib for WebRTCRTPTransceiverDirection { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCRTPTransceiverDirection) -> Self { skip_assert_initialized!(); match value { @@ -1443,6 +1510,7 @@ impl FromGlib for WebRTCRTPTransceiverDir } impl StaticType for WebRTCRTPTransceiverDirection { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_rtp_transceiver_direction_get_type()) } } @@ -1455,6 +1523,7 @@ impl glib::value::ValueType for WebRTCRTPTransceiverDirection { unsafe impl<'a> FromValue<'a> for WebRTCRTPTransceiverDirection { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1462,6 +1531,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCRTPTransceiverDirection { } impl ToValue for WebRTCRTPTransceiverDirection { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1470,6 +1540,7 @@ impl ToValue for WebRTCRTPTransceiverDirection { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1507,6 +1578,7 @@ pub enum WebRTCSCTPTransportState { impl IntoGlib for WebRTCSCTPTransportState { type GlibType = ffi::GstWebRTCSCTPTransportState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCSCTPTransportState { match self { Self::New => ffi::GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW, @@ -1522,6 +1594,7 @@ impl IntoGlib for WebRTCSCTPTransportState { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(hidden)] impl FromGlib for WebRTCSCTPTransportState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCSCTPTransportState) -> Self { skip_assert_initialized!(); match value { @@ -1537,6 +1610,7 @@ impl FromGlib for WebRTCSCTPTransportState { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl StaticType for WebRTCSCTPTransportState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_sctp_transport_state_get_type()) } } @@ -1553,6 +1627,7 @@ impl glib::value::ValueType for WebRTCSCTPTransportState { unsafe impl<'a> FromValue<'a> for WebRTCSCTPTransportState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1562,6 +1637,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCSCTPTransportState { #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] impl ToValue for WebRTCSCTPTransportState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1570,6 +1646,7 @@ impl ToValue for WebRTCSCTPTransportState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1626,6 +1703,7 @@ impl fmt::Display for WebRTCSDPType { impl IntoGlib for WebRTCSDPType { type GlibType = ffi::GstWebRTCSDPType; + #[inline] fn into_glib(self) -> ffi::GstWebRTCSDPType { match self { Self::Offer => ffi::GST_WEBRTC_SDP_TYPE_OFFER, @@ -1639,6 +1717,7 @@ impl IntoGlib for WebRTCSDPType { #[doc(hidden)] impl FromGlib for WebRTCSDPType { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCSDPType) -> Self { skip_assert_initialized!(); match value { @@ -1652,6 +1731,7 @@ impl FromGlib for WebRTCSDPType { } impl StaticType for WebRTCSDPType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_sdp_type_get_type()) } } @@ -1664,6 +1744,7 @@ impl glib::value::ValueType for WebRTCSDPType { unsafe impl<'a> FromValue<'a> for WebRTCSDPType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1671,6 +1752,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCSDPType { } impl ToValue for WebRTCSDPType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1679,6 +1761,7 @@ impl ToValue for WebRTCSDPType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1716,6 +1799,7 @@ pub enum WebRTCSignalingState { impl IntoGlib for WebRTCSignalingState { type GlibType = ffi::GstWebRTCSignalingState; + #[inline] fn into_glib(self) -> ffi::GstWebRTCSignalingState { match self { Self::Stable => ffi::GST_WEBRTC_SIGNALING_STATE_STABLE, @@ -1731,6 +1815,7 @@ impl IntoGlib for WebRTCSignalingState { #[doc(hidden)] impl FromGlib for WebRTCSignalingState { + #[inline] unsafe fn from_glib(value: ffi::GstWebRTCSignalingState) -> Self { skip_assert_initialized!(); match value { @@ -1746,6 +1831,7 @@ impl FromGlib for WebRTCSignalingState { } impl StaticType for WebRTCSignalingState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_signaling_state_get_type()) } } @@ -1758,6 +1844,7 @@ impl glib::value::ValueType for WebRTCSignalingState { unsafe impl<'a> FromValue<'a> for WebRTCSignalingState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1765,6 +1852,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCSignalingState { } impl ToValue for WebRTCSignalingState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1773,6 +1861,7 @@ impl ToValue for WebRTCSignalingState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1872,6 +1961,7 @@ impl FromGlib for WebRTCStatsType { } impl StaticType for WebRTCStatsType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_webrtc_stats_type_get_type()) } } @@ -1884,6 +1974,7 @@ impl glib::value::ValueType for WebRTCStatsType { unsafe impl<'a> FromValue<'a> for WebRTCStatsType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1891,6 +1982,7 @@ unsafe impl<'a> FromValue<'a> for WebRTCStatsType { } impl ToValue for WebRTCStatsType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1899,6 +1991,7 @@ impl ToValue for WebRTCStatsType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer-webrtc/src/auto/versions.txt b/gstreamer-webrtc/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-webrtc/src/auto/versions.txt +++ b/gstreamer-webrtc/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs b/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs index 889373e0b..7325a9e0d 100644 --- a/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs +++ b/gstreamer-webrtc/src/auto/web_rtc_data_channel.rs @@ -3,20 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::WebRTCDataChannelState; -use crate::WebRTCPriorityType; -use glib::object::ObjectExt; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{WebRTCDataChannelState, WebRTCPriorityType}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_22", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_22")))] use std::ptr; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCDataChannel")] @@ -53,7 +49,7 @@ impl WebRTCDataChannel { data.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { @@ -80,7 +76,7 @@ impl WebRTCDataChannel { str.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer-webrtc/src/auto/web_rtc_session_description.rs b/gstreamer-webrtc/src/auto/web_rtc_session_description.rs index 4bd18ed7a..540cba5f6 100644 --- a/gstreamer-webrtc/src/auto/web_rtc_session_description.rs +++ b/gstreamer-webrtc/src/auto/web_rtc_session_description.rs @@ -3,6 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT +use glib::prelude::*; + glib::wrapper! { #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct WebRTCSessionDescription(Boxed); diff --git a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs index 3501c4073..62697dd6e 100644 --- a/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcdtls_transport.rs @@ -3,16 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::WebRTCDTLSTransportState; -use crate::WebRTCICETransport; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{WebRTCDTLSTransportState, WebRTCICETransport}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCDTLSTransport")] diff --git a/gstreamer-webrtc/src/auto/web_rtcice.rs b/gstreamer-webrtc/src/auto/web_rtcice.rs index f1865d0c5..a4d0e4caa 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice.rs @@ -3,21 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::WebRTCICECandidateStats; -use crate::WebRTCICEComponent; -use crate::WebRTCICEStream; -use crate::WebRTCICETransport; -use glib::object::Cast; -use glib::object::IsA; -use glib::object::ObjectExt; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; -use std::ptr; +use crate::{WebRTCICECandidateStats, WebRTCICEComponent, WebRTCICEStream, WebRTCICETransport}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GstWebRTCICE")] diff --git a/gstreamer-webrtc/src/auto/web_rtcice_stream.rs b/gstreamer-webrtc/src/auto/web_rtcice_stream.rs index a5c3b1963..3edf5baa2 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_stream.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_stream.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::WebRTCICEComponent; -use crate::WebRTCICETransport; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{WebRTCICEComponent, WebRTCICETransport}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstWebRTCICEStream")] diff --git a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs index 9f57628af..34e5d1171 100644 --- a/gstreamer-webrtc/src/auto/web_rtcice_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcice_transport.rs @@ -3,16 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::WebRTCICEComponent; -use crate::WebRTCICEConnectionState; -use crate::WebRTCICEGatheringState; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{WebRTCICEComponent, WebRTCICEConnectionState, WebRTCICEGatheringState}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCICETransport")] diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs index 777af79e3..8dbae9222 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_receiver.rs @@ -8,25 +8,14 @@ use crate::WebRTCDTLSTransport; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::object::ObjectType as ObjectType_; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::connect_raw; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::SignalHandlerId; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::translate::*; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::StaticType; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCRTPReceiver")] diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs index d3726276f..131455e29 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_sender.rs @@ -5,31 +5,17 @@ #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use crate::WebRTCDTLSTransport; +use crate::{WebRTCDTLSTransport, WebRTCPriorityType}; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use crate::WebRTCPriorityType; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::object::ObjectType as ObjectType_; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::connect_raw; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::signal::SignalHandlerId; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::translate::*; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use glib::StaticType; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_20", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCRTPSender")] diff --git a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs index 97682a5b6..9cac5df39 100644 --- a/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs +++ b/gstreamer-webrtc/src/auto/web_rtcrtp_transceiver.rs @@ -6,29 +6,17 @@ #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] use crate::WebRTCKind; -use crate::WebRTCRTPReceiver; -use crate::WebRTCRTPSender; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::WebRTCRTPTransceiverDirection; -use glib::object::ObjectType as ObjectType_; +use crate::{WebRTCRTPReceiver, WebRTCRTPSender}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::signal::connect_raw; +use glib::signal::{connect_raw, SignalHandlerId}; +use glib::{prelude::*, translate::*}; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use glib::ToValue; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use std::boxed::Box as Box_; -#[cfg(any(feature = "v1_18", feature = "dox"))] -#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] -use std::mem::transmute; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCRTPTransceiver")] diff --git a/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs b/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs index 207d941ec..8b86539f3 100644 --- a/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs +++ b/gstreamer-webrtc/src/auto/web_rtcsctp_transport.rs @@ -3,15 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::WebRTCDTLSTransport; -use crate::WebRTCSCTPTransportState; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{WebRTCDTLSTransport, WebRTCSCTPTransportState}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstWebRTCSCTPTransport")] diff --git a/gstreamer-webrtc/sys/src/auto/versions.txt b/gstreamer-webrtc/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer-webrtc/sys/src/auto/versions.txt +++ b/gstreamer-webrtc/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer/src/auto/allocator.rs b/gstreamer/src/auto/allocator.rs index 749c2bdbf..ce78006da 100644 --- a/gstreamer/src/auto/allocator.rs +++ b/gstreamer/src/auto/allocator.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::AllocationParams; -use crate::Memory; -use crate::Object; -use glib::object::IsA; -use glib::translate::*; +use crate::{AllocationParams, Memory, Object}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstAllocator")] @@ -40,7 +37,7 @@ pub trait AllocatorExt: 'static { ) -> Result; #[doc(alias = "gst_allocator_set_default")] - fn set_default(&self); + fn set_default(self); } impl> AllocatorExt for O { @@ -59,9 +56,9 @@ impl> AllocatorExt for O { } } - fn set_default(&self) { + fn set_default(self) { unsafe { - ffi::gst_allocator_set_default(self.as_ref().to_glib_full()); + ffi::gst_allocator_set_default(self.upcast().into_glib_ptr()); } } } diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index dfb5560b9..211bea68d 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -3,21 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ChildProxy; -use crate::Element; -use crate::ElementFlags; -use crate::Object; -use crate::Pad; -use crate::PadDirection; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ChildProxy, Element, ElementFlags, Object, Pad, PadDirection}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstBin")] diff --git a/gstreamer/src/auto/buffer_pool.rs b/gstreamer/src/auto/buffer_pool.rs index 78d4fae8b..6c07e7dc0 100644 --- a/gstreamer/src/auto/buffer_pool.rs +++ b/gstreamer/src/auto/buffer_pool.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::Object; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstBufferPool")] diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index da72ff913..c38369228 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -3,15 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ClockTime; -use crate::Message; -use crate::Object; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ClockTime, Message, Object}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstBus")] diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 9d2019aac..d2492893c 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -3,13 +3,12 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstChildProxy")] diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index 1c13e2cf3..1a8344996 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ClockTime; -use crate::Object; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; +use crate::{ClockTime, Object}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute}; glib::wrapper! { #[doc(alias = "GstClock")] diff --git a/gstreamer/src/auto/control_binding.rs b/gstreamer/src/auto/control_binding.rs index 615de0e0d..aa29f3e1a 100644 --- a/gstreamer/src/auto/control_binding.rs +++ b/gstreamer/src/auto/control_binding.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ClockTime; -use crate::Object; -use glib::object::IsA; -use glib::translate::*; -use glib::StaticType; +use crate::{ClockTime, Object}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstControlBinding")] diff --git a/gstreamer/src/auto/control_source.rs b/gstreamer/src/auto/control_source.rs index d6057c823..361b3b2a1 100644 --- a/gstreamer/src/auto/control_source.rs +++ b/gstreamer/src/auto/control_source.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ClockTime; -use crate::Object; -use glib::object::IsA; -use glib::translate::*; +use crate::{ClockTime, Object}; +use glib::{prelude::*, translate::*}; use std::mem; glib::wrapper! { diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index a698d6048..fc46750b5 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -3,7 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::translate::*; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[derive()] @@ -19,9 +19,9 @@ glib::wrapper! { impl DateTime { #[doc(alias = "gst_date_time_new_from_g_date_time")] #[doc(alias = "new_from_g_date_time")] - pub fn from_g_date_time(dt: &glib::DateTime) -> DateTime { + pub fn from_g_date_time(dt: glib::DateTime) -> DateTime { assert_initialized_main_thread!(); - unsafe { from_glib_full(ffi::gst_date_time_new_from_g_date_time(dt.to_glib_full())) } + unsafe { from_glib_full(ffi::gst_date_time_new_from_g_date_time(dt.into_glib_ptr())) } } #[doc(alias = "gst_date_time_new_from_iso8601_string")] diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index 280ca6cfb..5a5122601 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Caps; -use crate::Element; -use crate::Object; -use crate::Structure; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Caps, Element, Object, Structure}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstDevice")] diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index b63a603f5..9b950e96b 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Bus; -use crate::Object; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Bus, Object}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstDeviceMonitor")] diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index a40f39b3c..09f9623c1 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Bus; -use crate::Device; -use crate::DeviceProviderFactory; -use crate::Object; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Bus, Device, DeviceProviderFactory, Object}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstDeviceProvider")] diff --git a/gstreamer/src/auto/device_provider_factory.rs b/gstreamer/src/auto/device_provider_factory.rs index 7d51607b8..10db790e3 100644 --- a/gstreamer/src/auto/device_provider_factory.rs +++ b/gstreamer/src/auto/device_provider_factory.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::DeviceProvider; -use crate::Object; -use crate::PluginFeature; +use crate::{DeviceProvider, Object, PluginFeature}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index e028a9db9..80bfb8e62 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -4,30 +4,16 @@ // DO NOT EDIT #![allow(deprecated)] -use crate::Bus; -use crate::Caps; -use crate::Clock; -use crate::ClockTime; -use crate::Context; -use crate::ElementFactory; -use crate::Object; -use crate::Pad; -use crate::PadTemplate; -use crate::State; -use crate::StateChange; -use crate::StateChangeError; -use crate::StateChangeReturn; -use crate::StateChangeSuccess; -use crate::URIType; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem; -use std::mem::transmute; -use std::ptr; +use crate::{ + Bus, Caps, Clock, ClockTime, Context, ElementFactory, Object, Pad, PadTemplate, State, + StateChange, StateChangeError, StateChangeReturn, StateChangeSuccess, URIType, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem, mem::transmute, ptr}; glib::wrapper! { #[doc(alias = "GstElement")] diff --git a/gstreamer/src/auto/element_factory.rs b/gstreamer/src/auto/element_factory.rs index ad1725748..3abf52ac4 100644 --- a/gstreamer/src/auto/element_factory.rs +++ b/gstreamer/src/auto/element_factory.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::PluginFeature; -use crate::URIType; +use crate::{Object, PluginFeature, URIType}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index 67fa5899f..83ebe60c7 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -4,15 +4,10 @@ // DO NOT EDIT use crate::EventTypeFlags; -use glib::error::ErrorDomain; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::Quark; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{ + error::ErrorDomain, translate::*, value::FromValue, value::ToValue, Quark, StaticType, Type, +}; +use std::{ffi::CStr, fmt}; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] #[non_exhaustive] @@ -34,6 +29,7 @@ pub enum BufferingMode { impl IntoGlib for BufferingMode { type GlibType = ffi::GstBufferingMode; + #[inline] fn into_glib(self) -> ffi::GstBufferingMode { match self { Self::Stream => ffi::GST_BUFFERING_STREAM, @@ -47,6 +43,7 @@ impl IntoGlib for BufferingMode { #[doc(hidden)] impl FromGlib for BufferingMode { + #[inline] unsafe fn from_glib(value: ffi::GstBufferingMode) -> Self { skip_assert_initialized!(); match value { @@ -60,6 +57,7 @@ impl FromGlib for BufferingMode { } impl StaticType for BufferingMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_buffering_mode_get_type()) } } @@ -72,6 +70,7 @@ impl glib::value::ValueType for BufferingMode { unsafe impl<'a> FromValue<'a> for BufferingMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -79,6 +78,7 @@ unsafe impl<'a> FromValue<'a> for BufferingMode { } impl ToValue for BufferingMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -87,6 +87,7 @@ impl ToValue for BufferingMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -118,6 +119,7 @@ pub enum BusSyncReply { impl IntoGlib for BusSyncReply { type GlibType = ffi::GstBusSyncReply; + #[inline] fn into_glib(self) -> ffi::GstBusSyncReply { match self { Self::Drop => ffi::GST_BUS_DROP, @@ -130,6 +132,7 @@ impl IntoGlib for BusSyncReply { #[doc(hidden)] impl FromGlib for BusSyncReply { + #[inline] unsafe fn from_glib(value: ffi::GstBusSyncReply) -> Self { skip_assert_initialized!(); match value { @@ -142,6 +145,7 @@ impl FromGlib for BusSyncReply { } impl StaticType for BusSyncReply { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_bus_sync_reply_get_type()) } } @@ -154,6 +158,7 @@ impl glib::value::ValueType for BusSyncReply { unsafe impl<'a> FromValue<'a> for BusSyncReply { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -161,6 +166,7 @@ unsafe impl<'a> FromValue<'a> for BusSyncReply { } impl ToValue for BusSyncReply { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -169,6 +175,7 @@ impl ToValue for BusSyncReply { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -198,6 +205,7 @@ pub enum CapsIntersectMode { impl IntoGlib for CapsIntersectMode { type GlibType = ffi::GstCapsIntersectMode; + #[inline] fn into_glib(self) -> ffi::GstCapsIntersectMode { match self { Self::ZigZag => ffi::GST_CAPS_INTERSECT_ZIG_ZAG, @@ -209,6 +217,7 @@ impl IntoGlib for CapsIntersectMode { #[doc(hidden)] impl FromGlib for CapsIntersectMode { + #[inline] unsafe fn from_glib(value: ffi::GstCapsIntersectMode) -> Self { skip_assert_initialized!(); match value { @@ -220,6 +229,7 @@ impl FromGlib for CapsIntersectMode { } impl StaticType for CapsIntersectMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_caps_intersect_mode_get_type()) } } @@ -232,6 +242,7 @@ impl glib::value::ValueType for CapsIntersectMode { unsafe impl<'a> FromValue<'a> for CapsIntersectMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -239,6 +250,7 @@ unsafe impl<'a> FromValue<'a> for CapsIntersectMode { } impl ToValue for CapsIntersectMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -247,6 +259,7 @@ impl ToValue for CapsIntersectMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -276,6 +289,7 @@ pub enum ClockEntryType { impl IntoGlib for ClockEntryType { type GlibType = ffi::GstClockEntryType; + #[inline] fn into_glib(self) -> ffi::GstClockEntryType { match self { Self::Single => ffi::GST_CLOCK_ENTRY_SINGLE, @@ -287,6 +301,7 @@ impl IntoGlib for ClockEntryType { #[doc(hidden)] impl FromGlib for ClockEntryType { + #[inline] unsafe fn from_glib(value: ffi::GstClockEntryType) -> Self { skip_assert_initialized!(); match value { @@ -298,6 +313,7 @@ impl FromGlib for ClockEntryType { } impl StaticType for ClockEntryType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_clock_entry_type_get_type()) } } @@ -310,6 +326,7 @@ impl glib::value::ValueType for ClockEntryType { unsafe impl<'a> FromValue<'a> for ClockEntryType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -317,6 +334,7 @@ unsafe impl<'a> FromValue<'a> for ClockEntryType { } impl ToValue for ClockEntryType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -325,6 +343,7 @@ impl ToValue for ClockEntryType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -367,6 +386,7 @@ pub enum ClockReturn { impl IntoGlib for ClockReturn { type GlibType = ffi::GstClockReturn; + #[inline] fn into_glib(self) -> ffi::GstClockReturn { match self { Self::Ok => ffi::GST_CLOCK_OK, @@ -384,6 +404,7 @@ impl IntoGlib for ClockReturn { #[doc(hidden)] impl FromGlib for ClockReturn { + #[inline] unsafe fn from_glib(value: ffi::GstClockReturn) -> Self { skip_assert_initialized!(); match value { @@ -401,6 +422,7 @@ impl FromGlib for ClockReturn { } impl StaticType for ClockReturn { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_clock_return_get_type()) } } @@ -413,6 +435,7 @@ impl glib::value::ValueType for ClockReturn { unsafe impl<'a> FromValue<'a> for ClockReturn { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -420,6 +443,7 @@ unsafe impl<'a> FromValue<'a> for ClockReturn { } impl ToValue for ClockReturn { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -428,6 +452,7 @@ impl ToValue for ClockReturn { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -463,6 +488,7 @@ pub enum ClockType { impl IntoGlib for ClockType { type GlibType = ffi::GstClockType; + #[inline] fn into_glib(self) -> ffi::GstClockType { match self { Self::Realtime => ffi::GST_CLOCK_TYPE_REALTIME, @@ -477,6 +503,7 @@ impl IntoGlib for ClockType { #[doc(hidden)] impl FromGlib for ClockType { + #[inline] unsafe fn from_glib(value: ffi::GstClockType) -> Self { skip_assert_initialized!(); match value { @@ -491,6 +518,7 @@ impl FromGlib for ClockType { } impl StaticType for ClockType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_clock_type_get_type()) } } @@ -503,6 +531,7 @@ impl glib::value::ValueType for ClockType { unsafe impl<'a> FromValue<'a> for ClockType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -510,6 +539,7 @@ unsafe impl<'a> FromValue<'a> for ClockType { } impl ToValue for ClockType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -518,6 +548,7 @@ impl ToValue for ClockType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -617,39 +648,31 @@ impl FromGlib for CoreError { } impl ErrorDomain for CoreError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_core_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_CORE_ERROR_FAILED => Some(Self::Failed), - ffi::GST_CORE_ERROR_TOO_LAZY => Some(Self::TooLazy), - ffi::GST_CORE_ERROR_NOT_IMPLEMENTED => Some(Self::NotImplemented), - ffi::GST_CORE_ERROR_STATE_CHANGE => Some(Self::StateChange), - ffi::GST_CORE_ERROR_PAD => Some(Self::Pad), - ffi::GST_CORE_ERROR_THREAD => Some(Self::Thread), - ffi::GST_CORE_ERROR_NEGOTIATION => Some(Self::Negotiation), - ffi::GST_CORE_ERROR_EVENT => Some(Self::Event), - ffi::GST_CORE_ERROR_SEEK => Some(Self::Seek), - ffi::GST_CORE_ERROR_CAPS => Some(Self::Caps), - ffi::GST_CORE_ERROR_TAG => Some(Self::Tag), - ffi::GST_CORE_ERROR_MISSING_PLUGIN => Some(Self::MissingPlugin), - ffi::GST_CORE_ERROR_CLOCK => Some(Self::Clock), - ffi::GST_CORE_ERROR_DISABLED => Some(Self::Disabled), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for CoreError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_core_error_get_type()) } } @@ -662,6 +685,7 @@ impl glib::value::ValueType for CoreError { unsafe impl<'a> FromValue<'a> for CoreError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -669,6 +693,7 @@ unsafe impl<'a> FromValue<'a> for CoreError { } impl ToValue for CoreError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -677,6 +702,7 @@ impl ToValue for CoreError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -741,6 +767,7 @@ impl fmt::Display for DebugLevel { impl IntoGlib for DebugLevel { type GlibType = ffi::GstDebugLevel; + #[inline] fn into_glib(self) -> ffi::GstDebugLevel { match self { Self::None => ffi::GST_LEVEL_NONE, @@ -759,6 +786,7 @@ impl IntoGlib for DebugLevel { #[doc(hidden)] impl FromGlib for DebugLevel { + #[inline] unsafe fn from_glib(value: ffi::GstDebugLevel) -> Self { skip_assert_initialized!(); match value { @@ -777,6 +805,7 @@ impl FromGlib for DebugLevel { } impl StaticType for DebugLevel { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_debug_level_get_type()) } } @@ -789,6 +818,7 @@ impl glib::value::ValueType for DebugLevel { unsafe impl<'a> FromValue<'a> for DebugLevel { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -796,6 +826,7 @@ unsafe impl<'a> FromValue<'a> for DebugLevel { } impl ToValue for DebugLevel { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -804,6 +835,7 @@ impl ToValue for DebugLevel { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1017,6 +1049,7 @@ impl FromGlib for EventType { } impl StaticType for EventType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_event_type_get_type()) } } @@ -1029,6 +1062,7 @@ impl glib::value::ValueType for EventType { unsafe impl<'a> FromValue<'a> for EventType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1036,6 +1070,7 @@ unsafe impl<'a> FromValue<'a> for EventType { } impl ToValue for EventType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1044,6 +1079,7 @@ impl ToValue for EventType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1140,6 +1176,7 @@ impl FromGlib for FlowReturn { } impl StaticType for FlowReturn { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_flow_return_get_type()) } } @@ -1152,6 +1189,7 @@ impl glib::value::ValueType for FlowReturn { unsafe impl<'a> FromValue<'a> for FlowReturn { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1159,6 +1197,7 @@ unsafe impl<'a> FromValue<'a> for FlowReturn { } impl ToValue for FlowReturn { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1167,6 +1206,7 @@ impl ToValue for FlowReturn { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1238,6 +1278,7 @@ impl Format { impl IntoGlib for Format { type GlibType = ffi::GstFormat; + #[inline] fn into_glib(self) -> ffi::GstFormat { match self { Self::Undefined => ffi::GST_FORMAT_UNDEFINED, @@ -1253,6 +1294,7 @@ impl IntoGlib for Format { #[doc(hidden)] impl FromGlib for Format { + #[inline] unsafe fn from_glib(value: ffi::GstFormat) -> Self { skip_assert_initialized!(); match value { @@ -1268,6 +1310,7 @@ impl FromGlib for Format { } impl StaticType for Format { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_format_get_type()) } } @@ -1280,6 +1323,7 @@ impl glib::value::ValueType for Format { unsafe impl<'a> FromValue<'a> for Format { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1287,6 +1331,7 @@ unsafe impl<'a> FromValue<'a> for Format { } impl ToValue for Format { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1295,6 +1340,7 @@ impl ToValue for Format { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1332,6 +1378,7 @@ pub enum LibraryError { impl IntoGlib for LibraryError { type GlibType = ffi::GstLibraryError; + #[inline] fn into_glib(self) -> ffi::GstLibraryError { match self { Self::Failed => ffi::GST_LIBRARY_ERROR_FAILED, @@ -1347,6 +1394,7 @@ impl IntoGlib for LibraryError { #[doc(hidden)] impl FromGlib for LibraryError { + #[inline] unsafe fn from_glib(value: ffi::GstLibraryError) -> Self { skip_assert_initialized!(); match value { @@ -1362,31 +1410,31 @@ impl FromGlib for LibraryError { } impl ErrorDomain for LibraryError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_library_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_LIBRARY_ERROR_FAILED => Some(Self::Failed), - ffi::GST_LIBRARY_ERROR_TOO_LAZY => Some(Self::TooLazy), - ffi::GST_LIBRARY_ERROR_INIT => Some(Self::Init), - ffi::GST_LIBRARY_ERROR_SHUTDOWN => Some(Self::Shutdown), - ffi::GST_LIBRARY_ERROR_SETTINGS => Some(Self::Settings), - ffi::GST_LIBRARY_ERROR_ENCODE => Some(Self::Encode), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for LibraryError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_library_error_get_type()) } } @@ -1399,6 +1447,7 @@ impl glib::value::ValueType for LibraryError { unsafe impl<'a> FromValue<'a> for LibraryError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1406,6 +1455,7 @@ unsafe impl<'a> FromValue<'a> for LibraryError { } impl ToValue for LibraryError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1414,6 +1464,7 @@ impl ToValue for LibraryError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1446,6 +1497,7 @@ pub enum PadDirection { impl IntoGlib for PadDirection { type GlibType = ffi::GstPadDirection; + #[inline] fn into_glib(self) -> ffi::GstPadDirection { match self { Self::Unknown => ffi::GST_PAD_UNKNOWN, @@ -1458,6 +1510,7 @@ impl IntoGlib for PadDirection { #[doc(hidden)] impl FromGlib for PadDirection { + #[inline] unsafe fn from_glib(value: ffi::GstPadDirection) -> Self { skip_assert_initialized!(); match value { @@ -1470,6 +1523,7 @@ impl FromGlib for PadDirection { } impl StaticType for PadDirection { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_direction_get_type()) } } @@ -1482,6 +1536,7 @@ impl glib::value::ValueType for PadDirection { unsafe impl<'a> FromValue<'a> for PadDirection { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1489,6 +1544,7 @@ unsafe impl<'a> FromValue<'a> for PadDirection { } impl ToValue for PadDirection { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1497,6 +1553,7 @@ impl ToValue for PadDirection { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1537,6 +1594,7 @@ pub enum PadLinkReturn { impl IntoGlib for PadLinkReturn { type GlibType = ffi::GstPadLinkReturn; + #[inline] fn into_glib(self) -> ffi::GstPadLinkReturn { match self { Self::Ok => ffi::GST_PAD_LINK_OK, @@ -1553,6 +1611,7 @@ impl IntoGlib for PadLinkReturn { #[doc(hidden)] impl FromGlib for PadLinkReturn { + #[inline] unsafe fn from_glib(value: ffi::GstPadLinkReturn) -> Self { skip_assert_initialized!(); match value { @@ -1569,6 +1628,7 @@ impl FromGlib for PadLinkReturn { } impl StaticType for PadLinkReturn { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_link_return_get_type()) } } @@ -1581,6 +1641,7 @@ impl glib::value::ValueType for PadLinkReturn { unsafe impl<'a> FromValue<'a> for PadLinkReturn { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1588,6 +1649,7 @@ unsafe impl<'a> FromValue<'a> for PadLinkReturn { } impl ToValue for PadLinkReturn { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1596,6 +1658,7 @@ impl ToValue for PadLinkReturn { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1648,6 +1711,7 @@ impl fmt::Display for PadMode { impl IntoGlib for PadMode { type GlibType = ffi::GstPadMode; + #[inline] fn into_glib(self) -> ffi::GstPadMode { match self { Self::None => ffi::GST_PAD_MODE_NONE, @@ -1660,6 +1724,7 @@ impl IntoGlib for PadMode { #[doc(hidden)] impl FromGlib for PadMode { + #[inline] unsafe fn from_glib(value: ffi::GstPadMode) -> Self { skip_assert_initialized!(); match value { @@ -1672,6 +1737,7 @@ impl FromGlib for PadMode { } impl StaticType for PadMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_mode_get_type()) } } @@ -1684,6 +1750,7 @@ impl glib::value::ValueType for PadMode { unsafe impl<'a> FromValue<'a> for PadMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1691,6 +1758,7 @@ unsafe impl<'a> FromValue<'a> for PadMode { } impl ToValue for PadMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1699,6 +1767,7 @@ impl ToValue for PadMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1731,6 +1800,7 @@ pub enum PadPresence { impl IntoGlib for PadPresence { type GlibType = ffi::GstPadPresence; + #[inline] fn into_glib(self) -> ffi::GstPadPresence { match self { Self::Always => ffi::GST_PAD_ALWAYS, @@ -1743,6 +1813,7 @@ impl IntoGlib for PadPresence { #[doc(hidden)] impl FromGlib for PadPresence { + #[inline] unsafe fn from_glib(value: ffi::GstPadPresence) -> Self { skip_assert_initialized!(); match value { @@ -1755,6 +1826,7 @@ impl FromGlib for PadPresence { } impl StaticType for PadPresence { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_presence_get_type()) } } @@ -1767,6 +1839,7 @@ impl glib::value::ValueType for PadPresence { unsafe impl<'a> FromValue<'a> for PadPresence { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1774,6 +1847,7 @@ unsafe impl<'a> FromValue<'a> for PadPresence { } impl ToValue for PadPresence { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1782,6 +1856,7 @@ impl ToValue for PadPresence { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1817,6 +1892,7 @@ pub enum PadProbeReturn { impl IntoGlib for PadProbeReturn { type GlibType = ffi::GstPadProbeReturn; + #[inline] fn into_glib(self) -> ffi::GstPadProbeReturn { match self { Self::Drop => ffi::GST_PAD_PROBE_DROP, @@ -1831,6 +1907,7 @@ impl IntoGlib for PadProbeReturn { #[doc(hidden)] impl FromGlib for PadProbeReturn { + #[inline] unsafe fn from_glib(value: ffi::GstPadProbeReturn) -> Self { skip_assert_initialized!(); match value { @@ -1845,6 +1922,7 @@ impl FromGlib for PadProbeReturn { } impl StaticType for PadProbeReturn { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_probe_return_get_type()) } } @@ -1857,6 +1935,7 @@ impl glib::value::ValueType for PadProbeReturn { unsafe impl<'a> FromValue<'a> for PadProbeReturn { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1864,6 +1943,7 @@ unsafe impl<'a> FromValue<'a> for PadProbeReturn { } impl ToValue for PadProbeReturn { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1872,6 +1952,7 @@ impl ToValue for PadProbeReturn { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1913,6 +1994,7 @@ pub enum ParseError { impl IntoGlib for ParseError { type GlibType = ffi::GstParseError; + #[inline] fn into_glib(self) -> ffi::GstParseError { match self { Self::Syntax => ffi::GST_PARSE_ERROR_SYNTAX, @@ -1930,6 +2012,7 @@ impl IntoGlib for ParseError { #[doc(hidden)] impl FromGlib for ParseError { + #[inline] unsafe fn from_glib(value: ffi::GstParseError) -> Self { skip_assert_initialized!(); match value { @@ -1947,33 +2030,30 @@ impl FromGlib for ParseError { } impl ErrorDomain for ParseError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_parse_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_PARSE_ERROR_SYNTAX => Some(Self::Syntax), - ffi::GST_PARSE_ERROR_NO_SUCH_ELEMENT => Some(Self::NoSuchElement), - ffi::GST_PARSE_ERROR_NO_SUCH_PROPERTY => Some(Self::NoSuchProperty), - ffi::GST_PARSE_ERROR_LINK => Some(Self::Link), - ffi::GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY => Some(Self::CouldNotSetProperty), - ffi::GST_PARSE_ERROR_EMPTY_BIN => Some(Self::EmptyBin), - ffi::GST_PARSE_ERROR_EMPTY => Some(Self::Empty), - ffi::GST_PARSE_ERROR_DELAYED_LINK => Some(Self::DelayedLink), - value => Some(Self::__Unknown(value)), + match unsafe { from_glib(code) } { + value => Some(value), } } } impl StaticType for ParseError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_parse_error_get_type()) } } @@ -1986,6 +2066,7 @@ impl glib::value::ValueType for ParseError { unsafe impl<'a> FromValue<'a> for ParseError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -1993,6 +2074,7 @@ unsafe impl<'a> FromValue<'a> for ParseError { } impl ToValue for ParseError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2001,6 +2083,7 @@ impl ToValue for ParseError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2032,6 +2115,7 @@ pub enum PluginError { impl IntoGlib for PluginError { type GlibType = ffi::GstPluginError; + #[inline] fn into_glib(self) -> ffi::GstPluginError { match self { Self::Module => ffi::GST_PLUGIN_ERROR_MODULE, @@ -2044,6 +2128,7 @@ impl IntoGlib for PluginError { #[doc(hidden)] impl FromGlib for PluginError { + #[inline] unsafe fn from_glib(value: ffi::GstPluginError) -> Self { skip_assert_initialized!(); match value { @@ -2056,28 +2141,30 @@ impl FromGlib for PluginError { } impl ErrorDomain for PluginError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_plugin_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_PLUGIN_ERROR_MODULE => Some(Self::Module), - ffi::GST_PLUGIN_ERROR_DEPENDENCIES => Some(Self::Dependencies), - ffi::GST_PLUGIN_ERROR_NAME_MISMATCH => Some(Self::NameMismatch), - value => Some(Self::__Unknown(value)), + match unsafe { from_glib(code) } { + value => Some(value), } } } impl StaticType for PluginError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_plugin_error_get_type()) } } @@ -2090,6 +2177,7 @@ impl glib::value::ValueType for PluginError { unsafe impl<'a> FromValue<'a> for PluginError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2097,6 +2185,7 @@ unsafe impl<'a> FromValue<'a> for PluginError { } impl ToValue for PluginError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2105,6 +2194,7 @@ impl ToValue for PluginError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2140,6 +2230,7 @@ pub enum ProgressType { impl IntoGlib for ProgressType { type GlibType = ffi::GstProgressType; + #[inline] fn into_glib(self) -> ffi::GstProgressType { match self { Self::Start => ffi::GST_PROGRESS_TYPE_START, @@ -2154,6 +2245,7 @@ impl IntoGlib for ProgressType { #[doc(hidden)] impl FromGlib for ProgressType { + #[inline] unsafe fn from_glib(value: ffi::GstProgressType) -> Self { skip_assert_initialized!(); match value { @@ -2168,6 +2260,7 @@ impl FromGlib for ProgressType { } impl StaticType for ProgressType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_progress_type_get_type()) } } @@ -2180,6 +2273,7 @@ impl glib::value::ValueType for ProgressType { unsafe impl<'a> FromValue<'a> for ProgressType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2187,6 +2281,7 @@ unsafe impl<'a> FromValue<'a> for ProgressType { } impl ToValue for ProgressType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2195,6 +2290,7 @@ impl ToValue for ProgressType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2228,6 +2324,7 @@ pub enum PromiseResult { impl IntoGlib for PromiseResult { type GlibType = ffi::GstPromiseResult; + #[inline] fn into_glib(self) -> ffi::GstPromiseResult { match self { Self::Pending => ffi::GST_PROMISE_RESULT_PENDING, @@ -2241,6 +2338,7 @@ impl IntoGlib for PromiseResult { #[doc(hidden)] impl FromGlib for PromiseResult { + #[inline] unsafe fn from_glib(value: ffi::GstPromiseResult) -> Self { skip_assert_initialized!(); match value { @@ -2254,6 +2352,7 @@ impl FromGlib for PromiseResult { } impl StaticType for PromiseResult { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_promise_result_get_type()) } } @@ -2266,6 +2365,7 @@ impl glib::value::ValueType for PromiseResult { unsafe impl<'a> FromValue<'a> for PromiseResult { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2273,6 +2373,7 @@ unsafe impl<'a> FromValue<'a> for PromiseResult { } impl ToValue for PromiseResult { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2281,6 +2382,7 @@ impl ToValue for PromiseResult { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2312,6 +2414,7 @@ pub enum QOSType { impl IntoGlib for QOSType { type GlibType = ffi::GstQOSType; + #[inline] fn into_glib(self) -> ffi::GstQOSType { match self { Self::Overflow => ffi::GST_QOS_TYPE_OVERFLOW, @@ -2324,6 +2427,7 @@ impl IntoGlib for QOSType { #[doc(hidden)] impl FromGlib for QOSType { + #[inline] unsafe fn from_glib(value: ffi::GstQOSType) -> Self { skip_assert_initialized!(); match value { @@ -2336,6 +2440,7 @@ impl FromGlib for QOSType { } impl StaticType for QOSType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_qos_type_get_type()) } } @@ -2348,6 +2453,7 @@ impl glib::value::ValueType for QOSType { unsafe impl<'a> FromValue<'a> for QOSType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2355,6 +2461,7 @@ unsafe impl<'a> FromValue<'a> for QOSType { } impl ToValue for QOSType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2363,6 +2470,7 @@ impl ToValue for QOSType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2397,6 +2505,7 @@ pub enum Rank { impl IntoGlib for Rank { type GlibType = ffi::GstRank; + #[inline] fn into_glib(self) -> ffi::GstRank { match self { Self::None => ffi::GST_RANK_NONE, @@ -2410,6 +2519,7 @@ impl IntoGlib for Rank { #[doc(hidden)] impl FromGlib for Rank { + #[inline] unsafe fn from_glib(value: ffi::GstRank) -> Self { skip_assert_initialized!(); match value { @@ -2423,6 +2533,7 @@ impl FromGlib for Rank { } impl StaticType for Rank { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_rank_get_type()) } } @@ -2435,6 +2546,7 @@ impl glib::value::ValueType for Rank { unsafe impl<'a> FromValue<'a> for Rank { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2442,6 +2554,7 @@ unsafe impl<'a> FromValue<'a> for Rank { } impl ToValue for Rank { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2450,6 +2563,7 @@ impl ToValue for Rank { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2553,40 +2667,31 @@ impl FromGlib for ResourceError { } impl ErrorDomain for ResourceError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_resource_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_RESOURCE_ERROR_FAILED => Some(Self::Failed), - ffi::GST_RESOURCE_ERROR_TOO_LAZY => Some(Self::TooLazy), - ffi::GST_RESOURCE_ERROR_NOT_FOUND => Some(Self::NotFound), - ffi::GST_RESOURCE_ERROR_BUSY => Some(Self::Busy), - ffi::GST_RESOURCE_ERROR_OPEN_READ => Some(Self::OpenRead), - ffi::GST_RESOURCE_ERROR_OPEN_WRITE => Some(Self::OpenWrite), - ffi::GST_RESOURCE_ERROR_OPEN_READ_WRITE => Some(Self::OpenReadWrite), - ffi::GST_RESOURCE_ERROR_CLOSE => Some(Self::Close), - ffi::GST_RESOURCE_ERROR_READ => Some(Self::Read), - ffi::GST_RESOURCE_ERROR_WRITE => Some(Self::Write), - ffi::GST_RESOURCE_ERROR_SEEK => Some(Self::Seek), - ffi::GST_RESOURCE_ERROR_SYNC => Some(Self::Sync), - ffi::GST_RESOURCE_ERROR_SETTINGS => Some(Self::Settings), - ffi::GST_RESOURCE_ERROR_NO_SPACE_LEFT => Some(Self::NoSpaceLeft), - ffi::GST_RESOURCE_ERROR_NOT_AUTHORIZED => Some(Self::NotAuthorized), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for ResourceError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_resource_error_get_type()) } } @@ -2599,6 +2704,7 @@ impl glib::value::ValueType for ResourceError { unsafe impl<'a> FromValue<'a> for ResourceError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2606,6 +2712,7 @@ unsafe impl<'a> FromValue<'a> for ResourceError { } impl ToValue for ResourceError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2614,6 +2721,7 @@ impl ToValue for ResourceError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2645,6 +2753,7 @@ pub enum SeekType { impl IntoGlib for SeekType { type GlibType = ffi::GstSeekType; + #[inline] fn into_glib(self) -> ffi::GstSeekType { match self { Self::None => ffi::GST_SEEK_TYPE_NONE, @@ -2657,6 +2766,7 @@ impl IntoGlib for SeekType { #[doc(hidden)] impl FromGlib for SeekType { + #[inline] unsafe fn from_glib(value: ffi::GstSeekType) -> Self { skip_assert_initialized!(); match value { @@ -2669,6 +2779,7 @@ impl FromGlib for SeekType { } impl StaticType for SeekType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_seek_type_get_type()) } } @@ -2681,6 +2792,7 @@ impl glib::value::ValueType for SeekType { unsafe impl<'a> FromValue<'a> for SeekType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2688,6 +2800,7 @@ unsafe impl<'a> FromValue<'a> for SeekType { } impl ToValue for SeekType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2696,6 +2809,7 @@ impl ToValue for SeekType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2732,6 +2846,7 @@ pub enum State { impl IntoGlib for State { type GlibType = ffi::GstState; + #[inline] fn into_glib(self) -> ffi::GstState { match self { Self::VoidPending => ffi::GST_STATE_VOID_PENDING, @@ -2746,6 +2861,7 @@ impl IntoGlib for State { #[doc(hidden)] impl FromGlib for State { + #[inline] unsafe fn from_glib(value: ffi::GstState) -> Self { skip_assert_initialized!(); match value { @@ -2760,6 +2876,7 @@ impl FromGlib for State { } impl StaticType for State { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_state_get_type()) } } @@ -2772,6 +2889,7 @@ impl glib::value::ValueType for State { unsafe impl<'a> FromValue<'a> for State { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2779,6 +2897,7 @@ unsafe impl<'a> FromValue<'a> for State { } impl ToValue for State { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2787,6 +2906,7 @@ impl ToValue for State { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2853,6 +2973,7 @@ impl fmt::Display for StateChange { impl IntoGlib for StateChange { type GlibType = ffi::GstStateChange; + #[inline] fn into_glib(self) -> ffi::GstStateChange { match self { Self::NullToReady => ffi::GST_STATE_CHANGE_NULL_TO_READY, @@ -2872,6 +2993,7 @@ impl IntoGlib for StateChange { #[doc(hidden)] impl FromGlib for StateChange { + #[inline] unsafe fn from_glib(value: ffi::GstStateChange) -> Self { skip_assert_initialized!(); match value { @@ -2891,6 +3013,7 @@ impl FromGlib for StateChange { } impl StaticType for StateChange { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_state_change_get_type()) } } @@ -2903,6 +3026,7 @@ impl glib::value::ValueType for StateChange { unsafe impl<'a> FromValue<'a> for StateChange { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2910,6 +3034,7 @@ unsafe impl<'a> FromValue<'a> for StateChange { } impl ToValue for StateChange { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2918,6 +3043,7 @@ impl ToValue for StateChange { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2952,6 +3078,7 @@ pub enum StateChangeReturn { impl IntoGlib for StateChangeReturn { type GlibType = ffi::GstStateChangeReturn; + #[inline] fn into_glib(self) -> ffi::GstStateChangeReturn { match self { Self::Failure => ffi::GST_STATE_CHANGE_FAILURE, @@ -2965,6 +3092,7 @@ impl IntoGlib for StateChangeReturn { #[doc(hidden)] impl FromGlib for StateChangeReturn { + #[inline] unsafe fn from_glib(value: ffi::GstStateChangeReturn) -> Self { skip_assert_initialized!(); match value { @@ -2978,6 +3106,7 @@ impl FromGlib for StateChangeReturn { } impl StaticType for StateChangeReturn { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_state_change_return_get_type()) } } @@ -2990,6 +3119,7 @@ impl glib::value::ValueType for StateChangeReturn { unsafe impl<'a> FromValue<'a> for StateChangeReturn { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -2997,6 +3127,7 @@ unsafe impl<'a> FromValue<'a> for StateChangeReturn { } impl ToValue for StateChangeReturn { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3005,6 +3136,7 @@ impl ToValue for StateChangeReturn { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3100,38 +3232,31 @@ impl FromGlib for StreamError { } impl ErrorDomain for StreamError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_stream_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_STREAM_ERROR_FAILED => Some(Self::Failed), - ffi::GST_STREAM_ERROR_TOO_LAZY => Some(Self::TooLazy), - ffi::GST_STREAM_ERROR_NOT_IMPLEMENTED => Some(Self::NotImplemented), - ffi::GST_STREAM_ERROR_TYPE_NOT_FOUND => Some(Self::TypeNotFound), - ffi::GST_STREAM_ERROR_WRONG_TYPE => Some(Self::WrongType), - ffi::GST_STREAM_ERROR_CODEC_NOT_FOUND => Some(Self::CodecNotFound), - ffi::GST_STREAM_ERROR_DECODE => Some(Self::Decode), - ffi::GST_STREAM_ERROR_ENCODE => Some(Self::Encode), - ffi::GST_STREAM_ERROR_DEMUX => Some(Self::Demux), - ffi::GST_STREAM_ERROR_MUX => Some(Self::Mux), - ffi::GST_STREAM_ERROR_FORMAT => Some(Self::Format), - ffi::GST_STREAM_ERROR_DECRYPT => Some(Self::Decrypt), - ffi::GST_STREAM_ERROR_DECRYPT_NOKEY => Some(Self::DecryptNokey), - _ => Some(Self::Failed), + match unsafe { from_glib(code) } { + Self::__Unknown(_) => Some(Self::Failed), + value => Some(value), } } } impl StaticType for StreamError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_stream_error_get_type()) } } @@ -3144,6 +3269,7 @@ impl glib::value::ValueType for StreamError { unsafe impl<'a> FromValue<'a> for StreamError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3151,6 +3277,7 @@ unsafe impl<'a> FromValue<'a> for StreamError { } impl ToValue for StreamError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3159,6 +3286,7 @@ impl ToValue for StreamError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3198,6 +3326,7 @@ pub enum StreamStatusType { impl IntoGlib for StreamStatusType { type GlibType = ffi::GstStreamStatusType; + #[inline] fn into_glib(self) -> ffi::GstStreamStatusType { match self { Self::Create => ffi::GST_STREAM_STATUS_TYPE_CREATE, @@ -3214,6 +3343,7 @@ impl IntoGlib for StreamStatusType { #[doc(hidden)] impl FromGlib for StreamStatusType { + #[inline] unsafe fn from_glib(value: ffi::GstStreamStatusType) -> Self { skip_assert_initialized!(); match value { @@ -3230,6 +3360,7 @@ impl FromGlib for StreamStatusType { } impl StaticType for StreamStatusType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_stream_status_type_get_type()) } } @@ -3242,6 +3373,7 @@ impl glib::value::ValueType for StreamStatusType { unsafe impl<'a> FromValue<'a> for StreamStatusType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3249,6 +3381,7 @@ unsafe impl<'a> FromValue<'a> for StreamStatusType { } impl ToValue for StreamStatusType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3257,6 +3390,7 @@ impl ToValue for StreamStatusType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3286,6 +3420,7 @@ pub enum StructureChangeType { impl IntoGlib for StructureChangeType { type GlibType = ffi::GstStructureChangeType; + #[inline] fn into_glib(self) -> ffi::GstStructureChangeType { match self { Self::Link => ffi::GST_STRUCTURE_CHANGE_TYPE_PAD_LINK, @@ -3297,6 +3432,7 @@ impl IntoGlib for StructureChangeType { #[doc(hidden)] impl FromGlib for StructureChangeType { + #[inline] unsafe fn from_glib(value: ffi::GstStructureChangeType) -> Self { skip_assert_initialized!(); match value { @@ -3308,6 +3444,7 @@ impl FromGlib for StructureChangeType { } impl StaticType for StructureChangeType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_structure_change_type_get_type()) } } @@ -3320,6 +3457,7 @@ impl glib::value::ValueType for StructureChangeType { unsafe impl<'a> FromValue<'a> for StructureChangeType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3327,6 +3465,7 @@ unsafe impl<'a> FromValue<'a> for StructureChangeType { } impl ToValue for StructureChangeType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3335,6 +3474,7 @@ impl ToValue for StructureChangeType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3368,6 +3508,7 @@ pub enum TagFlag { impl IntoGlib for TagFlag { type GlibType = ffi::GstTagFlag; + #[inline] fn into_glib(self) -> ffi::GstTagFlag { match self { Self::Undefined => ffi::GST_TAG_FLAG_UNDEFINED, @@ -3381,6 +3522,7 @@ impl IntoGlib for TagFlag { #[doc(hidden)] impl FromGlib for TagFlag { + #[inline] unsafe fn from_glib(value: ffi::GstTagFlag) -> Self { skip_assert_initialized!(); match value { @@ -3394,6 +3536,7 @@ impl FromGlib for TagFlag { } impl StaticType for TagFlag { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_tag_flag_get_type()) } } @@ -3406,6 +3549,7 @@ impl glib::value::ValueType for TagFlag { unsafe impl<'a> FromValue<'a> for TagFlag { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3413,6 +3557,7 @@ unsafe impl<'a> FromValue<'a> for TagFlag { } impl ToValue for TagFlag { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3421,6 +3566,7 @@ impl ToValue for TagFlag { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3460,6 +3606,7 @@ pub enum TagMergeMode { impl IntoGlib for TagMergeMode { type GlibType = ffi::GstTagMergeMode; + #[inline] fn into_glib(self) -> ffi::GstTagMergeMode { match self { Self::Undefined => ffi::GST_TAG_MERGE_UNDEFINED, @@ -3476,6 +3623,7 @@ impl IntoGlib for TagMergeMode { #[doc(hidden)] impl FromGlib for TagMergeMode { + #[inline] unsafe fn from_glib(value: ffi::GstTagMergeMode) -> Self { skip_assert_initialized!(); match value { @@ -3492,6 +3640,7 @@ impl FromGlib for TagMergeMode { } impl StaticType for TagMergeMode { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_tag_merge_mode_get_type()) } } @@ -3504,6 +3653,7 @@ impl glib::value::ValueType for TagMergeMode { unsafe impl<'a> FromValue<'a> for TagMergeMode { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3511,6 +3661,7 @@ unsafe impl<'a> FromValue<'a> for TagMergeMode { } impl ToValue for TagMergeMode { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3519,6 +3670,7 @@ impl ToValue for TagMergeMode { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3549,6 +3701,7 @@ pub enum TagScope { impl IntoGlib for TagScope { type GlibType = ffi::GstTagScope; + #[inline] fn into_glib(self) -> ffi::GstTagScope { match self { Self::Stream => ffi::GST_TAG_SCOPE_STREAM, @@ -3560,6 +3713,7 @@ impl IntoGlib for TagScope { #[doc(hidden)] impl FromGlib for TagScope { + #[inline] unsafe fn from_glib(value: ffi::GstTagScope) -> Self { skip_assert_initialized!(); match value { @@ -3571,6 +3725,7 @@ impl FromGlib for TagScope { } impl StaticType for TagScope { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_tag_scope_get_type()) } } @@ -3583,6 +3738,7 @@ impl glib::value::ValueType for TagScope { unsafe impl<'a> FromValue<'a> for TagScope { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3590,6 +3746,7 @@ unsafe impl<'a> FromValue<'a> for TagScope { } impl ToValue for TagScope { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3598,6 +3755,7 @@ impl ToValue for TagScope { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3629,6 +3787,7 @@ pub enum TaskState { impl IntoGlib for TaskState { type GlibType = ffi::GstTaskState; + #[inline] fn into_glib(self) -> ffi::GstTaskState { match self { Self::Started => ffi::GST_TASK_STARTED, @@ -3641,6 +3800,7 @@ impl IntoGlib for TaskState { #[doc(hidden)] impl FromGlib for TaskState { + #[inline] unsafe fn from_glib(value: ffi::GstTaskState) -> Self { skip_assert_initialized!(); match value { @@ -3653,6 +3813,7 @@ impl FromGlib for TaskState { } impl StaticType for TaskState { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_task_state_get_type()) } } @@ -3665,6 +3826,7 @@ impl glib::value::ValueType for TaskState { unsafe impl<'a> FromValue<'a> for TaskState { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3672,6 +3834,7 @@ unsafe impl<'a> FromValue<'a> for TaskState { } impl ToValue for TaskState { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3680,6 +3843,7 @@ impl ToValue for TaskState { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3734,6 +3898,7 @@ impl TocEntryType { impl IntoGlib for TocEntryType { type GlibType = ffi::GstTocEntryType; + #[inline] fn into_glib(self) -> ffi::GstTocEntryType { match self { Self::Angle => ffi::GST_TOC_ENTRY_TYPE_ANGLE, @@ -3750,6 +3915,7 @@ impl IntoGlib for TocEntryType { #[doc(hidden)] impl FromGlib for TocEntryType { + #[inline] unsafe fn from_glib(value: ffi::GstTocEntryType) -> Self { skip_assert_initialized!(); match value { @@ -3766,6 +3932,7 @@ impl FromGlib for TocEntryType { } impl StaticType for TocEntryType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_toc_entry_type_get_type()) } } @@ -3778,6 +3945,7 @@ impl glib::value::ValueType for TocEntryType { unsafe impl<'a> FromValue<'a> for TocEntryType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3785,6 +3953,7 @@ unsafe impl<'a> FromValue<'a> for TocEntryType { } impl ToValue for TocEntryType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3793,6 +3962,7 @@ impl ToValue for TocEntryType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3827,6 +3997,7 @@ pub enum TocLoopType { impl IntoGlib for TocLoopType { type GlibType = ffi::GstTocLoopType; + #[inline] fn into_glib(self) -> ffi::GstTocLoopType { match self { Self::None => ffi::GST_TOC_LOOP_NONE, @@ -3840,6 +4011,7 @@ impl IntoGlib for TocLoopType { #[doc(hidden)] impl FromGlib for TocLoopType { + #[inline] unsafe fn from_glib(value: ffi::GstTocLoopType) -> Self { skip_assert_initialized!(); match value { @@ -3853,6 +4025,7 @@ impl FromGlib for TocLoopType { } impl StaticType for TocLoopType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_toc_loop_type_get_type()) } } @@ -3865,6 +4038,7 @@ impl glib::value::ValueType for TocLoopType { unsafe impl<'a> FromValue<'a> for TocLoopType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3872,6 +4046,7 @@ unsafe impl<'a> FromValue<'a> for TocLoopType { } impl ToValue for TocLoopType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3880,6 +4055,7 @@ impl ToValue for TocLoopType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3910,6 +4086,7 @@ pub enum TocScope { impl IntoGlib for TocScope { type GlibType = ffi::GstTocScope; + #[inline] fn into_glib(self) -> ffi::GstTocScope { match self { Self::Global => ffi::GST_TOC_SCOPE_GLOBAL, @@ -3921,6 +4098,7 @@ impl IntoGlib for TocScope { #[doc(hidden)] impl FromGlib for TocScope { + #[inline] unsafe fn from_glib(value: ffi::GstTocScope) -> Self { skip_assert_initialized!(); match value { @@ -3932,6 +4110,7 @@ impl FromGlib for TocScope { } impl StaticType for TocScope { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_toc_scope_get_type()) } } @@ -3944,6 +4123,7 @@ impl glib::value::ValueType for TocScope { unsafe impl<'a> FromValue<'a> for TocScope { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -3951,6 +4131,7 @@ unsafe impl<'a> FromValue<'a> for TocScope { } impl ToValue for TocScope { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -3959,6 +4140,7 @@ impl ToValue for TocScope { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -3996,6 +4178,7 @@ pub enum TypeFindProbability { impl IntoGlib for TypeFindProbability { type GlibType = ffi::GstTypeFindProbability; + #[inline] fn into_glib(self) -> ffi::GstTypeFindProbability { match self { Self::None => ffi::GST_TYPE_FIND_NONE, @@ -4011,6 +4194,7 @@ impl IntoGlib for TypeFindProbability { #[doc(hidden)] impl FromGlib for TypeFindProbability { + #[inline] unsafe fn from_glib(value: ffi::GstTypeFindProbability) -> Self { skip_assert_initialized!(); match value { @@ -4026,6 +4210,7 @@ impl FromGlib for TypeFindProbability { } impl StaticType for TypeFindProbability { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_type_find_probability_get_type()) } } @@ -4038,6 +4223,7 @@ impl glib::value::ValueType for TypeFindProbability { unsafe impl<'a> FromValue<'a> for TypeFindProbability { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -4045,6 +4231,7 @@ unsafe impl<'a> FromValue<'a> for TypeFindProbability { } impl ToValue for TypeFindProbability { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -4053,6 +4240,7 @@ impl ToValue for TypeFindProbability { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -4086,6 +4274,7 @@ pub enum URIError { impl IntoGlib for URIError { type GlibType = ffi::GstURIError; + #[inline] fn into_glib(self) -> ffi::GstURIError { match self { Self::UnsupportedProtocol => ffi::GST_URI_ERROR_UNSUPPORTED_PROTOCOL, @@ -4099,6 +4288,7 @@ impl IntoGlib for URIError { #[doc(hidden)] impl FromGlib for URIError { + #[inline] unsafe fn from_glib(value: ffi::GstURIError) -> Self { skip_assert_initialized!(); match value { @@ -4112,29 +4302,30 @@ impl FromGlib for URIError { } impl ErrorDomain for URIError { + #[inline] fn domain() -> Quark { skip_assert_initialized!(); unsafe { from_glib(ffi::gst_uri_error_quark()) } } + #[inline] fn code(self) -> i32 { self.into_glib() } + #[inline] + #[allow(clippy::match_single_binding)] fn from(code: i32) -> Option { skip_assert_initialized!(); - match code { - ffi::GST_URI_ERROR_UNSUPPORTED_PROTOCOL => Some(Self::UnsupportedProtocol), - ffi::GST_URI_ERROR_BAD_URI => Some(Self::BadUri), - ffi::GST_URI_ERROR_BAD_STATE => Some(Self::BadState), - ffi::GST_URI_ERROR_BAD_REFERENCE => Some(Self::BadReference), - value => Some(Self::__Unknown(value)), + match unsafe { from_glib(code) } { + value => Some(value), } } } impl StaticType for URIError { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_uri_error_get_type()) } } @@ -4147,6 +4338,7 @@ impl glib::value::ValueType for URIError { unsafe impl<'a> FromValue<'a> for URIError { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -4154,6 +4346,7 @@ unsafe impl<'a> FromValue<'a> for URIError { } impl ToValue for URIError { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -4162,6 +4355,7 @@ impl ToValue for URIError { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -4194,6 +4388,7 @@ pub enum URIType { impl IntoGlib for URIType { type GlibType = ffi::GstURIType; + #[inline] fn into_glib(self) -> ffi::GstURIType { match self { Self::Unknown => ffi::GST_URI_UNKNOWN, @@ -4206,6 +4401,7 @@ impl IntoGlib for URIType { #[doc(hidden)] impl FromGlib for URIType { + #[inline] unsafe fn from_glib(value: ffi::GstURIType) -> Self { skip_assert_initialized!(); match value { @@ -4218,6 +4414,7 @@ impl FromGlib for URIType { } impl StaticType for URIType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_uri_type_get_type()) } } @@ -4230,6 +4427,7 @@ impl glib::value::ValueType for URIType { unsafe impl<'a> FromValue<'a> for URIType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0)) @@ -4237,6 +4435,7 @@ unsafe impl<'a> FromValue<'a> for URIType { } impl ToValue for URIType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -4245,6 +4444,7 @@ impl ToValue for URIType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 29867ef48..1fa80fcc0 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -4,13 +4,8 @@ // DO NOT EDIT use bitflags::bitflags; -use glib::translate::*; -use glib::value::FromValue; -use glib::value::ToValue; -use glib::StaticType; -use glib::Type; -use std::ffi::CStr; -use std::fmt; +use glib::{translate::*, value::FromValue, value::ToValue, StaticType, Type}; +use std::{ffi::CStr, fmt}; bitflags! { #[doc(alias = "GstBinFlags")] @@ -26,6 +21,7 @@ bitflags! { impl IntoGlib for BinFlags { type GlibType = ffi::GstBinFlags; + #[inline] fn into_glib(self) -> ffi::GstBinFlags { self.bits() } @@ -33,6 +29,7 @@ impl IntoGlib for BinFlags { #[doc(hidden)] impl FromGlib for BinFlags { + #[inline] unsafe fn from_glib(value: ffi::GstBinFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -40,6 +37,7 @@ impl FromGlib for BinFlags { } impl StaticType for BinFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_bin_flags_get_type()) } } @@ -52,6 +50,7 @@ impl glib::value::ValueType for BinFlags { unsafe impl<'a> FromValue<'a> for BinFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -59,6 +58,7 @@ unsafe impl<'a> FromValue<'a> for BinFlags { } impl ToValue for BinFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -67,6 +67,7 @@ impl ToValue for BinFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -102,6 +103,7 @@ bitflags! { impl IntoGlib for BufferCopyFlags { type GlibType = ffi::GstBufferCopyFlags; + #[inline] fn into_glib(self) -> ffi::GstBufferCopyFlags { self.bits() } @@ -109,6 +111,7 @@ impl IntoGlib for BufferCopyFlags { #[doc(hidden)] impl FromGlib for BufferCopyFlags { + #[inline] unsafe fn from_glib(value: ffi::GstBufferCopyFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -116,6 +119,7 @@ impl FromGlib for BufferCopyFlags { } impl StaticType for BufferCopyFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_buffer_copy_flags_get_type()) } } @@ -128,6 +132,7 @@ impl glib::value::ValueType for BufferCopyFlags { unsafe impl<'a> FromValue<'a> for BufferCopyFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -135,6 +140,7 @@ unsafe impl<'a> FromValue<'a> for BufferCopyFlags { } impl ToValue for BufferCopyFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -143,6 +149,7 @@ impl ToValue for BufferCopyFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -192,6 +199,7 @@ bitflags! { impl IntoGlib for BufferFlags { type GlibType = ffi::GstBufferFlags; + #[inline] fn into_glib(self) -> ffi::GstBufferFlags { self.bits() } @@ -199,6 +207,7 @@ impl IntoGlib for BufferFlags { #[doc(hidden)] impl FromGlib for BufferFlags { + #[inline] unsafe fn from_glib(value: ffi::GstBufferFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -206,6 +215,7 @@ impl FromGlib for BufferFlags { } impl StaticType for BufferFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_buffer_flags_get_type()) } } @@ -218,6 +228,7 @@ impl glib::value::ValueType for BufferFlags { unsafe impl<'a> FromValue<'a> for BufferFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -225,6 +236,7 @@ unsafe impl<'a> FromValue<'a> for BufferFlags { } impl ToValue for BufferFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -233,6 +245,7 @@ impl ToValue for BufferFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -262,6 +275,7 @@ bitflags! { impl IntoGlib for BufferPoolAcquireFlags { type GlibType = ffi::GstBufferPoolAcquireFlags; + #[inline] fn into_glib(self) -> ffi::GstBufferPoolAcquireFlags { self.bits() } @@ -269,6 +283,7 @@ impl IntoGlib for BufferPoolAcquireFlags { #[doc(hidden)] impl FromGlib for BufferPoolAcquireFlags { + #[inline] unsafe fn from_glib(value: ffi::GstBufferPoolAcquireFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -276,6 +291,7 @@ impl FromGlib for BufferPoolAcquireFlags { } impl StaticType for BufferPoolAcquireFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_buffer_pool_acquire_flags_get_type()) } } @@ -288,6 +304,7 @@ impl glib::value::ValueType for BufferPoolAcquireFlags { unsafe impl<'a> FromValue<'a> for BufferPoolAcquireFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -295,6 +312,7 @@ unsafe impl<'a> FromValue<'a> for BufferPoolAcquireFlags { } impl ToValue for BufferPoolAcquireFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -303,6 +321,7 @@ impl ToValue for BufferPoolAcquireFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -340,6 +359,7 @@ bitflags! { impl IntoGlib for ClockFlags { type GlibType = ffi::GstClockFlags; + #[inline] fn into_glib(self) -> ffi::GstClockFlags { self.bits() } @@ -347,6 +367,7 @@ impl IntoGlib for ClockFlags { #[doc(hidden)] impl FromGlib for ClockFlags { + #[inline] unsafe fn from_glib(value: ffi::GstClockFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -354,6 +375,7 @@ impl FromGlib for ClockFlags { } impl StaticType for ClockFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_clock_flags_get_type()) } } @@ -366,6 +388,7 @@ impl glib::value::ValueType for ClockFlags { unsafe impl<'a> FromValue<'a> for ClockFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -373,6 +396,7 @@ unsafe impl<'a> FromValue<'a> for ClockFlags { } impl ToValue for ClockFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -381,6 +405,7 @@ impl ToValue for ClockFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -440,6 +465,7 @@ bitflags! { impl IntoGlib for DebugColorFlags { type GlibType = ffi::GstDebugColorFlags; + #[inline] fn into_glib(self) -> ffi::GstDebugColorFlags { self.bits() } @@ -447,6 +473,7 @@ impl IntoGlib for DebugColorFlags { #[doc(hidden)] impl FromGlib for DebugColorFlags { + #[inline] unsafe fn from_glib(value: ffi::GstDebugColorFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -454,6 +481,7 @@ impl FromGlib for DebugColorFlags { } impl StaticType for DebugColorFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_debug_color_flags_get_type()) } } @@ -466,6 +494,7 @@ impl glib::value::ValueType for DebugColorFlags { unsafe impl<'a> FromValue<'a> for DebugColorFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -473,6 +502,7 @@ unsafe impl<'a> FromValue<'a> for DebugColorFlags { } impl ToValue for DebugColorFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -481,6 +511,7 @@ impl ToValue for DebugColorFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -518,6 +549,7 @@ bitflags! { impl IntoGlib for DebugGraphDetails { type GlibType = ffi::GstDebugGraphDetails; + #[inline] fn into_glib(self) -> ffi::GstDebugGraphDetails { self.bits() } @@ -525,6 +557,7 @@ impl IntoGlib for DebugGraphDetails { #[doc(hidden)] impl FromGlib for DebugGraphDetails { + #[inline] unsafe fn from_glib(value: ffi::GstDebugGraphDetails) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -532,6 +565,7 @@ impl FromGlib for DebugGraphDetails { } impl StaticType for DebugGraphDetails { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_debug_graph_details_get_type()) } } @@ -544,6 +578,7 @@ impl glib::value::ValueType for DebugGraphDetails { unsafe impl<'a> FromValue<'a> for DebugGraphDetails { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -551,6 +586,7 @@ unsafe impl<'a> FromValue<'a> for DebugGraphDetails { } impl ToValue for DebugGraphDetails { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -559,6 +595,7 @@ impl ToValue for DebugGraphDetails { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -594,6 +631,7 @@ bitflags! { impl IntoGlib for ElementFlags { type GlibType = ffi::GstElementFlags; + #[inline] fn into_glib(self) -> ffi::GstElementFlags { self.bits() } @@ -601,6 +639,7 @@ impl IntoGlib for ElementFlags { #[doc(hidden)] impl FromGlib for ElementFlags { + #[inline] unsafe fn from_glib(value: ffi::GstElementFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -608,6 +647,7 @@ impl FromGlib for ElementFlags { } impl StaticType for ElementFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_element_flags_get_type()) } } @@ -620,6 +660,7 @@ impl glib::value::ValueType for ElementFlags { unsafe impl<'a> FromValue<'a> for ElementFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -627,6 +668,7 @@ unsafe impl<'a> FromValue<'a> for ElementFlags { } impl ToValue for ElementFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -635,6 +677,7 @@ impl ToValue for ElementFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -668,6 +711,7 @@ bitflags! { impl IntoGlib for EventTypeFlags { type GlibType = ffi::GstEventTypeFlags; + #[inline] fn into_glib(self) -> ffi::GstEventTypeFlags { self.bits() } @@ -675,6 +719,7 @@ impl IntoGlib for EventTypeFlags { #[doc(hidden)] impl FromGlib for EventTypeFlags { + #[inline] unsafe fn from_glib(value: ffi::GstEventTypeFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -682,6 +727,7 @@ impl FromGlib for EventTypeFlags { } impl StaticType for EventTypeFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_event_type_flags_get_type()) } } @@ -694,6 +740,7 @@ impl glib::value::ValueType for EventTypeFlags { unsafe impl<'a> FromValue<'a> for EventTypeFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -701,6 +748,7 @@ unsafe impl<'a> FromValue<'a> for EventTypeFlags { } impl ToValue for EventTypeFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -709,6 +757,7 @@ impl ToValue for EventTypeFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -738,6 +787,7 @@ bitflags! { impl IntoGlib for GapFlags { type GlibType = ffi::GstGapFlags; + #[inline] fn into_glib(self) -> ffi::GstGapFlags { self.bits() } @@ -747,6 +797,7 @@ impl IntoGlib for GapFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for GapFlags { + #[inline] unsafe fn from_glib(value: ffi::GstGapFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -756,6 +807,7 @@ impl FromGlib for GapFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for GapFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_gap_flags_get_type()) } } @@ -772,6 +824,7 @@ impl glib::value::ValueType for GapFlags { unsafe impl<'a> FromValue<'a> for GapFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -781,6 +834,7 @@ unsafe impl<'a> FromValue<'a> for GapFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for GapFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -789,6 +843,7 @@ impl ToValue for GapFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -826,6 +881,7 @@ bitflags! { impl IntoGlib for MemoryFlags { type GlibType = ffi::GstMemoryFlags; + #[inline] fn into_glib(self) -> ffi::GstMemoryFlags { self.bits() } @@ -833,6 +889,7 @@ impl IntoGlib for MemoryFlags { #[doc(hidden)] impl FromGlib for MemoryFlags { + #[inline] unsafe fn from_glib(value: ffi::GstMemoryFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -840,6 +897,7 @@ impl FromGlib for MemoryFlags { } impl StaticType for MemoryFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_memory_flags_get_type()) } } @@ -852,6 +910,7 @@ impl glib::value::ValueType for MemoryFlags { unsafe impl<'a> FromValue<'a> for MemoryFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -859,6 +918,7 @@ unsafe impl<'a> FromValue<'a> for MemoryFlags { } impl ToValue for MemoryFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -867,6 +927,7 @@ impl ToValue for MemoryFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -896,6 +957,7 @@ bitflags! { impl IntoGlib for MetaFlags { type GlibType = ffi::GstMetaFlags; + #[inline] fn into_glib(self) -> ffi::GstMetaFlags { self.bits() } @@ -903,6 +965,7 @@ impl IntoGlib for MetaFlags { #[doc(hidden)] impl FromGlib for MetaFlags { + #[inline] unsafe fn from_glib(value: ffi::GstMetaFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -910,6 +973,7 @@ impl FromGlib for MetaFlags { } impl StaticType for MetaFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_meta_flags_get_type()) } } @@ -922,6 +986,7 @@ impl glib::value::ValueType for MetaFlags { unsafe impl<'a> FromValue<'a> for MetaFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -929,6 +994,7 @@ unsafe impl<'a> FromValue<'a> for MetaFlags { } impl ToValue for MetaFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -937,6 +1003,7 @@ impl ToValue for MetaFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -962,6 +1029,7 @@ bitflags! { impl IntoGlib for ObjectFlags { type GlibType = ffi::GstObjectFlags; + #[inline] fn into_glib(self) -> ffi::GstObjectFlags { self.bits() } @@ -969,6 +1037,7 @@ impl IntoGlib for ObjectFlags { #[doc(hidden)] impl FromGlib for ObjectFlags { + #[inline] unsafe fn from_glib(value: ffi::GstObjectFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -976,6 +1045,7 @@ impl FromGlib for ObjectFlags { } impl StaticType for ObjectFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_object_flags_get_type()) } } @@ -988,6 +1058,7 @@ impl glib::value::ValueType for ObjectFlags { unsafe impl<'a> FromValue<'a> for ObjectFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -995,6 +1066,7 @@ unsafe impl<'a> FromValue<'a> for ObjectFlags { } impl ToValue for ObjectFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1003,6 +1075,7 @@ impl ToValue for ObjectFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1052,6 +1125,7 @@ bitflags! { impl IntoGlib for PadFlags { type GlibType = ffi::GstPadFlags; + #[inline] fn into_glib(self) -> ffi::GstPadFlags { self.bits() } @@ -1059,6 +1133,7 @@ impl IntoGlib for PadFlags { #[doc(hidden)] impl FromGlib for PadFlags { + #[inline] unsafe fn from_glib(value: ffi::GstPadFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1066,6 +1141,7 @@ impl FromGlib for PadFlags { } impl StaticType for PadFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_flags_get_type()) } } @@ -1078,6 +1154,7 @@ impl glib::value::ValueType for PadFlags { unsafe impl<'a> FromValue<'a> for PadFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1085,6 +1162,7 @@ unsafe impl<'a> FromValue<'a> for PadFlags { } impl ToValue for PadFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1093,6 +1171,7 @@ impl ToValue for PadFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1126,6 +1205,7 @@ bitflags! { impl IntoGlib for PadLinkCheck { type GlibType = ffi::GstPadLinkCheck; + #[inline] fn into_glib(self) -> ffi::GstPadLinkCheck { self.bits() } @@ -1133,6 +1213,7 @@ impl IntoGlib for PadLinkCheck { #[doc(hidden)] impl FromGlib for PadLinkCheck { + #[inline] unsafe fn from_glib(value: ffi::GstPadLinkCheck) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1140,6 +1221,7 @@ impl FromGlib for PadLinkCheck { } impl StaticType for PadLinkCheck { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_link_check_get_type()) } } @@ -1152,6 +1234,7 @@ impl glib::value::ValueType for PadLinkCheck { unsafe impl<'a> FromValue<'a> for PadLinkCheck { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1159,6 +1242,7 @@ unsafe impl<'a> FromValue<'a> for PadLinkCheck { } impl ToValue for PadLinkCheck { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1167,6 +1251,7 @@ impl ToValue for PadLinkCheck { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1232,6 +1317,7 @@ bitflags! { impl IntoGlib for PadProbeType { type GlibType = ffi::GstPadProbeType; + #[inline] fn into_glib(self) -> ffi::GstPadProbeType { self.bits() } @@ -1239,6 +1325,7 @@ impl IntoGlib for PadProbeType { #[doc(hidden)] impl FromGlib for PadProbeType { + #[inline] unsafe fn from_glib(value: ffi::GstPadProbeType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1246,6 +1333,7 @@ impl FromGlib for PadProbeType { } impl StaticType for PadProbeType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pad_probe_type_get_type()) } } @@ -1258,6 +1346,7 @@ impl glib::value::ValueType for PadProbeType { unsafe impl<'a> FromValue<'a> for PadProbeType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1265,6 +1354,7 @@ unsafe impl<'a> FromValue<'a> for PadProbeType { } impl ToValue for PadProbeType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1273,6 +1363,7 @@ impl ToValue for PadProbeType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1302,6 +1393,7 @@ bitflags! { impl IntoGlib for ParseFlags { type GlibType = ffi::GstParseFlags; + #[inline] fn into_glib(self) -> ffi::GstParseFlags { self.bits() } @@ -1309,6 +1401,7 @@ impl IntoGlib for ParseFlags { #[doc(hidden)] impl FromGlib for ParseFlags { + #[inline] unsafe fn from_glib(value: ffi::GstParseFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1316,6 +1409,7 @@ impl FromGlib for ParseFlags { } impl StaticType for ParseFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_parse_flags_get_type()) } } @@ -1328,6 +1422,7 @@ impl glib::value::ValueType for ParseFlags { unsafe impl<'a> FromValue<'a> for ParseFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1335,6 +1430,7 @@ unsafe impl<'a> FromValue<'a> for ParseFlags { } impl ToValue for ParseFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1343,6 +1439,7 @@ impl ToValue for ParseFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1368,6 +1465,7 @@ bitflags! { impl IntoGlib for PipelineFlags { type GlibType = ffi::GstPipelineFlags; + #[inline] fn into_glib(self) -> ffi::GstPipelineFlags { self.bits() } @@ -1375,6 +1473,7 @@ impl IntoGlib for PipelineFlags { #[doc(hidden)] impl FromGlib for PipelineFlags { + #[inline] unsafe fn from_glib(value: ffi::GstPipelineFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1382,6 +1481,7 @@ impl FromGlib for PipelineFlags { } impl StaticType for PipelineFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_pipeline_flags_get_type()) } } @@ -1394,6 +1494,7 @@ impl glib::value::ValueType for PipelineFlags { unsafe impl<'a> FromValue<'a> for PipelineFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1401,6 +1502,7 @@ unsafe impl<'a> FromValue<'a> for PipelineFlags { } impl ToValue for PipelineFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1409,6 +1511,7 @@ impl ToValue for PipelineFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1438,6 +1541,7 @@ bitflags! { impl IntoGlib for PluginAPIFlags { type GlibType = ffi::GstPluginAPIFlags; + #[inline] fn into_glib(self) -> ffi::GstPluginAPIFlags { self.bits() } @@ -1447,6 +1551,7 @@ impl IntoGlib for PluginAPIFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(hidden)] impl FromGlib for PluginAPIFlags { + #[inline] unsafe fn from_glib(value: ffi::GstPluginAPIFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1456,6 +1561,7 @@ impl FromGlib for PluginAPIFlags { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl StaticType for PluginAPIFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_plugin_api_flags_get_type()) } } @@ -1472,6 +1578,7 @@ impl glib::value::ValueType for PluginAPIFlags { unsafe impl<'a> FromValue<'a> for PluginAPIFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1481,6 +1588,7 @@ unsafe impl<'a> FromValue<'a> for PluginAPIFlags { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] impl ToValue for PluginAPIFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1489,6 +1597,7 @@ impl ToValue for PluginAPIFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1524,6 +1633,7 @@ bitflags! { impl IntoGlib for PluginDependencyFlags { type GlibType = ffi::GstPluginDependencyFlags; + #[inline] fn into_glib(self) -> ffi::GstPluginDependencyFlags { self.bits() } @@ -1531,6 +1641,7 @@ impl IntoGlib for PluginDependencyFlags { #[doc(hidden)] impl FromGlib for PluginDependencyFlags { + #[inline] unsafe fn from_glib(value: ffi::GstPluginDependencyFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1538,6 +1649,7 @@ impl FromGlib for PluginDependencyFlags { } impl StaticType for PluginDependencyFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_plugin_dependency_flags_get_type()) } } @@ -1550,6 +1662,7 @@ impl glib::value::ValueType for PluginDependencyFlags { unsafe impl<'a> FromValue<'a> for PluginDependencyFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1557,6 +1670,7 @@ unsafe impl<'a> FromValue<'a> for PluginDependencyFlags { } impl ToValue for PluginDependencyFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1565,6 +1679,7 @@ impl ToValue for PluginDependencyFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1592,6 +1707,7 @@ bitflags! { impl IntoGlib for PluginFlags { type GlibType = ffi::GstPluginFlags; + #[inline] fn into_glib(self) -> ffi::GstPluginFlags { self.bits() } @@ -1599,6 +1715,7 @@ impl IntoGlib for PluginFlags { #[doc(hidden)] impl FromGlib for PluginFlags { + #[inline] unsafe fn from_glib(value: ffi::GstPluginFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1606,6 +1723,7 @@ impl FromGlib for PluginFlags { } impl StaticType for PluginFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_plugin_flags_get_type()) } } @@ -1618,6 +1736,7 @@ impl glib::value::ValueType for PluginFlags { unsafe impl<'a> FromValue<'a> for PluginFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1625,6 +1744,7 @@ unsafe impl<'a> FromValue<'a> for PluginFlags { } impl ToValue for PluginFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1633,6 +1753,7 @@ impl ToValue for PluginFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1662,6 +1783,7 @@ bitflags! { impl IntoGlib for SchedulingFlags { type GlibType = ffi::GstSchedulingFlags; + #[inline] fn into_glib(self) -> ffi::GstSchedulingFlags { self.bits() } @@ -1669,6 +1791,7 @@ impl IntoGlib for SchedulingFlags { #[doc(hidden)] impl FromGlib for SchedulingFlags { + #[inline] unsafe fn from_glib(value: ffi::GstSchedulingFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1676,6 +1799,7 @@ impl FromGlib for SchedulingFlags { } impl StaticType for SchedulingFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_scheduling_flags_get_type()) } } @@ -1688,6 +1812,7 @@ impl glib::value::ValueType for SchedulingFlags { unsafe impl<'a> FromValue<'a> for SchedulingFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1695,6 +1820,7 @@ unsafe impl<'a> FromValue<'a> for SchedulingFlags { } impl ToValue for SchedulingFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1703,6 +1829,7 @@ impl ToValue for SchedulingFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1756,6 +1883,7 @@ bitflags! { impl IntoGlib for SeekFlags { type GlibType = ffi::GstSeekFlags; + #[inline] fn into_glib(self) -> ffi::GstSeekFlags { self.bits() } @@ -1763,6 +1891,7 @@ impl IntoGlib for SeekFlags { #[doc(hidden)] impl FromGlib for SeekFlags { + #[inline] unsafe fn from_glib(value: ffi::GstSeekFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1770,6 +1899,7 @@ impl FromGlib for SeekFlags { } impl StaticType for SeekFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_seek_flags_get_type()) } } @@ -1782,6 +1912,7 @@ impl glib::value::ValueType for SeekFlags { unsafe impl<'a> FromValue<'a> for SeekFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1789,6 +1920,7 @@ unsafe impl<'a> FromValue<'a> for SeekFlags { } impl ToValue for SeekFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1797,6 +1929,7 @@ impl ToValue for SeekFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1836,6 +1969,7 @@ bitflags! { impl IntoGlib for SegmentFlags { type GlibType = ffi::GstSegmentFlags; + #[inline] fn into_glib(self) -> ffi::GstSegmentFlags { self.bits() } @@ -1843,6 +1977,7 @@ impl IntoGlib for SegmentFlags { #[doc(hidden)] impl FromGlib for SegmentFlags { + #[inline] unsafe fn from_glib(value: ffi::GstSegmentFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1850,6 +1985,7 @@ impl FromGlib for SegmentFlags { } impl StaticType for SegmentFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_segment_flags_get_type()) } } @@ -1862,6 +1998,7 @@ impl glib::value::ValueType for SegmentFlags { unsafe impl<'a> FromValue<'a> for SegmentFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1869,6 +2006,7 @@ unsafe impl<'a> FromValue<'a> for SegmentFlags { } impl ToValue for SegmentFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1877,6 +2015,7 @@ impl ToValue for SegmentFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1908,6 +2047,7 @@ bitflags! { impl IntoGlib for SerializeFlags { type GlibType = ffi::GstSerializeFlags; + #[inline] fn into_glib(self) -> ffi::GstSerializeFlags { self.bits() } @@ -1917,6 +2057,7 @@ impl IntoGlib for SerializeFlags { #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] #[doc(hidden)] impl FromGlib for SerializeFlags { + #[inline] unsafe fn from_glib(value: ffi::GstSerializeFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -1926,6 +2067,7 @@ impl FromGlib for SerializeFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl StaticType for SerializeFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_serialize_flags_get_type()) } } @@ -1942,6 +2084,7 @@ impl glib::value::ValueType for SerializeFlags { unsafe impl<'a> FromValue<'a> for SerializeFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -1951,6 +2094,7 @@ unsafe impl<'a> FromValue<'a> for SerializeFlags { #[cfg(any(feature = "v1_20", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))] impl ToValue for SerializeFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -1959,6 +2103,7 @@ impl ToValue for SerializeFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -1986,6 +2131,7 @@ bitflags! { impl IntoGlib for StackTraceFlags { type GlibType = ffi::GstStackTraceFlags; + #[inline] fn into_glib(self) -> ffi::GstStackTraceFlags { self.bits() } @@ -1993,6 +2139,7 @@ impl IntoGlib for StackTraceFlags { #[doc(hidden)] impl FromGlib for StackTraceFlags { + #[inline] unsafe fn from_glib(value: ffi::GstStackTraceFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -2000,6 +2147,7 @@ impl FromGlib for StackTraceFlags { } impl StaticType for StackTraceFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_stack_trace_flags_get_type()) } } @@ -2012,6 +2160,7 @@ impl glib::value::ValueType for StackTraceFlags { unsafe impl<'a> FromValue<'a> for StackTraceFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -2019,6 +2168,7 @@ unsafe impl<'a> FromValue<'a> for StackTraceFlags { } impl ToValue for StackTraceFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2027,6 +2177,7 @@ impl ToValue for StackTraceFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2056,6 +2207,7 @@ bitflags! { impl IntoGlib for StreamFlags { type GlibType = ffi::GstStreamFlags; + #[inline] fn into_glib(self) -> ffi::GstStreamFlags { self.bits() } @@ -2063,6 +2215,7 @@ impl IntoGlib for StreamFlags { #[doc(hidden)] impl FromGlib for StreamFlags { + #[inline] unsafe fn from_glib(value: ffi::GstStreamFlags) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -2070,6 +2223,7 @@ impl FromGlib for StreamFlags { } impl StaticType for StreamFlags { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_stream_flags_get_type()) } } @@ -2082,6 +2236,7 @@ impl glib::value::ValueType for StreamFlags { unsafe impl<'a> FromValue<'a> for StreamFlags { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -2089,6 +2244,7 @@ unsafe impl<'a> FromValue<'a> for StreamFlags { } impl ToValue for StreamFlags { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2097,6 +2253,7 @@ impl ToValue for StreamFlags { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } @@ -2151,6 +2308,7 @@ impl fmt::Display for StreamType { impl IntoGlib for StreamType { type GlibType = ffi::GstStreamType; + #[inline] fn into_glib(self) -> ffi::GstStreamType { self.bits() } @@ -2158,6 +2316,7 @@ impl IntoGlib for StreamType { #[doc(hidden)] impl FromGlib for StreamType { + #[inline] unsafe fn from_glib(value: ffi::GstStreamType) -> Self { skip_assert_initialized!(); Self::from_bits_truncate(value) @@ -2165,6 +2324,7 @@ impl FromGlib for StreamType { } impl StaticType for StreamType { + #[inline] fn static_type() -> Type { unsafe { from_glib(ffi::gst_stream_type_get_type()) } } @@ -2177,6 +2337,7 @@ impl glib::value::ValueType for StreamType { unsafe impl<'a> FromValue<'a> for StreamType { type Checker = glib::value::GenericValueTypeChecker; + #[inline] unsafe fn from_value(value: &'a glib::Value) -> Self { skip_assert_initialized!(); from_glib(glib::gobject_ffi::g_value_get_flags(value.to_glib_none().0)) @@ -2184,6 +2345,7 @@ unsafe impl<'a> FromValue<'a> for StreamType { } impl ToValue for StreamType { + #[inline] fn to_value(&self) -> glib::Value { let mut value = glib::Value::for_value_type::(); unsafe { @@ -2192,6 +2354,7 @@ impl ToValue for StreamType { value } + #[inline] fn value_type(&self) -> glib::Type { Self::static_type() } diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 6d5fb3936..7bdc2a83f 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -3,16 +3,9 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Bin; -use crate::ClockTime; -use crate::DebugGraphDetails; -use crate::DebugLevel; -use crate::Element; -use crate::StackTraceFlags; -use glib::object::IsA; -use glib::translate::*; -use std::mem; -use std::ptr; +use crate::{Bin, ClockTime, DebugGraphDetails, DebugLevel, Element, StackTraceFlags}; +use glib::{prelude::*, translate::*}; +use std::{mem, ptr}; #[doc(alias = "gst_debug_add_ring_buffer_logger")] pub fn debug_add_ring_buffer_logger(max_size_per_thread: u32, thread_timeout: u32) { diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index 95e5a62be..266ad4e97 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::Pad; -use crate::ProxyPad; -use glib::object::IsA; -use glib::translate::*; +use crate::{Object, Pad, ProxyPad}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstGhostPad")] diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index 68ff716c4..382091123 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -3,16 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::ClockTime; -use crate::ControlBinding; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::fmt; -use std::mem::transmute; +use crate::{ClockTime, ControlBinding}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, fmt, mem::transmute}; glib::wrapper! { #[doc(alias = "GstObject")] diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 473e3b4db..25e64601a 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -3,28 +3,16 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Caps; -use crate::Element; -use crate::Event; -use crate::FlowError; -use crate::FlowSuccess; -use crate::Object; -use crate::PadDirection; -use crate::PadLinkCheck; -use crate::PadLinkError; -use crate::PadLinkSuccess; -use crate::PadMode; -use crate::PadTemplate; -use crate::Stream; -use crate::TaskState; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{ + Caps, Element, Event, FlowError, FlowSuccess, Object, PadDirection, PadLinkCheck, PadLinkError, + PadLinkSuccess, PadMode, PadTemplate, Stream, TaskState, +}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPad")] diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index af74d6f55..4a7930216 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Caps; -use crate::Object; -use crate::Pad; -use crate::PadDirection; -use crate::PadPresence; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Caps, Object, Pad, PadDirection, PadPresence}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPadTemplate")] diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index a9df35073..273fd3cab 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -3,19 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Bin; -use crate::ChildProxy; -use crate::Clock; -use crate::ClockTime; -use crate::Element; -use crate::Object; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Bin, ChildProxy, Clock, ClockTime, Element, Object}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstPipeline")] diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index 0e5b9ad73..0966b8cc0 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -3,11 +3,9 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::PluginDependencyFlags; +use crate::{Object, PluginDependencyFlags}; use glib::translate::*; -use std::fmt; -use std::ptr; +use std::{fmt, ptr}; glib::wrapper! { #[doc(alias = "GstPlugin")] diff --git a/gstreamer/src/auto/plugin_feature.rs b/gstreamer/src/auto/plugin_feature.rs index 4827d7049..817700ce7 100644 --- a/gstreamer/src/auto/plugin_feature.rs +++ b/gstreamer/src/auto/plugin_feature.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::Plugin; -use glib::object::IsA; -use glib::translate::*; +use crate::{Object, Plugin}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstPluginFeature")] diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index 58fef7bf8..02305d06d 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::ptr; glib::wrapper! { diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index cea36a085..fbab3c057 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -3,10 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::Pad; -use glib::object::IsA; -use glib::translate::*; +use crate::{Object, Pad}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstProxyPad")] diff --git a/gstreamer/src/auto/registry.rs b/gstreamer/src/auto/registry.rs index b6b60fa3b..9466bc98c 100644 --- a/gstreamer/src/auto/registry.rs +++ b/gstreamer/src/auto/registry.rs @@ -3,16 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::Plugin; -use crate::PluginFeature; -use glib::object::IsA; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Object, Plugin, PluginFeature}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstRegistry")] diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 60206a15e..1b112c0a0 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -3,17 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Caps; -use crate::Object; -use crate::StreamFlags; -use crate::StreamType; -use crate::TagList; -use glib::object::ObjectType as ObjectType_; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Caps, Object, StreamFlags, StreamType, TagList}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstStream")] diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index 39588dd0e..ab943054b 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::Stream; +use crate::{Object, Stream}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index 2884c4f02..f554f64de 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -3,18 +3,13 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Clock; -use crate::ClockType; -use crate::Object; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use crate::{Clock, ClockType, Object}; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstSystemClock")] diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index ddc98cd5d..932b3be05 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -3,12 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Element; -use crate::Object; -use crate::TagList; -use crate::TagMergeMode; -use glib::object::IsA; -use glib::translate::*; +use crate::{Element, Object, TagList, TagMergeMode}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstTagSetter")] diff --git a/gstreamer/src/auto/task.rs b/gstreamer/src/auto/task.rs index 33bbf50b8..0ad31052a 100644 --- a/gstreamer/src/auto/task.rs +++ b/gstreamer/src/auto/task.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::TaskPool; -use crate::TaskState; -use glib::object::IsA; -use glib::translate::*; +use crate::{Object, TaskPool, TaskState}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstTask")] diff --git a/gstreamer/src/auto/task_pool.rs b/gstreamer/src/auto/task_pool.rs index 52d4d6eb3..4b3976e81 100644 --- a/gstreamer/src/auto/task_pool.rs +++ b/gstreamer/src/auto/task_pool.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::Object; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::ptr; glib::wrapper! { diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index 2092a29b2..0a2d96c15 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -3,11 +3,8 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Element; -use crate::Object; -use crate::Toc; -use glib::object::IsA; -use glib::translate::*; +use crate::{Element, Object, Toc}; +use glib::{prelude::*, translate::*}; glib::wrapper! { #[doc(alias = "GstTocSetter")] diff --git a/gstreamer/src/auto/tracer.rs b/gstreamer/src/auto/tracer.rs index f91c461b8..c88b3a4ac 100644 --- a/gstreamer/src/auto/tracer.rs +++ b/gstreamer/src/auto/tracer.rs @@ -4,15 +4,12 @@ // DO NOT EDIT use crate::Object; -use glib::object::Cast; -use glib::object::IsA; -use glib::signal::connect_raw; -use glib::signal::SignalHandlerId; -use glib::translate::*; -use glib::StaticType; -use glib::ToValue; -use std::boxed::Box as Box_; -use std::mem::transmute; +use glib::{ + prelude::*, + signal::{connect_raw, SignalHandlerId}, + translate::*, +}; +use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GstTracer")] diff --git a/gstreamer/src/auto/tracer_factory.rs b/gstreamer/src/auto/tracer_factory.rs index b90ea4d8d..a428e44f3 100644 --- a/gstreamer/src/auto/tracer_factory.rs +++ b/gstreamer/src/auto/tracer_factory.rs @@ -3,8 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Object; -use crate::PluginFeature; +use crate::{Object, PluginFeature}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer/src/auto/type_find_factory.rs b/gstreamer/src/auto/type_find_factory.rs index a3a6924d4..ed7789da9 100644 --- a/gstreamer/src/auto/type_find_factory.rs +++ b/gstreamer/src/auto/type_find_factory.rs @@ -3,9 +3,7 @@ // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT -use crate::Caps; -use crate::Object; -use crate::PluginFeature; +use crate::{Caps, Object, PluginFeature}; use glib::translate::*; glib::wrapper! { diff --git a/gstreamer/src/auto/uri_handler.rs b/gstreamer/src/auto/uri_handler.rs index 7ce12e671..f56eef674 100644 --- a/gstreamer/src/auto/uri_handler.rs +++ b/gstreamer/src/auto/uri_handler.rs @@ -4,8 +4,7 @@ // DO NOT EDIT use crate::URIType; -use glib::object::IsA; -use glib::translate::*; +use glib::{prelude::*, translate::*}; use std::ptr; glib::wrapper! { @@ -70,7 +69,7 @@ impl> URIHandlerExt for O { uri.to_glib_none().0, &mut error, ); - assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); + debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null()); if error.is_null() { Ok(()) } else { diff --git a/gstreamer/src/auto/versions.txt b/gstreamer/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer/src/auto/versions.txt +++ b/gstreamer/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734) diff --git a/gstreamer/sys/src/auto/versions.txt b/gstreamer/sys/src/auto/versions.txt index 7087073cc..586a32c17 100644 --- a/gstreamer/sys/src/auto/versions.txt +++ b/gstreamer/sys/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 5c4c358d83c8) +Generated by gir (https://github.com/gtk-rs/gir @ 5d24c2e70796) from gir-files (https://github.com/gtk-rs/gir-files @ dc752de0b068) -from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 0500fd0d183f) +from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 888576de2734)