86 char buf1[64], buf2[64];
120 -1, inlink ->channel_layout);
124 "fmt:%s srate:%d cl:%s -> fmt:%s srate:%d cl:%s\n",
270 .
inputs = avfilter_af_resample_inputs,
271 .
outputs = avfilter_af_resample_outputs,
uint8_t ** extended_data
pointers to the data planes/channels.
AVAudioResampleContext * avr
AVFilterBufferRef * ff_get_audio_buffer(AVFilterLink *link, int perms, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
static const AVFilterPad avfilter_af_resample_outputs[]
int nb_samples
number of audio samples
struct ResampleContext ResampleContext
AVFilterBufferRefAudioProps * audio
audio buffer specific properties
int linesize[8]
number of bytes per line
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding rnd)
Rescale a 64-bit integer with specified rounding.
static const AVFilterPad outputs[]
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
struct AVFilterChannelLayouts * in_channel_layouts
void avresample_free(AVAudioResampleContext **avr)
Free AVAudioResampleContext and associated AVOption values.
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
AVFilter avfilter_af_resample
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
#define av_assert0(cond)
assert() equivalent, that is always enabled.
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt)
Get the planar alternative form of the given sample format.
static av_cold void uninit(AVFilterContext *ctx)
void avresample_close(AVAudioResampleContext *avr)
Close AVAudioResampleContext.
int64_t pts
presentation timestamp.
static int config_output(AVFilterLink *outlink)
A filter pad used for either input or output.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
A link between two filters.
int sample_rate
samples per second
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags)
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
simple assert() macros that are a bit more flexible than ISO C assert().
struct AVFilterChannelLayouts * out_channel_layouts
void av_log(void *avcl, int level, const char *fmt,...)
AVFilterFormats * in_formats
Lists of formats supported by the input and output filters respectively.
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
struct AVRational AVRational
rational number numerator/denominator
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
AVFilterContext * src
source filter
AVFilterFormats * out_samplerates
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
int format
agreed upon media format
int avresample_get_delay(AVAudioResampleContext *avr)
Return the number of samples currently in the resampling delay buffer.
A reference to an AVFilterBuffer.
int avresample_available(AVAudioResampleContext *avr)
Return the number of available samples in the output FIFO.
AVFilterFormats * in_samplerates
Lists of channel layouts and sample rates used for automatic negotiation.
static const AVFilterPad inputs[]
int avresample_convert(AVAudioResampleContext *avr, uint8_t **output, int out_plane_size, int out_samples, uint8_t **input, int in_plane_size, int in_samples)
Convert input samples and write them to the output FIFO.
const char * name
filter name
AVFilterLink ** outputs
array of pointers to output links
static int request_frame(AVFilterLink *outlink)
AVAudioResampleContext * avresample_alloc_context(void)
Allocate AVAudioResampleContext and set options.
static int query_formats(AVFilterContext *ctx)
common internal and external API header
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
static const AVFilterPad avfilter_af_resample_inputs[]
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
int avresample_open(AVAudioResampleContext *avr)
Initialize AVAudioResampleContext.
AVFilterFormats * out_formats
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout)
Return a description of a channel layout.