56 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
72 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
89 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
241 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
259 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
278 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
296 uint64_t srcChannelsLayout,
int srcRate,
SampleFormat srcFormat,
301 uint64_t m_dstChannelsLayout;
304 uint64_t m_srcChannelsLayout;
308 int m_streamIndex = -1;
312 int64_t m_filterSize;
Error codes, error categories and the OptionalErrorCode convention.
Common helpers: comparisons, value lookup, non-copyable base, string utilities.
uint64_t dstChannelLayout() const
Channel layout the resampler produces.
bool isValid() const
Whether the resampler is initialised.
AudioResampler(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat, uint64_t srcChannelsLayout, int srcRate, SampleFormat srcFormat, Dictionary &&options, OptionalErrorCode ec=throws())
Create and initialise a resampler with options, moving the dictionary.
int64_t delay() const
Samples still buffered inside the resampler.
static bool validate(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat)
Whether the output parameters are usable before the input is known.
AudioResampler()
Create an uninitialised resampler.
bool init(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat, uint64_t srcChannelsLayout, int srcRate, SampleFormat srcFormat, Dictionary &options, OptionalErrorCode ec=throws())
Initialise the resampler with options.
SampleFormat srcSampleFormat() const
Sample format the resampler expects.
AudioResampler(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat, uint64_t srcChannelsLayout, int srcRate, SampleFormat srcFormat, OptionalErrorCode ec=throws())
Create and initialise a resampler.
AudioSamples pop(size_t samplesCount, OptionalErrorCode ec=throws())
Pop frame from the rescaler context.
AudioResampler & operator=(AudioResampler &&rhs)
Move assignment.
bool init(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat, uint64_t srcChannelsLayout, int srcRate, SampleFormat srcFormat, OptionalErrorCode ec=throws())
Initialise the resampler.
AudioResampler(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat, uint64_t srcChannelsLayout, int srcRate, SampleFormat srcFormat, Dictionary &options, OptionalErrorCode ec=throws())
Create and initialise a resampler with options.
int srcSampleRate() const
Sample rate the resampler expects.
uint64_t srcChannelLayout() const
Channel layout the resampler expects.
int dstSampleRate() const
Sample rate the resampler produces.
bool init(uint64_t dstChannelsLayout, int dstRate, SampleFormat dstFormat, uint64_t srcChannelsLayout, int srcRate, SampleFormat srcFormat, Dictionary &&options, OptionalErrorCode ec=throws())
Initialise the resampler with options, moving the dictionary.
void swap(AudioResampler &other)
Exchange the state of two resamplers.
int dstChannels() const
Number of channels the resampler produces.
AudioResampler(AudioResampler &&other)
Move a resampler.
int srcChannels() const
Number of channels the resampler expects.
void push(const AudioSamples &src, OptionalErrorCode ec=throws())
Push frame to the rescaler context.
bool pop(AudioSamples &dst, bool getall, OptionalErrorCode ec=throws())
Pop frame from the rescaler context.
SampleFormat dstSampleFormat() const
Sample format the resampler produces.
One buffer of decoded audio samples.
Definition frame.h:892
Implements interface to access to the AVDictionary entity.
Definition dictionary.h:38
Carries the caller's choice between exceptions and error codes.
Definition averror.h:96
The Timestamp class represents timestamp value and it timebase.
Definition timestamp.h:25
AVDictionary wrappers: Dictionary and DictionaryArray.
FFmpeg types re-exported for the public API and small value wrappers.
Video frames, audio samples and their common frame interface.
Root namespace of the library.
Definition audioresampler.h:19