61 frame->nb_samples = nb_samples;
91 if (*tail || srate < 1 || (
int)srate != srate || srate > INT_MAX) {
int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx)
Parse a sample rate.
AVFrame * ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
int ff_parse_channel_layout(AVChannelLayout *ret, int *nret, const char *arg, void *log_ctx)
Parse a channel layout or a corresponding integer representation.
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
AVFrame * ff_default_get_audio_buffer(AVFilterLink *link, int nb_samples)
default handler for get_audio_buffer() for audio inputs
simple assert() macros that are a bit more flexible than ISO C assert().
Main libavfilter public API header.
static const uint8_t *BS_FUNC align(BSCTX *bc)
Skip bits to a byte boundary.
static BitStreamFilterLinkInternal * ff_link_internal(AVBitStreamFilterLink *link)
Public libavutil channel layout APIs header.
common internal and external API header
double av_strtod(const char *numstr, char **tail)
Parse the string in numstr and return its value as a double.
simple arithmetic expression evaluator
int av_channel_layout_from_string(AVChannelLayout *channel_layout, const char *str)
Initialize a channel layout from a given string description.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_samples_set_silence(uint8_t *const *audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Fill an audio buffer with silence.
AVFrame * ff_frame_pool_get(FFFramePool *pool)
Allocate a new AVFrame, reusing old buffers from the pool when available.
int ff_frame_pool_audio_reinit(FFFramePool *pool, int channels, int nb_samples, enum AVSampleFormat format, int align)
Recreate the audio frame pool if its current configuration differs from the provided configuration.
size_t av_cpu_max_align(void)
Get the maximum data alignment that may be required by FFmpeg.
An AVChannelLayout holds information about the channel layout of audio data.
enum AVChannelOrder order
Channel order used in this layout.
int nb_channels
Number of channels in this layout.
AVFilterLink ** outputs
array of pointers to output links
A link between two filters.
int sample_rate
samples per second
AVChannelLayout ch_layout
channel layout of current buffer (see libavutil/channel_layout.h)
AVFilterPad * dstpad
input pad on the dest filter
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
AVFrame *(* audio)(AVFilterLink *link, int nb_samples)
union AVFilterPad::@363170257351226013155122005037023043242205350137 get_buffer
Callback functions to get a video/audio buffers.
This structure describes decoded (raw) audio or video data.
FFFramePool frame_pool
Pool of frames used for allocations.