diff --git a/gstreamer-app/src/auto/app_sink.rs b/gstreamer-app/src/auto/app_sink.rs index 07a154333..6fe578ca5 100644 --- a/gstreamer-app/src/auto/app_sink.rs +++ b/gstreamer-app/src/auto/app_sink.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-app/src/auto/app_src.rs b/gstreamer-app/src/auto/app_src.rs index 929184c06..ad9677547 100644 --- a/gstreamer-app/src/auto/app_src.rs +++ b/gstreamer-app/src/auto/app_src.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use AppStreamType; diff --git a/gstreamer-app/src/auto/enums.rs b/gstreamer-app/src/auto/enums.rs index 17f965525..f44675d2e 100644 --- a/gstreamer-app/src/auto/enums.rs +++ b/gstreamer-app/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; @@ -7,7 +7,6 @@ use glib::StaticType; use glib::value::{Value, SetValue, FromValue, FromValueOptional}; use gobject_ffi; use glib::translate::*; -use std; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum AppStreamType { @@ -27,7 +26,7 @@ impl ToGlib for AppStreamType { AppStreamType::Stream => ffi::GST_APP_STREAM_TYPE_STREAM, AppStreamType::Seekable => ffi::GST_APP_STREAM_TYPE_SEEKABLE, AppStreamType::RandomAccess => ffi::GST_APP_STREAM_TYPE_RANDOM_ACCESS, - AppStreamType::__Unknown(value) => unsafe{std::mem::transmute(value)} + AppStreamType::__Unknown(value) => value } } } @@ -36,7 +35,7 @@ impl ToGlib for AppStreamType { impl FromGlib for AppStreamType { fn from_glib(value: ffi::GstAppStreamType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => AppStreamType::Stream, 1 => AppStreamType::Seekable, 2 => AppStreamType::RandomAccess, @@ -59,13 +58,13 @@ impl<'a> FromValueOptional<'a> for AppStreamType { impl<'a> FromValue<'a> for AppStreamType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AppStreamType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-app/src/auto/flags.rs b/gstreamer-app/src/auto/flags.rs index 67c2b20d2..6ec8a6cc3 100644 --- a/gstreamer-app/src/auto/flags.rs +++ b/gstreamer-app/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-app/src/auto/mod.rs b/gstreamer-app/src/auto/mod.rs index a7cf86f14..278a0d271 100644 --- a/gstreamer-app/src/auto/mod.rs +++ b/gstreamer-app/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT mod app_sink; diff --git a/gstreamer-audio/src/audio_channel_position.rs b/gstreamer-audio/src/audio_channel_position.rs index 9082de570..c9dc24e91 100644 --- a/gstreamer-audio/src/audio_channel_position.rs +++ b/gstreamer-audio/src/audio_channel_position.rs @@ -36,7 +36,7 @@ impl AudioChannelPosition { let positions_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { positions[i].to_glib() }); @@ -69,7 +69,7 @@ impl AudioChannelPosition { let len = positions.len(); let mut positions_raw: [ffi::GstAudioChannelPosition; 64] = - [ffi::GstAudioChannelPosition::Invalid; 64]; + [ffi::GST_AUDIO_CHANNEL_POSITION_INVALID; 64]; let valid: bool = unsafe { from_glib(ffi::gst_audio_channel_positions_from_mask( len as i32, @@ -102,7 +102,7 @@ impl AudioChannelPosition { let len = positions.len(); let mut positions_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { positions[i].to_glib() }); @@ -145,7 +145,7 @@ impl AudioChannelPosition { let len = positions.len(); let positions_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { positions[i].to_glib() }); @@ -178,14 +178,14 @@ pub fn buffer_reorder_channels( let from_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= from_len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { from[i].to_glib() }); let to_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= to_len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { to[i].to_glib() }); @@ -225,14 +225,14 @@ pub fn reorder_channels( let from_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= from_len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { from[i].to_glib() }); let to_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= to_len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { to[i].to_glib() }); @@ -271,14 +271,14 @@ pub fn get_channel_reorder_map( let from_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= from_len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { from[i].to_glib() }); let to_raw: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= to_len as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { to[i].to_glib() }); diff --git a/gstreamer-audio/src/audio_info.rs b/gstreamer-audio/src/audio_info.rs index e1ac233e9..23078e5be 100644 --- a/gstreamer-audio/src/audio_info.rs +++ b/gstreamer-audio/src/audio_info.rs @@ -44,7 +44,7 @@ impl<'a> AudioInfoBuilder<'a> { let positions: [ffi::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| if i >= self.channels as usize { - ffi::GstAudioChannelPosition::Invalid + ffi::GST_AUDIO_CHANNEL_POSITION_INVALID } else { p[i].to_glib() }); diff --git a/gstreamer-audio/src/auto/enums.rs b/gstreamer-audio/src/auto/enums.rs index 344a0d14e..3143c19bc 100644 --- a/gstreamer-audio/src/auto/enums.rs +++ b/gstreamer-audio/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; @@ -7,7 +7,6 @@ use glib::StaticType; use glib::value::{Value, SetValue, FromValue, FromValueOptional}; use gobject_ffi; use glib::translate::*; -use std; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum AudioChannelPosition { @@ -83,7 +82,7 @@ impl ToGlib for AudioChannelPosition { AudioChannelPosition::WideRight => ffi::GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT, AudioChannelPosition::SurroundLeft => ffi::GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT, AudioChannelPosition::SurroundRight => ffi::GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT, - AudioChannelPosition::__Unknown(value) => unsafe{std::mem::transmute(value)} + AudioChannelPosition::__Unknown(value) => value } } } @@ -92,7 +91,7 @@ impl ToGlib for AudioChannelPosition { impl FromGlib for AudioChannelPosition { fn from_glib(value: ffi::GstAudioChannelPosition) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { -3 => AudioChannelPosition::None, -2 => AudioChannelPosition::Mono, -1 => AudioChannelPosition::Invalid, @@ -143,13 +142,13 @@ impl<'a> FromValueOptional<'a> for AudioChannelPosition { impl<'a> FromValue<'a> for AudioChannelPosition { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AudioChannelPosition { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -229,7 +228,7 @@ impl ToGlib for AudioFormat { AudioFormat::F32be => ffi::GST_AUDIO_FORMAT_F32BE, AudioFormat::F64le => ffi::GST_AUDIO_FORMAT_F64LE, AudioFormat::F64be => ffi::GST_AUDIO_FORMAT_F64BE, - AudioFormat::__Unknown(value) => unsafe{std::mem::transmute(value)} + AudioFormat::__Unknown(value) => value } } } @@ -238,7 +237,7 @@ impl ToGlib for AudioFormat { impl FromGlib for AudioFormat { fn from_glib(value: ffi::GstAudioFormat) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => AudioFormat::Unknown, 1 => AudioFormat::Encoded, 2 => AudioFormat::S8, @@ -290,13 +289,13 @@ impl<'a> FromValueOptional<'a> for AudioFormat { impl<'a> FromValue<'a> for AudioFormat { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AudioFormat { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -316,7 +315,7 @@ impl ToGlib for AudioLayout { match *self { AudioLayout::Interleaved => ffi::GST_AUDIO_LAYOUT_INTERLEAVED, AudioLayout::NonInterleaved => ffi::GST_AUDIO_LAYOUT_NON_INTERLEAVED, - AudioLayout::__Unknown(value) => unsafe{std::mem::transmute(value)} + AudioLayout::__Unknown(value) => value } } } @@ -325,7 +324,7 @@ impl ToGlib for AudioLayout { impl FromGlib for AudioLayout { fn from_glib(value: ffi::GstAudioLayout) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => AudioLayout::Interleaved, 1 => AudioLayout::NonInterleaved, value => AudioLayout::__Unknown(value), @@ -347,13 +346,13 @@ impl<'a> FromValueOptional<'a> for AudioLayout { impl<'a> FromValue<'a> for AudioLayout { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for AudioLayout { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -375,7 +374,7 @@ impl ToGlib for StreamVolumeFormat { StreamVolumeFormat::Linear => ffi::GST_STREAM_VOLUME_FORMAT_LINEAR, StreamVolumeFormat::Cubic => ffi::GST_STREAM_VOLUME_FORMAT_CUBIC, StreamVolumeFormat::Db => ffi::GST_STREAM_VOLUME_FORMAT_DB, - StreamVolumeFormat::__Unknown(value) => unsafe{std::mem::transmute(value)} + StreamVolumeFormat::__Unknown(value) => value } } } @@ -384,7 +383,7 @@ impl ToGlib for StreamVolumeFormat { impl FromGlib for StreamVolumeFormat { fn from_glib(value: ffi::GstStreamVolumeFormat) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => StreamVolumeFormat::Linear, 1 => StreamVolumeFormat::Cubic, 2 => StreamVolumeFormat::Db, diff --git a/gstreamer-audio/src/auto/flags.rs b/gstreamer-audio/src/auto/flags.rs index 4bf597356..3c5bd8907 100644 --- a/gstreamer-audio/src/auto/flags.rs +++ b/gstreamer-audio/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-audio/src/auto/mod.rs b/gstreamer-audio/src/auto/mod.rs index 96615104a..e0233fe66 100644 --- a/gstreamer-audio/src/auto/mod.rs +++ b/gstreamer-audio/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT mod stream_volume; diff --git a/gstreamer-audio/src/auto/stream_volume.rs b/gstreamer-audio/src/auto/stream_volume.rs index f3a1aa647..709d4a75b 100644 --- a/gstreamer-audio/src/auto/stream_volume.rs +++ b/gstreamer-audio/src/auto/stream_volume.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use StreamVolumeFormat; diff --git a/gstreamer-base/src/auto/adapter.rs b/gstreamer-base/src/auto/adapter.rs index 3465d3c4d..9b7986714 100644 --- a/gstreamer-base/src/auto/adapter.rs +++ b/gstreamer-base/src/auto/adapter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/base_sink.rs b/gstreamer-base/src/auto/base_sink.rs index 2338dbe1a..64c990ed1 100644 --- a/gstreamer-base/src/auto/base_sink.rs +++ b/gstreamer-base/src/auto/base_sink.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/base_src.rs b/gstreamer-base/src/auto/base_src.rs index 0c8e88bfa..c25d70019 100644 --- a/gstreamer-base/src/auto/base_src.rs +++ b/gstreamer-base/src/auto/base_src.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/base_transform.rs b/gstreamer-base/src/auto/base_transform.rs index d28ae8507..625aa0364 100644 --- a/gstreamer-base/src/auto/base_transform.rs +++ b/gstreamer-base/src/auto/base_transform.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/enums.rs b/gstreamer-base/src/auto/enums.rs index c36834590..6ec8a6cc3 100644 --- a/gstreamer-base/src/auto/enums.rs +++ b/gstreamer-base/src/auto/enums.rs @@ -1,7 +1,6 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; use glib::translate::*; -use std; diff --git a/gstreamer-base/src/auto/flags.rs b/gstreamer-base/src/auto/flags.rs index 67c2b20d2..6ec8a6cc3 100644 --- a/gstreamer-base/src/auto/flags.rs +++ b/gstreamer-base/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-base/src/auto/mod.rs b/gstreamer-base/src/auto/mod.rs index e7c7e545c..8bcac101c 100644 --- a/gstreamer-base/src/auto/mod.rs +++ b/gstreamer-base/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT mod adapter; diff --git a/gstreamer-base/src/auto/push_src.rs b/gstreamer-base/src/auto/push_src.rs index 9bb414196..6aaea9d6f 100644 --- a/gstreamer-base/src/auto/push_src.rs +++ b/gstreamer-base/src/auto/push_src.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use BaseSrc; diff --git a/gstreamer-player/src/auto/enums.rs b/gstreamer-player/src/auto/enums.rs index 2c320f6bc..8f452bc19 100644 --- a/gstreamer-player/src/auto/enums.rs +++ b/gstreamer-player/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; @@ -9,7 +9,6 @@ use glib::StaticType; use glib::value::{Value, SetValue, FromValue, FromValueOptional}; use gobject_ffi; use glib::translate::*; -use std; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum PlayerColorBalanceType { @@ -31,7 +30,7 @@ impl ToGlib for PlayerColorBalanceType { PlayerColorBalanceType::Brightness => ffi::GST_PLAYER_COLOR_BALANCE_BRIGHTNESS, PlayerColorBalanceType::Saturation => ffi::GST_PLAYER_COLOR_BALANCE_SATURATION, PlayerColorBalanceType::Contrast => ffi::GST_PLAYER_COLOR_BALANCE_CONTRAST, - PlayerColorBalanceType::__Unknown(value) => unsafe{std::mem::transmute(value)} + PlayerColorBalanceType::__Unknown(value) => value } } } @@ -40,7 +39,7 @@ impl ToGlib for PlayerColorBalanceType { impl FromGlib for PlayerColorBalanceType { fn from_glib(value: ffi::GstPlayerColorBalanceType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 3 => PlayerColorBalanceType::Hue, 0 => PlayerColorBalanceType::Brightness, 2 => PlayerColorBalanceType::Saturation, @@ -64,13 +63,13 @@ impl<'a> FromValueOptional<'a> for PlayerColorBalanceType { impl<'a> FromValue<'a> for PlayerColorBalanceType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PlayerColorBalanceType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -88,7 +87,7 @@ impl ToGlib for PlayerError { fn to_glib(&self) -> ffi::GstPlayerError { match *self { PlayerError::Failed => ffi::GST_PLAYER_ERROR_FAILED, - PlayerError::__Unknown(value) => unsafe{std::mem::transmute(value)} + PlayerError::__Unknown(value) => value } } } @@ -97,7 +96,7 @@ impl ToGlib for PlayerError { impl FromGlib for PlayerError { fn from_glib(value: ffi::GstPlayerError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PlayerError::Failed, value => PlayerError::__Unknown(value), } @@ -111,7 +110,7 @@ impl ErrorDomain for PlayerError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -137,13 +136,13 @@ impl<'a> FromValueOptional<'a> for PlayerError { impl<'a> FromValue<'a> for PlayerError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PlayerError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -169,7 +168,7 @@ impl ToGlib for PlayerSnapshotFormat { PlayerSnapshotFormat::RawBgrx => ffi::GST_PLAYER_THUMBNAIL_RAW_BGRx, PlayerSnapshotFormat::Jpg => ffi::GST_PLAYER_THUMBNAIL_JPG, PlayerSnapshotFormat::Png => ffi::GST_PLAYER_THUMBNAIL_PNG, - PlayerSnapshotFormat::__Unknown(value) => unsafe{std::mem::transmute(value)} + PlayerSnapshotFormat::__Unknown(value) => value } } } @@ -178,7 +177,7 @@ impl ToGlib for PlayerSnapshotFormat { impl FromGlib for PlayerSnapshotFormat { fn from_glib(value: ffi::GstPlayerSnapshotFormat) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PlayerSnapshotFormat::RawNative, 1 => PlayerSnapshotFormat::RawXrgb, 2 => PlayerSnapshotFormat::RawBgrx, @@ -209,7 +208,7 @@ impl ToGlib for PlayerState { PlayerState::Buffering => ffi::GST_PLAYER_STATE_BUFFERING, PlayerState::Paused => ffi::GST_PLAYER_STATE_PAUSED, PlayerState::Playing => ffi::GST_PLAYER_STATE_PLAYING, - PlayerState::__Unknown(value) => unsafe{std::mem::transmute(value)} + PlayerState::__Unknown(value) => value } } } @@ -218,7 +217,7 @@ impl ToGlib for PlayerState { impl FromGlib for PlayerState { fn from_glib(value: ffi::GstPlayerState) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PlayerState::Stopped, 1 => PlayerState::Buffering, 2 => PlayerState::Paused, @@ -242,13 +241,13 @@ impl<'a> FromValueOptional<'a> for PlayerState { impl<'a> FromValue<'a> for PlayerState { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PlayerState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-player/src/auto/flags.rs b/gstreamer-player/src/auto/flags.rs index 67c2b20d2..6ec8a6cc3 100644 --- a/gstreamer-player/src/auto/flags.rs +++ b/gstreamer-player/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/mod.rs b/gstreamer-player/src/auto/mod.rs index fc5db7d5e..bf80be95d 100644 --- a/gstreamer-player/src/auto/mod.rs +++ b/gstreamer-player/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT mod player; diff --git a/gstreamer-player/src/auto/player.rs b/gstreamer-player/src/auto/player.rs index f2dae0803..fa4617eaf 100644 --- a/gstreamer-player/src/auto/player.rs +++ b/gstreamer-player/src/auto/player.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Error; diff --git a/gstreamer-player/src/auto/player_audio_info.rs b/gstreamer-player/src/auto/player_audio_info.rs index ed767334c..d3f9884fc 100644 --- a/gstreamer-player/src/auto/player_audio_info.rs +++ b/gstreamer-player/src/auto/player_audio_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs b/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs index ac96e4077..45a42b025 100644 --- a/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_g_main_context_signal_dispatcher.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use PlayerSignalDispatcher; diff --git a/gstreamer-player/src/auto/player_media_info.rs b/gstreamer-player/src/auto/player_media_info.rs index 521f657db..d40f9634b 100644 --- a/gstreamer-player/src/auto/player_media_info.rs +++ b/gstreamer-player/src/auto/player_media_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use PlayerAudioInfo; diff --git a/gstreamer-player/src/auto/player_signal_dispatcher.rs b/gstreamer-player/src/auto/player_signal_dispatcher.rs index 7b72fe750..25558aff5 100644 --- a/gstreamer-player/src/auto/player_signal_dispatcher.rs +++ b/gstreamer-player/src/auto/player_signal_dispatcher.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/player_stream_info.rs b/gstreamer-player/src/auto/player_stream_info.rs index af61b7acc..3b972fe60 100644 --- a/gstreamer-player/src/auto/player_stream_info.rs +++ b/gstreamer-player/src/auto/player_stream_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/player_subtitle_info.rs b/gstreamer-player/src/auto/player_subtitle_info.rs index e308a983b..03cfb03b4 100644 --- a/gstreamer-player/src/auto/player_subtitle_info.rs +++ b/gstreamer-player/src/auto/player_subtitle_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use PlayerStreamInfo; diff --git a/gstreamer-player/src/auto/player_video_info.rs b/gstreamer-player/src/auto/player_video_info.rs index 46f0ef1f4..6791bb440 100644 --- a/gstreamer-player/src/auto/player_video_info.rs +++ b/gstreamer-player/src/auto/player_video_info.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use PlayerStreamInfo; 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 34f78e6c9..ae7a3a286 100644 --- a/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_overlay_video_renderer.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use PlayerVideoRenderer; diff --git a/gstreamer-player/src/auto/player_video_renderer.rs b/gstreamer-player/src/auto/player_video_renderer.rs index b1c0bcf78..be182b82b 100644 --- a/gstreamer-player/src/auto/player_video_renderer.rs +++ b/gstreamer-player/src/auto/player_video_renderer.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-player/src/auto/player_visualization.rs b/gstreamer-player/src/auto/player_visualization.rs index 05f6bf014..645ced6ab 100644 --- a/gstreamer-player/src/auto/player_visualization.rs +++ b/gstreamer-player/src/auto/player_visualization.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-video/src/auto/enums.rs b/gstreamer-video/src/auto/enums.rs index bfaf3b6b6..e7f4ce70c 100644 --- a/gstreamer-video/src/auto/enums.rs +++ b/gstreamer-video/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; @@ -7,7 +7,6 @@ use glib::StaticType; use glib::value::{Value, SetValue, FromValue, FromValueOptional}; use gobject_ffi; use glib::translate::*; -use std; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum VideoColorMatrix { @@ -35,7 +34,7 @@ impl ToGlib for VideoColorMatrix { VideoColorMatrix::Bt601 => ffi::GST_VIDEO_COLOR_MATRIX_BT601, VideoColorMatrix::Smpte240m => ffi::GST_VIDEO_COLOR_MATRIX_SMPTE240M, VideoColorMatrix::Bt2020 => ffi::GST_VIDEO_COLOR_MATRIX_BT2020, - VideoColorMatrix::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoColorMatrix::__Unknown(value) => value } } } @@ -44,7 +43,7 @@ impl ToGlib for VideoColorMatrix { impl FromGlib for VideoColorMatrix { fn from_glib(value: ffi::GstVideoColorMatrix) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoColorMatrix::Unknown, 1 => VideoColorMatrix::Rgb, 2 => VideoColorMatrix::Fcc, @@ -71,13 +70,13 @@ impl<'a> FromValueOptional<'a> for VideoColorMatrix { impl<'a> FromValue<'a> for VideoColorMatrix { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoColorMatrix { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -111,7 +110,7 @@ impl ToGlib for VideoColorPrimaries { VideoColorPrimaries::Film => ffi::GST_VIDEO_COLOR_PRIMARIES_FILM, VideoColorPrimaries::Bt2020 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT2020, VideoColorPrimaries::Adobergb => ffi::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB, - VideoColorPrimaries::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoColorPrimaries::__Unknown(value) => value } } } @@ -120,7 +119,7 @@ impl ToGlib for VideoColorPrimaries { impl FromGlib for VideoColorPrimaries { fn from_glib(value: ffi::GstVideoColorPrimaries) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoColorPrimaries::Unknown, 1 => VideoColorPrimaries::Bt709, 2 => VideoColorPrimaries::Bt470m, @@ -149,13 +148,13 @@ impl<'a> FromValueOptional<'a> for VideoColorPrimaries { impl<'a> FromValue<'a> for VideoColorPrimaries { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoColorPrimaries { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -179,7 +178,7 @@ impl ToGlib for VideoFieldOrder { VideoFieldOrder::Unknown => ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN, VideoFieldOrder::TopFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST, VideoFieldOrder::BottomFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST, - VideoFieldOrder::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoFieldOrder::__Unknown(value) => value } } } @@ -189,7 +188,7 @@ impl ToGlib for VideoFieldOrder { impl FromGlib for VideoFieldOrder { fn from_glib(value: ffi::GstVideoFieldOrder) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoFieldOrder::Unknown, 1 => VideoFieldOrder::TopFieldFirst, 2 => VideoFieldOrder::BottomFieldFirst, @@ -215,14 +214,14 @@ impl<'a> FromValueOptional<'a> for VideoFieldOrder { #[cfg(any(feature = "v1_12", feature = "dox"))] impl<'a> FromValue<'a> for VideoFieldOrder { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } #[cfg(any(feature = "v1_12", feature = "dox"))] impl SetValue for VideoFieldOrder { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -394,7 +393,7 @@ impl ToGlib for VideoFormat { VideoFormat::I42212le => ffi::GST_VIDEO_FORMAT_I422_12LE, VideoFormat::Y44412be => ffi::GST_VIDEO_FORMAT_Y444_12BE, VideoFormat::Y44412le => ffi::GST_VIDEO_FORMAT_Y444_12LE, - VideoFormat::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoFormat::__Unknown(value) => value } } } @@ -403,7 +402,7 @@ impl ToGlib for VideoFormat { impl FromGlib for VideoFormat { fn from_glib(value: ffi::GstVideoFormat) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoFormat::Unknown, 1 => VideoFormat::Encoded, 2 => VideoFormat::I420, @@ -501,13 +500,13 @@ impl<'a> FromValueOptional<'a> for VideoFormat { impl<'a> FromValue<'a> for VideoFormat { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoFormat { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -531,7 +530,7 @@ impl ToGlib for VideoInterlaceMode { VideoInterlaceMode::Interleaved => ffi::GST_VIDEO_INTERLACE_MODE_INTERLEAVED, VideoInterlaceMode::Mixed => ffi::GST_VIDEO_INTERLACE_MODE_MIXED, VideoInterlaceMode::Fields => ffi::GST_VIDEO_INTERLACE_MODE_FIELDS, - VideoInterlaceMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoInterlaceMode::__Unknown(value) => value } } } @@ -540,7 +539,7 @@ impl ToGlib for VideoInterlaceMode { impl FromGlib for VideoInterlaceMode { fn from_glib(value: ffi::GstVideoInterlaceMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoInterlaceMode::Progressive, 1 => VideoInterlaceMode::Interleaved, 2 => VideoInterlaceMode::Mixed, @@ -564,13 +563,13 @@ impl<'a> FromValueOptional<'a> for VideoInterlaceMode { impl<'a> FromValue<'a> for VideoInterlaceMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoInterlaceMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -612,7 +611,7 @@ impl ToGlib for VideoMultiviewMode { VideoMultiviewMode::FrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME, VideoMultiviewMode::MultiviewFrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME, VideoMultiviewMode::Separated => ffi::GST_VIDEO_MULTIVIEW_MODE_SEPARATED, - VideoMultiviewMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoMultiviewMode::__Unknown(value) => value } } } @@ -621,7 +620,7 @@ impl ToGlib for VideoMultiviewMode { impl FromGlib for VideoMultiviewMode { fn from_glib(value: ffi::GstVideoMultiviewMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { -1 => VideoMultiviewMode::None, 0 => VideoMultiviewMode::Mono, 1 => VideoMultiviewMode::Left, @@ -654,13 +653,13 @@ impl<'a> FromValueOptional<'a> for VideoMultiviewMode { impl<'a> FromValue<'a> for VideoMultiviewMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoMultiviewMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -680,7 +679,7 @@ impl ToGlib for VideoTileMode { match *self { VideoTileMode::Unknown => ffi::GST_VIDEO_TILE_MODE_UNKNOWN, VideoTileMode::Zflipz2x2 => ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2, - VideoTileMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoTileMode::__Unknown(value) => value } } } @@ -689,7 +688,7 @@ impl ToGlib for VideoTileMode { impl FromGlib for VideoTileMode { fn from_glib(value: ffi::GstVideoTileMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoTileMode::Unknown, 65536 => VideoTileMode::Zflipz2x2, value => VideoTileMode::__Unknown(value), @@ -711,13 +710,13 @@ impl<'a> FromValueOptional<'a> for VideoTileMode { impl<'a> FromValue<'a> for VideoTileMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoTileMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -759,7 +758,7 @@ impl ToGlib for VideoTransferFunction { VideoTransferFunction::Log316 => ffi::GST_VIDEO_TRANSFER_LOG316, VideoTransferFunction::Bt202012 => ffi::GST_VIDEO_TRANSFER_BT2020_12, VideoTransferFunction::Adobergb => ffi::GST_VIDEO_TRANSFER_ADOBERGB, - VideoTransferFunction::__Unknown(value) => unsafe{std::mem::transmute(value)} + VideoTransferFunction::__Unknown(value) => value } } } @@ -768,7 +767,7 @@ impl ToGlib for VideoTransferFunction { impl FromGlib for VideoTransferFunction { fn from_glib(value: ffi::GstVideoTransferFunction) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => VideoTransferFunction::Unknown, 1 => VideoTransferFunction::Gamma10, 2 => VideoTransferFunction::Gamma18, @@ -801,13 +800,13 @@ impl<'a> FromValueOptional<'a> for VideoTransferFunction { impl<'a> FromValue<'a> for VideoTransferFunction { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for VideoTransferFunction { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer-video/src/auto/flags.rs b/gstreamer-video/src/auto/flags.rs index cc87f83a6..32c58b357 100644 --- a/gstreamer-video/src/auto/flags.rs +++ b/gstreamer-video/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer-video/src/auto/mod.rs b/gstreamer-video/src/auto/mod.rs index bd109635a..5fd360a4d 100644 --- a/gstreamer-video/src/auto/mod.rs +++ b/gstreamer-video/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT mod video_overlay; diff --git a/gstreamer-video/src/auto/video_overlay.rs b/gstreamer-video/src/auto/video_overlay.rs index 2bc402618..0224691a1 100644 --- a/gstreamer-video/src/auto/video_overlay.rs +++ b/gstreamer-video/src/auto/video_overlay.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (0fe730d) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/alias.rs b/gstreamer/src/auto/alias.rs index 11740293a..145e204c9 100644 --- a/gstreamer/src/auto/alias.rs +++ b/gstreamer/src/auto/alias.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT #[allow(unused_imports)] diff --git a/gstreamer/src/auto/bin.rs b/gstreamer/src/auto/bin.rs index f3f21e69f..dade3a417 100644 --- a/gstreamer/src/auto/bin.rs +++ b/gstreamer/src/auto/bin.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ChildProxy; diff --git a/gstreamer/src/auto/bus.rs b/gstreamer/src/auto/bus.rs index 1e56e86ee..c84c21881 100644 --- a/gstreamer/src/auto/bus.rs +++ b/gstreamer/src/auto/bus.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ClockTime; diff --git a/gstreamer/src/auto/child_proxy.rs b/gstreamer/src/auto/child_proxy.rs index 34843a110..ba85c6c68 100644 --- a/gstreamer/src/auto/child_proxy.rs +++ b/gstreamer/src/auto/child_proxy.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/clock.rs b/gstreamer/src/auto/clock.rs index 684589564..c9f908dd0 100644 --- a/gstreamer/src/auto/clock.rs +++ b/gstreamer/src/auto/clock.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ClockTime; diff --git a/gstreamer/src/auto/date_time.rs b/gstreamer/src/auto/date_time.rs index ccc7fe090..a92611c22 100644 --- a/gstreamer/src/auto/date_time.rs +++ b/gstreamer/src/auto/date_time.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/device.rs b/gstreamer/src/auto/device.rs index 0f35ce9d5..4de3c4078 100644 --- a/gstreamer/src/auto/device.rs +++ b/gstreamer/src/auto/device.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/device_monitor.rs b/gstreamer/src/auto/device_monitor.rs index bea70951e..23395aebd 100644 --- a/gstreamer/src/auto/device_monitor.rs +++ b/gstreamer/src/auto/device_monitor.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Bus; diff --git a/gstreamer/src/auto/device_provider.rs b/gstreamer/src/auto/device_provider.rs index 9111d76d9..5027f1ab6 100644 --- a/gstreamer/src/auto/device_provider.rs +++ b/gstreamer/src/auto/device_provider.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Bus; diff --git a/gstreamer/src/auto/device_provider_factory.rs b/gstreamer/src/auto/device_provider_factory.rs index b58be11a1..5669af0bd 100644 --- a/gstreamer/src/auto/device_provider_factory.rs +++ b/gstreamer/src/auto/device_provider_factory.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use DeviceProvider; diff --git a/gstreamer/src/auto/element.rs b/gstreamer/src/auto/element.rs index 0e40240fd..8da71dc6a 100644 --- a/gstreamer/src/auto/element.rs +++ b/gstreamer/src/auto/element.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Bus; diff --git a/gstreamer/src/auto/element_factory.rs b/gstreamer/src/auto/element_factory.rs index 3a44a36a1..6917f1e9d 100644 --- a/gstreamer/src/auto/element_factory.rs +++ b/gstreamer/src/auto/element_factory.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/enums.rs b/gstreamer/src/auto/enums.rs index 31aa0dce7..f3b3940d0 100644 --- a/gstreamer/src/auto/enums.rs +++ b/gstreamer/src/auto/enums.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; @@ -9,7 +9,6 @@ use glib::StaticType; use glib::value::{Value, SetValue, FromValue, FromValueOptional}; use gobject_ffi; use glib::translate::*; -use std; #[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] pub enum BufferingMode { @@ -31,7 +30,7 @@ impl ToGlib for BufferingMode { BufferingMode::Download => ffi::GST_BUFFERING_DOWNLOAD, BufferingMode::Timeshift => ffi::GST_BUFFERING_TIMESHIFT, BufferingMode::Live => ffi::GST_BUFFERING_LIVE, - BufferingMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + BufferingMode::__Unknown(value) => value } } } @@ -40,7 +39,7 @@ impl ToGlib for BufferingMode { impl FromGlib for BufferingMode { fn from_glib(value: ffi::GstBufferingMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => BufferingMode::Stream, 1 => BufferingMode::Download, 2 => BufferingMode::Timeshift, @@ -64,13 +63,13 @@ impl<'a> FromValueOptional<'a> for BufferingMode { impl<'a> FromValue<'a> for BufferingMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for BufferingMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -92,7 +91,7 @@ impl ToGlib for BusSyncReply { BusSyncReply::Drop => ffi::GST_BUS_DROP, BusSyncReply::Pass => ffi::GST_BUS_PASS, BusSyncReply::Async => ffi::GST_BUS_ASYNC, - BusSyncReply::__Unknown(value) => unsafe{std::mem::transmute(value)} + BusSyncReply::__Unknown(value) => value } } } @@ -101,7 +100,7 @@ impl ToGlib for BusSyncReply { impl FromGlib for BusSyncReply { fn from_glib(value: ffi::GstBusSyncReply) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => BusSyncReply::Drop, 1 => BusSyncReply::Pass, 2 => BusSyncReply::Async, @@ -124,13 +123,13 @@ impl<'a> FromValueOptional<'a> for BusSyncReply { impl<'a> FromValue<'a> for BusSyncReply { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for BusSyncReply { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -150,7 +149,7 @@ impl ToGlib for CapsIntersectMode { match *self { CapsIntersectMode::ZigZag => ffi::GST_CAPS_INTERSECT_ZIG_ZAG, CapsIntersectMode::First => ffi::GST_CAPS_INTERSECT_FIRST, - CapsIntersectMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + CapsIntersectMode::__Unknown(value) => value } } } @@ -159,7 +158,7 @@ impl ToGlib for CapsIntersectMode { impl FromGlib for CapsIntersectMode { fn from_glib(value: ffi::GstCapsIntersectMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => CapsIntersectMode::ZigZag, 1 => CapsIntersectMode::First, value => CapsIntersectMode::__Unknown(value), @@ -181,13 +180,13 @@ impl<'a> FromValueOptional<'a> for CapsIntersectMode { impl<'a> FromValue<'a> for CapsIntersectMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for CapsIntersectMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -219,7 +218,7 @@ impl ToGlib for ClockReturn { ClockReturn::Error => ffi::GST_CLOCK_ERROR, ClockReturn::Unsupported => ffi::GST_CLOCK_UNSUPPORTED, ClockReturn::Done => ffi::GST_CLOCK_DONE, - ClockReturn::__Unknown(value) => unsafe{std::mem::transmute(value)} + ClockReturn::__Unknown(value) => value } } } @@ -228,7 +227,7 @@ impl ToGlib for ClockReturn { impl FromGlib for ClockReturn { fn from_glib(value: ffi::GstClockReturn) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => ClockReturn::Ok, 1 => ClockReturn::Early, 2 => ClockReturn::Unscheduled, @@ -256,13 +255,13 @@ impl<'a> FromValueOptional<'a> for ClockReturn { impl<'a> FromValue<'a> for ClockReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ClockReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -284,7 +283,7 @@ impl ToGlib for ClockType { ClockType::Realtime => ffi::GST_CLOCK_TYPE_REALTIME, ClockType::Monotonic => ffi::GST_CLOCK_TYPE_MONOTONIC, ClockType::Other => ffi::GST_CLOCK_TYPE_OTHER, - ClockType::__Unknown(value) => unsafe{std::mem::transmute(value)} + ClockType::__Unknown(value) => value } } } @@ -293,7 +292,7 @@ impl ToGlib for ClockType { impl FromGlib for ClockType { fn from_glib(value: ffi::GstClockType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => ClockType::Realtime, 1 => ClockType::Monotonic, 2 => ClockType::Other, @@ -316,13 +315,13 @@ impl<'a> FromValueOptional<'a> for ClockType { impl<'a> FromValue<'a> for ClockType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ClockType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -368,7 +367,7 @@ impl ToGlib for CoreError { CoreError::Clock => ffi::GST_CORE_ERROR_CLOCK, CoreError::Disabled => ffi::GST_CORE_ERROR_DISABLED, CoreError::NumErrors => ffi::GST_CORE_ERROR_NUM_ERRORS, - CoreError::__Unknown(value) => unsafe{std::mem::transmute(value)} + CoreError::__Unknown(value) => value } } } @@ -377,7 +376,7 @@ impl ToGlib for CoreError { impl FromGlib for CoreError { fn from_glib(value: ffi::GstCoreError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 1 => CoreError::Failed, 2 => CoreError::TooLazy, 3 => CoreError::NotImplemented, @@ -405,7 +404,7 @@ impl ErrorDomain for CoreError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -445,13 +444,13 @@ impl<'a> FromValueOptional<'a> for CoreError { impl<'a> FromValue<'a> for CoreError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for CoreError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -487,7 +486,7 @@ impl ToGlib for DebugLevel { DebugLevel::Trace => ffi::GST_LEVEL_TRACE, DebugLevel::Memdump => ffi::GST_LEVEL_MEMDUMP, DebugLevel::Count => ffi::GST_LEVEL_COUNT, - DebugLevel::__Unknown(value) => unsafe{std::mem::transmute(value)} + DebugLevel::__Unknown(value) => value } } } @@ -496,7 +495,7 @@ impl ToGlib for DebugLevel { impl FromGlib for DebugLevel { fn from_glib(value: ffi::GstDebugLevel) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => DebugLevel::None, 1 => DebugLevel::Error, 2 => DebugLevel::Warning, @@ -526,13 +525,13 @@ impl<'a> FromValueOptional<'a> for DebugLevel { impl<'a> FromValue<'a> for DebugLevel { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for DebugLevel { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -608,7 +607,7 @@ impl ToGlib for EventType { EventType::CustomDownstreamSticky => ffi::GST_EVENT_CUSTOM_DOWNSTREAM_STICKY, EventType::CustomBoth => ffi::GST_EVENT_CUSTOM_BOTH, EventType::CustomBothOob => ffi::GST_EVENT_CUSTOM_BOTH_OOB, - EventType::__Unknown(value) => unsafe{std::mem::transmute(value)} + EventType::__Unknown(value) => value } } } @@ -617,7 +616,7 @@ impl ToGlib for EventType { impl FromGlib for EventType { fn from_glib(value: ffi::GstEventType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => EventType::Unknown, 2563 => EventType::FlushStart, 5127 => EventType::FlushStop, @@ -667,13 +666,13 @@ impl<'a> FromValueOptional<'a> for EventType { impl<'a> FromValue<'a> for EventType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for EventType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -715,7 +714,7 @@ impl ToGlib for FlowReturn { FlowReturn::CustomError => ffi::GST_FLOW_CUSTOM_ERROR, FlowReturn::CustomError1 => ffi::GST_FLOW_CUSTOM_ERROR_1, FlowReturn::CustomError2 => ffi::GST_FLOW_CUSTOM_ERROR_2, - FlowReturn::__Unknown(value) => unsafe{std::mem::transmute(value)} + FlowReturn::__Unknown(value) => value } } } @@ -724,7 +723,7 @@ impl ToGlib for FlowReturn { impl FromGlib for FlowReturn { fn from_glib(value: ffi::GstFlowReturn) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 102 => FlowReturn::CustomSuccess2, 101 => FlowReturn::CustomSuccess1, 100 => FlowReturn::CustomSuccess, @@ -757,13 +756,13 @@ impl<'a> FromValueOptional<'a> for FlowReturn { impl<'a> FromValue<'a> for FlowReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for FlowReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -791,7 +790,7 @@ impl ToGlib for Format { Format::Time => ffi::GST_FORMAT_TIME, Format::Buffers => ffi::GST_FORMAT_BUFFERS, Format::Percent => ffi::GST_FORMAT_PERCENT, - Format::__Unknown(value) => unsafe{std::mem::transmute(value)} + Format::__Unknown(value) => value } } } @@ -800,7 +799,7 @@ impl ToGlib for Format { impl FromGlib for Format { fn from_glib(value: ffi::GstFormat) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => Format::Undefined, 1 => Format::Default, 2 => Format::Bytes, @@ -826,13 +825,13 @@ impl<'a> FromValueOptional<'a> for Format { impl<'a> FromValue<'a> for Format { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Format { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -862,7 +861,7 @@ impl ToGlib for LibraryError { LibraryError::Settings => ffi::GST_LIBRARY_ERROR_SETTINGS, LibraryError::Encode => ffi::GST_LIBRARY_ERROR_ENCODE, LibraryError::NumErrors => ffi::GST_LIBRARY_ERROR_NUM_ERRORS, - LibraryError::__Unknown(value) => unsafe{std::mem::transmute(value)} + LibraryError::__Unknown(value) => value } } } @@ -871,7 +870,7 @@ impl ToGlib for LibraryError { impl FromGlib for LibraryError { fn from_glib(value: ffi::GstLibraryError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 1 => LibraryError::Failed, 2 => LibraryError::TooLazy, 3 => LibraryError::Init, @@ -891,7 +890,7 @@ impl ErrorDomain for LibraryError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -923,13 +922,13 @@ impl<'a> FromValueOptional<'a> for LibraryError { impl<'a> FromValue<'a> for LibraryError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for LibraryError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -951,7 +950,7 @@ impl ToGlib for PadDirection { PadDirection::Unknown => ffi::GST_PAD_UNKNOWN, PadDirection::Src => ffi::GST_PAD_SRC, PadDirection::Sink => ffi::GST_PAD_SINK, - PadDirection::__Unknown(value) => unsafe{std::mem::transmute(value)} + PadDirection::__Unknown(value) => value } } } @@ -960,7 +959,7 @@ impl ToGlib for PadDirection { impl FromGlib for PadDirection { fn from_glib(value: ffi::GstPadDirection) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PadDirection::Unknown, 1 => PadDirection::Src, 2 => PadDirection::Sink, @@ -983,13 +982,13 @@ impl<'a> FromValueOptional<'a> for PadDirection { impl<'a> FromValue<'a> for PadDirection { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadDirection { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1019,7 +1018,7 @@ impl ToGlib for PadLinkReturn { PadLinkReturn::Noformat => ffi::GST_PAD_LINK_NOFORMAT, PadLinkReturn::Nosched => ffi::GST_PAD_LINK_NOSCHED, PadLinkReturn::Refused => ffi::GST_PAD_LINK_REFUSED, - PadLinkReturn::__Unknown(value) => unsafe{std::mem::transmute(value)} + PadLinkReturn::__Unknown(value) => value } } } @@ -1028,7 +1027,7 @@ impl ToGlib for PadLinkReturn { impl FromGlib for PadLinkReturn { fn from_glib(value: ffi::GstPadLinkReturn) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PadLinkReturn::Ok, -1 => PadLinkReturn::WrongHierarchy, -2 => PadLinkReturn::WasLinked, @@ -1055,13 +1054,13 @@ impl<'a> FromValueOptional<'a> for PadLinkReturn { impl<'a> FromValue<'a> for PadLinkReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadLinkReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1083,7 +1082,7 @@ impl ToGlib for PadMode { PadMode::None => ffi::GST_PAD_MODE_NONE, PadMode::Push => ffi::GST_PAD_MODE_PUSH, PadMode::Pull => ffi::GST_PAD_MODE_PULL, - PadMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + PadMode::__Unknown(value) => value } } } @@ -1092,7 +1091,7 @@ impl ToGlib for PadMode { impl FromGlib for PadMode { fn from_glib(value: ffi::GstPadMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PadMode::None, 1 => PadMode::Push, 2 => PadMode::Pull, @@ -1115,13 +1114,13 @@ impl<'a> FromValueOptional<'a> for PadMode { impl<'a> FromValue<'a> for PadMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1143,7 +1142,7 @@ impl ToGlib for PadPresence { PadPresence::Always => ffi::GST_PAD_ALWAYS, PadPresence::Sometimes => ffi::GST_PAD_SOMETIMES, PadPresence::Request => ffi::GST_PAD_REQUEST, - PadPresence::__Unknown(value) => unsafe{std::mem::transmute(value)} + PadPresence::__Unknown(value) => value } } } @@ -1152,7 +1151,7 @@ impl ToGlib for PadPresence { impl FromGlib for PadPresence { fn from_glib(value: ffi::GstPadPresence) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PadPresence::Always, 1 => PadPresence::Sometimes, 2 => PadPresence::Request, @@ -1175,13 +1174,13 @@ impl<'a> FromValueOptional<'a> for PadPresence { impl<'a> FromValue<'a> for PadPresence { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadPresence { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1207,7 +1206,7 @@ impl ToGlib for PadProbeReturn { PadProbeReturn::Remove => ffi::GST_PAD_PROBE_REMOVE, PadProbeReturn::Pass => ffi::GST_PAD_PROBE_PASS, PadProbeReturn::Handled => ffi::GST_PAD_PROBE_HANDLED, - PadProbeReturn::__Unknown(value) => unsafe{std::mem::transmute(value)} + PadProbeReturn::__Unknown(value) => value } } } @@ -1216,7 +1215,7 @@ impl ToGlib for PadProbeReturn { impl FromGlib for PadProbeReturn { fn from_glib(value: ffi::GstPadProbeReturn) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PadProbeReturn::Drop, 1 => PadProbeReturn::Ok, 2 => PadProbeReturn::Remove, @@ -1241,13 +1240,13 @@ impl<'a> FromValueOptional<'a> for PadProbeReturn { impl<'a> FromValue<'a> for PadProbeReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PadProbeReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1279,7 +1278,7 @@ impl ToGlib for ParseError { ParseError::EmptyBin => ffi::GST_PARSE_ERROR_EMPTY_BIN, ParseError::Empty => ffi::GST_PARSE_ERROR_EMPTY, ParseError::DelayedLink => ffi::GST_PARSE_ERROR_DELAYED_LINK, - ParseError::__Unknown(value) => unsafe{std::mem::transmute(value)} + ParseError::__Unknown(value) => value } } } @@ -1288,7 +1287,7 @@ impl ToGlib for ParseError { impl FromGlib for ParseError { fn from_glib(value: ffi::GstParseError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => ParseError::Syntax, 1 => ParseError::NoSuchElement, 2 => ParseError::NoSuchProperty, @@ -1309,7 +1308,7 @@ impl ErrorDomain for ParseError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -1342,13 +1341,13 @@ impl<'a> FromValueOptional<'a> for ParseError { impl<'a> FromValue<'a> for ParseError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ParseError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1370,7 +1369,7 @@ impl ToGlib for PluginError { PluginError::Module => ffi::GST_PLUGIN_ERROR_MODULE, PluginError::Dependencies => ffi::GST_PLUGIN_ERROR_DEPENDENCIES, PluginError::NameMismatch => ffi::GST_PLUGIN_ERROR_NAME_MISMATCH, - PluginError::__Unknown(value) => unsafe{std::mem::transmute(value)} + PluginError::__Unknown(value) => value } } } @@ -1379,7 +1378,7 @@ impl ToGlib for PluginError { impl FromGlib for PluginError { fn from_glib(value: ffi::GstPluginError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => PluginError::Module, 1 => PluginError::Dependencies, 2 => PluginError::NameMismatch, @@ -1395,7 +1394,7 @@ impl ErrorDomain for PluginError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -1423,13 +1422,13 @@ impl<'a> FromValueOptional<'a> for PluginError { impl<'a> FromValue<'a> for PluginError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for PluginError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1455,7 +1454,7 @@ impl ToGlib for ProgressType { ProgressType::Complete => ffi::GST_PROGRESS_TYPE_COMPLETE, ProgressType::Canceled => ffi::GST_PROGRESS_TYPE_CANCELED, ProgressType::Error => ffi::GST_PROGRESS_TYPE_ERROR, - ProgressType::__Unknown(value) => unsafe{std::mem::transmute(value)} + ProgressType::__Unknown(value) => value } } } @@ -1464,7 +1463,7 @@ impl ToGlib for ProgressType { impl FromGlib for ProgressType { fn from_glib(value: ffi::GstProgressType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => ProgressType::Start, 1 => ProgressType::Continue, 2 => ProgressType::Complete, @@ -1489,13 +1488,13 @@ impl<'a> FromValueOptional<'a> for ProgressType { impl<'a> FromValue<'a> for ProgressType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ProgressType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1517,7 +1516,7 @@ impl ToGlib for QOSType { QOSType::Overflow => ffi::GST_QOS_TYPE_OVERFLOW, QOSType::Underflow => ffi::GST_QOS_TYPE_UNDERFLOW, QOSType::Throttle => ffi::GST_QOS_TYPE_THROTTLE, - QOSType::__Unknown(value) => unsafe{std::mem::transmute(value)} + QOSType::__Unknown(value) => value } } } @@ -1526,7 +1525,7 @@ impl ToGlib for QOSType { impl FromGlib for QOSType { fn from_glib(value: ffi::GstQOSType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => QOSType::Overflow, 1 => QOSType::Underflow, 2 => QOSType::Throttle, @@ -1549,13 +1548,13 @@ impl<'a> FromValueOptional<'a> for QOSType { impl<'a> FromValue<'a> for QOSType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for QOSType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1579,7 +1578,7 @@ impl ToGlib for Rank { Rank::Marginal => ffi::GST_RANK_MARGINAL, Rank::Secondary => ffi::GST_RANK_SECONDARY, Rank::Primary => ffi::GST_RANK_PRIMARY, - Rank::__Unknown(value) => unsafe{std::mem::transmute(value)} + Rank::__Unknown(value) => value } } } @@ -1588,7 +1587,7 @@ impl ToGlib for Rank { impl FromGlib for Rank { fn from_glib(value: ffi::GstRank) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => Rank::None, 64 => Rank::Marginal, 128 => Rank::Secondary, @@ -1612,13 +1611,13 @@ impl<'a> FromValueOptional<'a> for Rank { impl<'a> FromValue<'a> for Rank { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for Rank { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1666,7 +1665,7 @@ impl ToGlib for ResourceError { ResourceError::NoSpaceLeft => ffi::GST_RESOURCE_ERROR_NO_SPACE_LEFT, ResourceError::NotAuthorized => ffi::GST_RESOURCE_ERROR_NOT_AUTHORIZED, ResourceError::NumErrors => ffi::GST_RESOURCE_ERROR_NUM_ERRORS, - ResourceError::__Unknown(value) => unsafe{std::mem::transmute(value)} + ResourceError::__Unknown(value) => value } } } @@ -1675,7 +1674,7 @@ impl ToGlib for ResourceError { impl FromGlib for ResourceError { fn from_glib(value: ffi::GstResourceError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 1 => ResourceError::Failed, 2 => ResourceError::TooLazy, 3 => ResourceError::NotFound, @@ -1704,7 +1703,7 @@ impl ErrorDomain for ResourceError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -1745,13 +1744,13 @@ impl<'a> FromValueOptional<'a> for ResourceError { impl<'a> FromValue<'a> for ResourceError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for ResourceError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1773,7 +1772,7 @@ impl ToGlib for SeekType { SeekType::None => ffi::GST_SEEK_TYPE_NONE, SeekType::Set => ffi::GST_SEEK_TYPE_SET, SeekType::End => ffi::GST_SEEK_TYPE_END, - SeekType::__Unknown(value) => unsafe{std::mem::transmute(value)} + SeekType::__Unknown(value) => value } } } @@ -1782,7 +1781,7 @@ impl ToGlib for SeekType { impl FromGlib for SeekType { fn from_glib(value: ffi::GstSeekType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => SeekType::None, 1 => SeekType::Set, 2 => SeekType::End, @@ -1805,13 +1804,13 @@ impl<'a> FromValueOptional<'a> for SeekType { impl<'a> FromValue<'a> for SeekType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for SeekType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1837,7 +1836,7 @@ impl ToGlib for State { State::Ready => ffi::GST_STATE_READY, State::Paused => ffi::GST_STATE_PAUSED, State::Playing => ffi::GST_STATE_PLAYING, - State::__Unknown(value) => unsafe{std::mem::transmute(value)} + State::__Unknown(value) => value } } } @@ -1846,7 +1845,7 @@ impl ToGlib for State { impl FromGlib for State { fn from_glib(value: ffi::GstState) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => State::VoidPending, 1 => State::Null, 2 => State::Ready, @@ -1871,13 +1870,13 @@ impl<'a> FromValueOptional<'a> for State { impl<'a> FromValue<'a> for State { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for State { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1905,7 +1904,7 @@ impl ToGlib for StateChange { StateChange::PlayingToPaused => ffi::GST_STATE_CHANGE_PLAYING_TO_PAUSED, StateChange::PausedToReady => ffi::GST_STATE_CHANGE_PAUSED_TO_READY, StateChange::ReadyToNull => ffi::GST_STATE_CHANGE_READY_TO_NULL, - StateChange::__Unknown(value) => unsafe{std::mem::transmute(value)} + StateChange::__Unknown(value) => value } } } @@ -1914,7 +1913,7 @@ impl ToGlib for StateChange { impl FromGlib for StateChange { fn from_glib(value: ffi::GstStateChange) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 10 => StateChange::NullToReady, 19 => StateChange::ReadyToPaused, 28 => StateChange::PausedToPlaying, @@ -1940,13 +1939,13 @@ impl<'a> FromValueOptional<'a> for StateChange { impl<'a> FromValue<'a> for StateChange { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StateChange { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -1970,7 +1969,7 @@ impl ToGlib for StateChangeReturn { StateChangeReturn::Success => ffi::GST_STATE_CHANGE_SUCCESS, StateChangeReturn::Async => ffi::GST_STATE_CHANGE_ASYNC, StateChangeReturn::NoPreroll => ffi::GST_STATE_CHANGE_NO_PREROLL, - StateChangeReturn::__Unknown(value) => unsafe{std::mem::transmute(value)} + StateChangeReturn::__Unknown(value) => value } } } @@ -1979,7 +1978,7 @@ impl ToGlib for StateChangeReturn { impl FromGlib for StateChangeReturn { fn from_glib(value: ffi::GstStateChangeReturn) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => StateChangeReturn::Failure, 1 => StateChangeReturn::Success, 2 => StateChangeReturn::Async, @@ -2003,13 +2002,13 @@ impl<'a> FromValueOptional<'a> for StateChangeReturn { impl<'a> FromValue<'a> for StateChangeReturn { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StateChangeReturn { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2053,7 +2052,7 @@ impl ToGlib for StreamError { StreamError::Decrypt => ffi::GST_STREAM_ERROR_DECRYPT, StreamError::DecryptNokey => ffi::GST_STREAM_ERROR_DECRYPT_NOKEY, StreamError::NumErrors => ffi::GST_STREAM_ERROR_NUM_ERRORS, - StreamError::__Unknown(value) => unsafe{std::mem::transmute(value)} + StreamError::__Unknown(value) => value } } } @@ -2062,7 +2061,7 @@ impl ToGlib for StreamError { impl FromGlib for StreamError { fn from_glib(value: ffi::GstStreamError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 1 => StreamError::Failed, 2 => StreamError::TooLazy, 3 => StreamError::NotImplemented, @@ -2089,7 +2088,7 @@ impl ErrorDomain for StreamError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -2128,13 +2127,13 @@ impl<'a> FromValueOptional<'a> for StreamError { impl<'a> FromValue<'a> for StreamError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StreamError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2164,7 +2163,7 @@ impl ToGlib for StreamStatusType { StreamStatusType::Start => ffi::GST_STREAM_STATUS_TYPE_START, StreamStatusType::Pause => ffi::GST_STREAM_STATUS_TYPE_PAUSE, StreamStatusType::Stop => ffi::GST_STREAM_STATUS_TYPE_STOP, - StreamStatusType::__Unknown(value) => unsafe{std::mem::transmute(value)} + StreamStatusType::__Unknown(value) => value } } } @@ -2173,7 +2172,7 @@ impl ToGlib for StreamStatusType { impl FromGlib for StreamStatusType { fn from_glib(value: ffi::GstStreamStatusType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => StreamStatusType::Create, 1 => StreamStatusType::Enter, 2 => StreamStatusType::Leave, @@ -2200,13 +2199,13 @@ impl<'a> FromValueOptional<'a> for StreamStatusType { impl<'a> FromValue<'a> for StreamStatusType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StreamStatusType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2226,7 +2225,7 @@ impl ToGlib for StructureChangeType { match *self { StructureChangeType::Link => ffi::GST_STRUCTURE_CHANGE_TYPE_PAD_LINK, StructureChangeType::Unlink => ffi::GST_STRUCTURE_CHANGE_TYPE_PAD_UNLINK, - StructureChangeType::__Unknown(value) => unsafe{std::mem::transmute(value)} + StructureChangeType::__Unknown(value) => value } } } @@ -2235,7 +2234,7 @@ impl ToGlib for StructureChangeType { impl FromGlib for StructureChangeType { fn from_glib(value: ffi::GstStructureChangeType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => StructureChangeType::Link, 1 => StructureChangeType::Unlink, value => StructureChangeType::__Unknown(value), @@ -2257,13 +2256,13 @@ impl<'a> FromValueOptional<'a> for StructureChangeType { impl<'a> FromValue<'a> for StructureChangeType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for StructureChangeType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2295,7 +2294,7 @@ impl ToGlib for TagMergeMode { TagMergeMode::Keep => ffi::GST_TAG_MERGE_KEEP, TagMergeMode::KeepAll => ffi::GST_TAG_MERGE_KEEP_ALL, TagMergeMode::Count => ffi::GST_TAG_MERGE_COUNT, - TagMergeMode::__Unknown(value) => unsafe{std::mem::transmute(value)} + TagMergeMode::__Unknown(value) => value } } } @@ -2304,7 +2303,7 @@ impl ToGlib for TagMergeMode { impl FromGlib for TagMergeMode { fn from_glib(value: ffi::GstTagMergeMode) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => TagMergeMode::Undefined, 1 => TagMergeMode::ReplaceAll, 2 => TagMergeMode::Replace, @@ -2332,13 +2331,13 @@ impl<'a> FromValueOptional<'a> for TagMergeMode { impl<'a> FromValue<'a> for TagMergeMode { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TagMergeMode { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2360,7 +2359,7 @@ impl ToGlib for TaskState { TaskState::Started => ffi::GST_TASK_STARTED, TaskState::Stopped => ffi::GST_TASK_STOPPED, TaskState::Paused => ffi::GST_TASK_PAUSED, - TaskState::__Unknown(value) => unsafe{std::mem::transmute(value)} + TaskState::__Unknown(value) => value } } } @@ -2369,7 +2368,7 @@ impl ToGlib for TaskState { impl FromGlib for TaskState { fn from_glib(value: ffi::GstTaskState) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => TaskState::Started, 1 => TaskState::Stopped, 2 => TaskState::Paused, @@ -2392,13 +2391,13 @@ impl<'a> FromValueOptional<'a> for TaskState { impl<'a> FromValue<'a> for TaskState { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TaskState { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2428,7 +2427,7 @@ impl ToGlib for TocEntryType { TocEntryType::Title => ffi::GST_TOC_ENTRY_TYPE_TITLE, TocEntryType::Track => ffi::GST_TOC_ENTRY_TYPE_TRACK, TocEntryType::Chapter => ffi::GST_TOC_ENTRY_TYPE_CHAPTER, - TocEntryType::__Unknown(value) => unsafe{std::mem::transmute(value)} + TocEntryType::__Unknown(value) => value } } } @@ -2437,7 +2436,7 @@ impl ToGlib for TocEntryType { impl FromGlib for TocEntryType { fn from_glib(value: ffi::GstTocEntryType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { -3 => TocEntryType::Angle, -2 => TocEntryType::Version, -1 => TocEntryType::Edition, @@ -2464,13 +2463,13 @@ impl<'a> FromValueOptional<'a> for TocEntryType { impl<'a> FromValue<'a> for TocEntryType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TocEntryType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2494,7 +2493,7 @@ impl ToGlib for TocLoopType { TocLoopType::Forward => ffi::GST_TOC_LOOP_FORWARD, TocLoopType::Reverse => ffi::GST_TOC_LOOP_REVERSE, TocLoopType::PingPong => ffi::GST_TOC_LOOP_PING_PONG, - TocLoopType::__Unknown(value) => unsafe{std::mem::transmute(value)} + TocLoopType::__Unknown(value) => value } } } @@ -2503,7 +2502,7 @@ impl ToGlib for TocLoopType { impl FromGlib for TocLoopType { fn from_glib(value: ffi::GstTocLoopType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => TocLoopType::None, 1 => TocLoopType::Forward, 2 => TocLoopType::Reverse, @@ -2527,13 +2526,13 @@ impl<'a> FromValueOptional<'a> for TocLoopType { impl<'a> FromValue<'a> for TocLoopType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TocLoopType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2553,7 +2552,7 @@ impl ToGlib for TocScope { match *self { TocScope::Global => ffi::GST_TOC_SCOPE_GLOBAL, TocScope::Current => ffi::GST_TOC_SCOPE_CURRENT, - TocScope::__Unknown(value) => unsafe{std::mem::transmute(value)} + TocScope::__Unknown(value) => value } } } @@ -2562,7 +2561,7 @@ impl ToGlib for TocScope { impl FromGlib for TocScope { fn from_glib(value: ffi::GstTocScope) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 1 => TocScope::Global, 2 => TocScope::Current, value => TocScope::__Unknown(value), @@ -2584,13 +2583,13 @@ impl<'a> FromValueOptional<'a> for TocScope { impl<'a> FromValue<'a> for TocScope { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for TocScope { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2614,7 +2613,7 @@ impl ToGlib for URIError { URIError::BadUri => ffi::GST_URI_ERROR_BAD_URI, URIError::BadState => ffi::GST_URI_ERROR_BAD_STATE, URIError::BadReference => ffi::GST_URI_ERROR_BAD_REFERENCE, - URIError::__Unknown(value) => unsafe{std::mem::transmute(value)} + URIError::__Unknown(value) => value } } } @@ -2623,7 +2622,7 @@ impl ToGlib for URIError { impl FromGlib for URIError { fn from_glib(value: ffi::GstURIError) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => URIError::UnsupportedProtocol, 1 => URIError::BadUri, 2 => URIError::BadState, @@ -2640,7 +2639,7 @@ impl ErrorDomain for URIError { } fn code(self) -> i32 { - self.to_glib() as i32 + self.to_glib() } fn from(code: i32) -> Option { @@ -2669,13 +2668,13 @@ impl<'a> FromValueOptional<'a> for URIError { impl<'a> FromValue<'a> for URIError { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for URIError { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } @@ -2697,7 +2696,7 @@ impl ToGlib for URIType { URIType::Unknown => ffi::GST_URI_UNKNOWN, URIType::Sink => ffi::GST_URI_SINK, URIType::Src => ffi::GST_URI_SRC, - URIType::__Unknown(value) => unsafe{std::mem::transmute(value)} + URIType::__Unknown(value) => value } } } @@ -2706,7 +2705,7 @@ impl ToGlib for URIType { impl FromGlib for URIType { fn from_glib(value: ffi::GstURIType) -> Self { skip_assert_initialized!(); - match value as i32 { + match value { 0 => URIType::Unknown, 1 => URIType::Sink, 2 => URIType::Src, @@ -2729,13 +2728,13 @@ impl<'a> FromValueOptional<'a> for URIType { impl<'a> FromValue<'a> for URIType { unsafe fn from_value(value: &Value) -> Self { - from_glib(std::mem::transmute::(gobject_ffi::g_value_get_enum(value.to_glib_none().0))) + from_glib(gobject_ffi::g_value_get_enum(value.to_glib_none().0)) } } impl SetValue for URIType { unsafe fn set_value(value: &mut Value, this: &Self) { - gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib() as i32) + gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib()) } } diff --git a/gstreamer/src/auto/flags.rs b/gstreamer/src/auto/flags.rs index 7f0ddb7fd..1bb2246c9 100644 --- a/gstreamer/src/auto/flags.rs +++ b/gstreamer/src/auto/flags.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/functions.rs b/gstreamer/src/auto/functions.rs index 3d0242187..aa31be4a2 100644 --- a/gstreamer/src/auto/functions.rs +++ b/gstreamer/src/auto/functions.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Bin; diff --git a/gstreamer/src/auto/ghost_pad.rs b/gstreamer/src/auto/ghost_pad.rs index f279962f7..2d7e5e81b 100644 --- a/gstreamer/src/auto/ghost_pad.rs +++ b/gstreamer/src/auto/ghost_pad.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Object; diff --git a/gstreamer/src/auto/mod.rs b/gstreamer/src/auto/mod.rs index b0f28b0a7..8e6269088 100644 --- a/gstreamer/src/auto/mod.rs +++ b/gstreamer/src/auto/mod.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT mod bin; diff --git a/gstreamer/src/auto/object.rs b/gstreamer/src/auto/object.rs index e278acb6e..e998840ff 100644 --- a/gstreamer/src/auto/object.rs +++ b/gstreamer/src/auto/object.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ClockTime; diff --git a/gstreamer/src/auto/pad.rs b/gstreamer/src/auto/pad.rs index 5647bc061..1b3da38dc 100644 --- a/gstreamer/src/auto/pad.rs +++ b/gstreamer/src/auto/pad.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/pad_template.rs b/gstreamer/src/auto/pad_template.rs index 09e7dc67a..f014d1e8e 100644 --- a/gstreamer/src/auto/pad_template.rs +++ b/gstreamer/src/auto/pad_template.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/pipeline.rs b/gstreamer/src/auto/pipeline.rs index d81417429..bc29998a0 100644 --- a/gstreamer/src/auto/pipeline.rs +++ b/gstreamer/src/auto/pipeline.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Bin; diff --git a/gstreamer/src/auto/plugin.rs b/gstreamer/src/auto/plugin.rs index c8b6c2f77..2cbcf2204 100644 --- a/gstreamer/src/auto/plugin.rs +++ b/gstreamer/src/auto/plugin.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Error; diff --git a/gstreamer/src/auto/preset.rs b/gstreamer/src/auto/preset.rs index f0ebf9671..338bf8e7d 100644 --- a/gstreamer/src/auto/preset.rs +++ b/gstreamer/src/auto/preset.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use ffi; diff --git a/gstreamer/src/auto/proxy_pad.rs b/gstreamer/src/auto/proxy_pad.rs index 40d2e396f..19369798c 100644 --- a/gstreamer/src/auto/proxy_pad.rs +++ b/gstreamer/src/auto/proxy_pad.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Object; diff --git a/gstreamer/src/auto/stream.rs b/gstreamer/src/auto/stream.rs index 1b84aef2c..d8d93c363 100644 --- a/gstreamer/src/auto/stream.rs +++ b/gstreamer/src/auto/stream.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Caps; diff --git a/gstreamer/src/auto/stream_collection.rs b/gstreamer/src/auto/stream_collection.rs index 857acf8db..434b851d0 100644 --- a/gstreamer/src/auto/stream_collection.rs +++ b/gstreamer/src/auto/stream_collection.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Object; diff --git a/gstreamer/src/auto/system_clock.rs b/gstreamer/src/auto/system_clock.rs index eac0b2ee6..50b870767 100644 --- a/gstreamer/src/auto/system_clock.rs +++ b/gstreamer/src/auto/system_clock.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Clock; diff --git a/gstreamer/src/auto/tag_setter.rs b/gstreamer/src/auto/tag_setter.rs index 49a7a0829..6cace1da0 100644 --- a/gstreamer/src/auto/tag_setter.rs +++ b/gstreamer/src/auto/tag_setter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Element; diff --git a/gstreamer/src/auto/toc_setter.rs b/gstreamer/src/auto/toc_setter.rs index 9543dd3a0..15fa2f9ba 100644 --- a/gstreamer/src/auto/toc_setter.rs +++ b/gstreamer/src/auto/toc_setter.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Element; diff --git a/gstreamer/src/auto/u_r_i_handler.rs b/gstreamer/src/auto/u_r_i_handler.rs index 8729becea..6e75159ec 100644 --- a/gstreamer/src/auto/u_r_i_handler.rs +++ b/gstreamer/src/auto/u_r_i_handler.rs @@ -1,4 +1,4 @@ -// This file was generated by gir (12a28ac+) from gir-files (???) +// This file was generated by gir (94e079d) from gir-files (???) // DO NOT EDIT use Error; diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index 730e55caa..96aebddea 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -115,7 +115,7 @@ where match res { ffi::GST_ITERATOR_OK | ffi::GST_ITERATOR_DONE => Ok(()), ffi::GST_ITERATOR_RESYNC => Err(IteratorError::Resync), - ffi::GST_ITERATOR_ERROR => Err(IteratorError::Error), + ffi::GST_ITERATOR_ERROR | _ => Err(IteratorError::Error), } } } @@ -149,7 +149,7 @@ where match res { ffi::GST_ITERATOR_OK | ffi::GST_ITERATOR_DONE => Ok(accum.unwrap()), ffi::GST_ITERATOR_RESYNC => Err(IteratorError::Resync), - ffi::GST_ITERATOR_ERROR => Err(IteratorError::Error), + ffi::GST_ITERATOR_ERROR | _ => Err(IteratorError::Error), } } } @@ -211,7 +211,7 @@ where }, ffi::GST_ITERATOR_DONE => None, ffi::GST_ITERATOR_RESYNC => Some(Err(IteratorError::Resync)), - ffi::GST_ITERATOR_ERROR => Some(Err(IteratorError::Error)), + ffi::GST_ITERATOR_ERROR | _ => Some(Err(IteratorError::Error)), } } }