FFmpeg
Data Structures | Macros | Functions | Variables
asrc_anullsrc.c File Reference
#include <inttypes.h>
#include <stdio.h>
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"

Go to the source code of this file.

Data Structures

struct  ANullContext
 

Macros

#define OFFSET(x)   offsetof(ANullContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (anullsrc)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static av_cold int config_props (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 

Variables

static const AVOption anullsrc_options []
 
static const AVFilterPad avfilter_asrc_anullsrc_outputs []
 
const AVFilter ff_asrc_anullsrc
 

Detailed Description

null audio source

Definition in file asrc_anullsrc.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(ANullContext, x)

Definition at line 47 of file asrc_anullsrc.c.

◆ FLAGS

Definition at line 48 of file asrc_anullsrc.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( anullsrc  )

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 64 of file asrc_anullsrc.c.

◆ config_props()

static av_cold int config_props ( AVFilterLink outlink)
static

Definition at line 80 of file asrc_anullsrc.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 90 of file asrc_anullsrc.c.

Variable Documentation

◆ anullsrc_options

const AVOption anullsrc_options[]
static
Initial value:
= {
{ "channel_layout", "set channel_layout", OFFSET(ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = "stereo"}, 0, 0, FLAGS },
{ "cl", "set channel_layout", OFFSET(ch_layout), AV_OPT_TYPE_CHLAYOUT, {.str = "stereo"}, 0, 0, FLAGS },
{ "sample_rate", "set sample rate", OFFSET(sample_rate) , AV_OPT_TYPE_INT, {.i64 = 44100}, 1, INT_MAX, FLAGS },
{ "r", "set sample rate", OFFSET(sample_rate) , AV_OPT_TYPE_INT, {.i64 = 44100}, 1, INT_MAX, FLAGS },
{ "nb_samples", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, UINT16_MAX, FLAGS },
{ "n", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, UINT16_MAX, FLAGS },
{ "duration", "set the audio duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = -1}, -1, INT64_MAX, FLAGS },
{ "d", "set the audio duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = -1}, -1, INT64_MAX, FLAGS },
{ NULL }
}

Definition at line 50 of file asrc_anullsrc.c.

◆ avfilter_asrc_anullsrc_outputs

const AVFilterPad avfilter_asrc_anullsrc_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
},
}

Definition at line 115 of file asrc_anullsrc.c.

◆ ff_asrc_anullsrc

const AVFilter ff_asrc_anullsrc
Initial value:
= {
.name = "anullsrc",
.description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."),
.priv_size = sizeof(ANullContext),
.activate = activate,
.priv_class = &anullsrc_class,
}

Definition at line 123 of file asrc_anullsrc.c.

activate
static int activate(AVFilterContext *ctx)
Definition: asrc_anullsrc.c:90
AV_OPT_TYPE_DURATION
@ AV_OPT_TYPE_DURATION
Underlying C type is int64_t.
Definition: opt.h:319
avfilter_asrc_anullsrc_outputs
static const AVFilterPad avfilter_asrc_anullsrc_outputs[]
Definition: asrc_anullsrc.c:115
duration
int64_t duration
Definition: movenc.c:65
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: asrc_anullsrc.c:64
NULL
#define NULL
Definition: coverity.c:32
inputs
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 inputs
Definition: filter_design.txt:243
AV_OPT_TYPE_CHLAYOUT
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
Definition: opt.h:331
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
ANullContext
Definition: asrc_anullsrc.c:38
OFFSET
#define OFFSET(x)
Definition: asrc_anullsrc.c:47
FLAGS
#define FLAGS
Definition: asrc_anullsrc.c:48
config_props
static av_cold int config_props(AVFilterLink *outlink)
Definition: asrc_anullsrc.c:80