diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 004c929ed..fc22ac159 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -30,7 +30,7 @@ glutin = { version = "0.21", optional = true } winit = { version = "0.19", optional = true } [build-dependencies] -gl_generator = { version = "0.11", optional = true } +gl_generator = { version = "0.13", optional = true } [features] default = [] diff --git a/gstreamer-audio/Cargo.toml b/gstreamer-audio/Cargo.toml index 9a40aaf0f..2f8a7aeaf 100644 --- a/gstreamer-audio/Cargo.toml +++ b/gstreamer-audio/Cargo.toml @@ -20,7 +20,7 @@ gstreamer-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-s gstreamer-audio-sys = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs-sys", features = ["v1_8"] } glib = { git = "https://github.com/gtk-rs/glib" } gstreamer = { path = "../gstreamer" } -array-init = "0.0" +array-init = "0.1" [build-dependencies.rustdoc-stripper] version = "0.1" diff --git a/gstreamer-audio/src/audio_channel_position.rs b/gstreamer-audio/src/audio_channel_position.rs index 345b661ca..3cfbca9ba 100644 --- a/gstreamer-audio/src/audio_channel_position.rs +++ b/gstreamer-audio/src/audio_channel_position.rs @@ -39,7 +39,7 @@ impl AudioChannelPosition { } let positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = - array_init::array_init_copy(|i| { + array_init::array_init(|i| { if i >= len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -107,7 +107,7 @@ impl AudioChannelPosition { let len = positions.len(); let mut positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = - array_init::array_init_copy(|i| { + array_init::array_init(|i| { if i >= len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -152,7 +152,7 @@ impl AudioChannelPosition { let len = positions.len(); let positions_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = - array_init::array_init_copy(|i| { + array_init::array_init(|i| { if i >= len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -186,7 +186,7 @@ pub fn buffer_reorder_channels( let from_len = from.len(); let to_len = to.len(); - let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| { + let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init(|i| { if i >= from_len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -194,7 +194,7 @@ pub fn buffer_reorder_channels( } }); - let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| { + let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init(|i| { if i >= to_len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -235,7 +235,7 @@ pub fn reorder_channels( let from_len = from.len(); let to_len = to.len(); - let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| { + let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init(|i| { if i >= from_len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -243,7 +243,7 @@ pub fn reorder_channels( } }); - let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| { + let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init(|i| { if i >= to_len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -283,7 +283,7 @@ pub fn get_channel_reorder_map( let from_len = from.len(); let to_len = to.len(); - let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| { + let from_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init(|i| { if i >= from_len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -291,7 +291,7 @@ pub fn get_channel_reorder_map( } }); - let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init_copy(|i| { + let to_raw: [gst_audio_sys::GstAudioChannelPosition; 64] = array_init::array_init(|i| { if i >= to_len as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { diff --git a/gstreamer-audio/src/audio_info.rs b/gstreamer-audio/src/audio_info.rs index 49b02dcd8..3de956bbc 100644 --- a/gstreamer-audio/src/audio_info.rs +++ b/gstreamer-audio/src/audio_info.rs @@ -59,7 +59,7 @@ impl<'a> AudioInfoBuilder<'a> { } let positions: [gst_audio_sys::GstAudioChannelPosition; 64] = - array_init::array_init_copy(|i| { + array_init::array_init(|i| { if i >= self.channels as usize { gst_audio_sys::GST_AUDIO_CHANNEL_POSITION_INVALID } else { @@ -109,7 +109,7 @@ impl<'a> AudioInfoBuilder<'a> { info.layout = layout.to_glib(); } - let positions = array_init::array_init_copy(|i| from_glib(info.position[i])); + let positions = array_init::array_init(|i| from_glib(info.position[i])); Some(AudioInfo(info, positions)) } } @@ -161,7 +161,7 @@ impl AudioInfo { caps.as_ptr(), )) { let info = info.assume_init(); - let positions = array_init::array_init_copy(|i| from_glib(info.position[i])); + let positions = array_init::array_init(|i| from_glib(info.position[i])); Some(AudioInfo(info, positions)) } else { None @@ -386,7 +386,7 @@ impl glib::translate::FromGlibPtrNone<*mut gst_audio_sys::GstAudioInfo> for Audi unsafe fn from_glib_none(ptr: *mut gst_audio_sys::GstAudioInfo) -> Self { AudioInfo( ptr::read(ptr), - array_init::array_init_copy(|i| from_glib((*ptr).position[i])), + array_init::array_init(|i| from_glib((*ptr).position[i])), ) } }