30 #define BUFFER_ALIGN 0
51 int pool_channels = 0;
52 int pool_nb_samples = 0;
57 &pool_channels, &pool_nb_samples,
58 &pool_format, &pool_align) < 0) {
62 if (pool_channels != channels || pool_nb_samples < nb_samples ||
FFFramePool * ff_frame_pool_audio_init(AVBufferRef *(*alloc)(int size), int channels, int nb_samples, enum AVSampleFormat format, int align)
Allocate and initialize an audio frame pool.
This structure describes decoded (raw) audio or video data.
AVFrame * ff_frame_pool_get(FFFramePool *pool)
Allocate a new AVFrame, reussing old buffers from the pool when available.
Main libavfilter public API header.
AVFilterPad * dstpad
input pad on the dest filter
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
void ff_frame_pool_uninit(FFFramePool **pool)
Deallocate the frame pool.
int ff_frame_pool_get_audio_config(FFFramePool *pool, int *channels, int *nb_samples, enum AVSampleFormat *format, int *align)
Get the audio frame pool configuration.
A link between two filters.
int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Fill an audio buffer with silence.
int sample_rate
samples per second
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
simple assert() macros that are a bit more flexible than ISO C assert().
uint64_t channel_layout
Channel layout of the audio data.
audio channel layout utility functions
AVFrame * ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
int format
agreed upon media format
AVFrame *(* get_audio_buffer)(AVFilterLink *link, int nb_samples)
Callback function to get an audio buffer.
AVSampleFormat
Audio sample formats.
AVBufferRef * av_buffer_allocz(int size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
int sample_rate
Sample rate of the audio data.
AVFilterLink ** outputs
array of pointers to output links
void * frame_pool
A pointer to a FFFramePool struct.
common internal and external API header
AVFrame * ff_default_get_audio_buffer(AVFilterLink *link, int nb_samples)
default handler for get_audio_buffer() for audio inputs
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
int channels
Number of channels.
AVFilterContext * dst
dest filter
uint8_t ** extended_data
pointers to the data planes/channels.
int nb_samples
number of audio samples (per channel) described by this frame