42 #define OFFSET(x) offsetof(ASNSContext, x)
43 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
46 {
"nb_out_samples",
"set the number of per-frame output samples",
OFFSET(nb_out_samples),
AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX,
FLAGS },
47 {
"n",
"set the number of per-frame output samples",
OFFSET(nb_out_samples),
AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX,
FLAGS },
111 .
name =
"asetnsamples",
114 .priv_class = &asetnsamples_class,
115 .
inputs = asetnsamples_inputs,
116 .
outputs = asetnsamples_outputs,
This structure describes decoded (raw) audio or video data.
static const AVOption asetnsamples_options[]
AVFilter ff_af_asetnsamples
Main libavfilter public API header.
#define FFERROR_NOT_READY
Filters implementation helper functions.
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.
static const AVFilterPad asetnsamples_outputs[]
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
Forward the status on an output link to an input link.
static const AVFilterPad asetnsamples_inputs[]
A filter pad used for either input or output.
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.
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#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
simple assert() macros that are a bit more flexible than ISO C assert().
static int activate(AVFilterContext *ctx)
#define FF_FILTER_FORWARD_WANTED(outlink, inlink)
Forward the frame_wanted_out flag from an output link to an input link.
int channels
number of audio channels, only used for audio.
audio channel layout utility functions
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
Take samples from the link's FIFO and update the link's stats.
int av_samples_copy(uint8_t **dst, uint8_t *const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Copy samples from src to dst.
Describe the class of an AVClass context structure.
int nb_out_samples
how many samples to output
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
#define FF_FILTER_FORWARD_STATUS(inlink, outlink)
Acknowledge the status on an input link and forward it to an output link.
AVFILTER_DEFINE_CLASS(asetnsamples)
uint8_t ** extended_data
pointers to the data planes/channels.
int nb_samples
number of audio samples (per channel) described by this frame