Go to the documentation of this file.
31 #define CONTEXT ASetRateContext
32 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
34 #define OPT_GENERIC(name, field, def, min, max, descr, type, deffield, ...) \
35 { name, descr, offsetof(CONTEXT, field), AV_OPT_TYPE_ ## type, \
36 { .deffield = def }, min, max, FLAGS, __VA_ARGS__ }
38 #define OPT_INT(name, field, def, min, max, descr, ...) \
39 OPT_GENERIC(name, field, def, min, max, descr, INT, i64, __VA_ARGS__)
55 &
ctx->outputs[0]->incfg.samplerates);
64 int inrate =
inlink->sample_rate;
66 if (intb.
num == 1 && intb.
den == inrate) {
110 "altering the data."),
115 .priv_class = &asetrate_class,
#define AV_LOG_WARNING
Something somehow does not look correct.
static const AVOption asetrate_options[]
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static av_cold int config_props(AVFilterLink *outlink)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
This structure describes decoded (raw) audio or video data.
static const AVFilterPad asetrate_outputs[]
#define FILTER_QUERY_FUNC(func)
const char * name
Filter name.
A link between two filters.
static av_cold int query_formats(AVFilterContext *ctx)
A filter pad used for either input or output.
AVFILTER_DEFINE_CLASS(asetrate)
static const AVFilterPad asetrate_inputs[]
static double av_q2d(AVRational a)
Convert an AVRational to a double.
#define FILTER_INPUTS(array)
Describe the class of an AVClass context structure.
const AVFilter ff_af_asetrate
Rational number (pair of numerator and denominator).
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
AVFilterContext * src
source filter
int sample_rate
samples per second
const char * name
Pad name.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
#define FILTER_OUTPUTS(array)
#define OPT_INT(name, field, def, min, max, descr,...)