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__) 
   66     if (intb.
num == 1 && intb.
den == inrate) {
 
  112                                           "altering the data."),
 
  115     .
inputs        = asetrate_inputs,
 
  117     .priv_class    = &asetrate_class,
 
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
static av_cold int config_props(AVFilterLink *outlink)
This structure describes decoded (raw) audio or video data. 
static const AVFilterPad asetrate_inputs[]
#define AV_LOG_WARNING
Something somehow does not look correct. 
Main libavfilter public API header. 
static const AVOption asetrate_options[]
const char * name
Pad name. 
AVFilterLink ** inputs
array of pointers to input links 
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter. 
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user). 
static double av_q2d(AVRational a)
Convert rational to double. 
A filter pad used for either input or output. 
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 
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
static const int sample_rates[]
static const AVFilterPad asetrate_outputs[]
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 
static av_cold int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
static const AVFilterPad inputs[]
AVFilterFormats * in_samplerates
Lists of channel layouts and sample rates used for automatic negotiation. 
AVFILTER_DEFINE_CLASS(asetrate)
Describe the class of an AVClass context structure. 
int sample_rate
Sample rate of the audio data. 
rational number numerator/denominator 
const char * name
Filter name. 
AVFilterLink ** outputs
array of pointers to output links 
AVFilterContext * dst
dest filter 
#define OPT_INT(name, field, def, min, max, descr,...)