49 #define OFFSET(x) offsetof(ANullContext, x)
50 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
57 {
"nb_samples",
"set the number of samples per requested frame",
OFFSET(nb_samples),
AV_OPT_TYPE_INT, {.i64 = 1024}, 1, UINT16_MAX,
FLAGS },
58 {
"n",
"set the number of samples per requested frame",
OFFSET(nb_samples),
AV_OPT_TYPE_INT, {.i64 = 1024}, 1, UINT16_MAX,
FLAGS },
72 null->sample_rate_str,
ctx)) < 0)
76 null->channel_layout_str,
ctx)) < 0)
85 int64_t chlayouts[] = {
null->channel_layout, -1 };
100 if (null->duration >= 0)
111 if (null->duration >= 0 && null->pts >= null->duration) {
122 samplesref->
pts =
null->pts;
149 .priv_class = &anullsrc_class,
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
static const AVOption anullsrc_options[]
static int query_formats(AVFilterContext *ctx)
AVFilter ff_asrc_anullsrc
AVFILTER_DEFINE_CLASS(anullsrc)
static int activate(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx)
static const AVFilterPad avfilter_asrc_anullsrc_outputs[]
static av_cold int config_props(AVFilterLink *outlink)
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
audio channel layout utility functions
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
#define FFERROR_NOT_READY
Filters implementation helper functions.
static int ff_outlink_frame_wanted(AVFilterLink *link)
Test if a frame is wanted on an output link.
#define AVERROR_EOF
End of file.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
#define AV_TIME_BASE
Internal time base represented as integer.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int nb_samples
number of samples per requested frame
char * channel_layout_str
Describe the class of an AVClass context structure.
void * priv
private data for use by the filter
A link between two filters.
AVFilterContext * src
source filter
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples (per channel) described by this frame
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).