mirror of
https://github.com/encounter/rust-ffmpeg.git
synced 2026-07-10 21:18:39 -07:00
util/channel_layout: add default constructor
This commit is contained in:
@@ -68,4 +68,10 @@ impl ChannelLayout {
|
||||
av_get_channel_layout_nb_channels(self.bits())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn default(number: i32) -> ChannelLayout {
|
||||
unsafe {
|
||||
ChannelLayout::from_bits_truncate(av_get_default_channel_layout(number) as c_ulonglong)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user