FFmpeg
Data Structures | Macros | Functions | Variables
af_asetnsamples.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"

Go to the source code of this file.

Data Structures

struct  ASNSContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (asetnsamples)
 
static int activate (AVFilterContext *ctx)
 

Variables

static const AVOption asetnsamples_options []
 
const AVFilter ff_af_asetnsamples
 

Detailed Description

Filter that changes number of samples on single output operation

Definition in file af_asetnsamples.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 39 of file af_asetnsamples.c.

◆ FLAGS

Definition at line 40 of file af_asetnsamples.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( asetnsamples  )

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 52 of file af_asetnsamples.c.

Variable Documentation

◆ asetnsamples_options

const AVOption asetnsamples_options[]
static
Initial value:
= {
{ "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 },
{ "n", "set the number of per-frame output samples", OFFSET(nb_out_samples), AV_OPT_TYPE_INT, {.i64=1024}, 1, INT_MAX, FLAGS },
{ "pad", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ "p", "pad last frame with zeros", OFFSET(pad), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ NULL }
}

Definition at line 42 of file af_asetnsamples.c.

◆ ff_af_asetnsamples

const AVFilter ff_af_asetnsamples
Initial value:
= {
.name = "asetnsamples",
.description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."),
.priv_size = sizeof(ASNSContext),
.priv_class = &asetnsamples_class,
.activate = activate,
.process_command = ff_filter_process_command,
}

Definition at line 105 of file af_asetnsamples.c.

FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
activate
static int activate(AVFilterContext *ctx)
Definition: af_asetnsamples.c:52
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
FLAGS
#define FLAGS
Definition: af_asetnsamples.c:40
NULL
#define NULL
Definition: coverity.c:32
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:34
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
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:900
ASNSContext
Definition: af_asetnsamples.c:33
OFFSET
#define OFFSET(x)
Definition: af_asetnsamples.c:39
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190