mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
softare/resampling: add extension helpers for frame::Audio
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
use util::format;
|
||||
use ::{decoder, Error, ChannelLayout};
|
||||
use ::{decoder, Error, ChannelLayout, frame};
|
||||
use super::Context;
|
||||
|
||||
impl frame::Audio {
|
||||
pub fn resampler(&self, format: format::Sample, channel_layout: ChannelLayout, rate: u32) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.channel_layout(), self.rate(),
|
||||
format, channel_layout, rate)
|
||||
}
|
||||
}
|
||||
|
||||
impl decoder::Audio {
|
||||
pub fn resampler(&self, format: format::Sample, channel_layout: ChannelLayout, rate: u32) -> Result<Context, Error> {
|
||||
Context::get(self.format(), self.channel_layout(), self.rate(),
|
||||
|
||||
Reference in New Issue
Block a user