Update array-init to 0.1 and gl_generator to 0.13

This commit is contained in:
Sebastian Dröge 2019-07-24 14:12:00 +03:00
parent 0e36ac5205
commit 1eb5525a27
4 changed files with 15 additions and 15 deletions

View file

@ -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 = []

View file

@ -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"

View file

@ -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 {

View file

@ -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])),
)
}
}