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:
@ -91,7 +91,7 @@ fn transcoder<P: AsRef<Path>>(
|
||||
let channel_layout = codec
|
||||
.channel_layouts()
|
||||
.map(|cls| cls.best(decoder.channel_layout().channels()))
|
||||
.unwrap_or(ffmpeg::channel_layout::ChannelLayout::STEREO);
|
||||
.unwrap_or(ffmpeg::channel_layout::ChannelLayoutMask::STEREO);
|
||||
|
||||
if global {
|
||||
encoder.set_flags(ffmpeg::codec::flag::Flags::GLOBAL_HEADER);
|
||||
|
Reference in New Issue
Block a user