Add ChannelLayout API (#38)
* Create channel_layout directory * Rename ChannelLayout -> ChannelLayoutMask * Add enum Channel (<-> AVChannel) * Add struct ChannelCustom (<-> AVChannelCustom) * Add enum ChannelOrder (<-> AVChannelOrder) * Add struct ChannelLayout - Smart copy-on-write pointer to AVChannelLayout - idiomatic Rust API wrapping around FFmpeg APIs - no Ambisonic support (yet) - consts will need to be manually updated * Add ChannelLayoutIter (iterator over all standard layouts) * Add codec/Audio::ch_layouts * Add ch_layout API to Audio-related structs
This commit is contained in:
@ -2,7 +2,7 @@ use std::marker::PhantomData;
|
||||
|
||||
use super::{Sink, Source};
|
||||
use crate::ffi::*;
|
||||
use crate::{format, option, ChannelLayout};
|
||||
use crate::{format, option, ChannelLayoutMask};
|
||||
use libc::c_void;
|
||||
|
||||
pub struct Context<'a> {
|
||||
@ -49,7 +49,7 @@ impl<'a> Context<'a> {
|
||||
let _ = option::Settable::set(self, "sample_rates", &i64::from(value));
|
||||
}
|
||||
|
||||
pub fn set_channel_layout(&mut self, value: ChannelLayout) {
|
||||
pub fn set_channel_layout(&mut self, value: ChannelLayoutMask) {
|
||||
let _ = option::Settable::set(self, "channel_layouts", &value.bits());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user