FFmpeg
Data Structures | Macros | Functions | Variables
af_channelsplit.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ChannelSplitContext
 

Macros

#define MAX_CH   64
 
#define OFFSET(x)   offsetof(ChannelSplitContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 
#define F   AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (channelsplit)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *outlink, AVFrame *buf)
 
static int activate (AVFilterContext *ctx)
 

Variables

static const AVOption channelsplit_options []
 
const AVFilter ff_af_channelsplit
 

Detailed Description

Channel split filter

Split an audio stream into per-channel streams.

Definition in file af_channelsplit.c.

Macro Definition Documentation

◆ MAX_CH

#define MAX_CH   64

Definition at line 38 of file af_channelsplit.c.

◆ OFFSET

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

Definition at line 49 of file af_channelsplit.c.

◆ A

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 50 of file af_channelsplit.c.

◆ F

Definition at line 51 of file af_channelsplit.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( channelsplit  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 60 of file af_channelsplit.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 117 of file af_channelsplit.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 124 of file af_channelsplit.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink outlink,
AVFrame buf 
)
static

Definition at line 152 of file af_channelsplit.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 177 of file af_channelsplit.c.

Variable Documentation

◆ channelsplit_options

const AVOption channelsplit_options[]
static
Initial value:
= {
{ "channel_layout", "Input channel layout.", OFFSET(channel_layout), AV_OPT_TYPE_CHLAYOUT, { .str = "stereo" }, .flags = A|F },
{ "channels", "Channels to extract.", OFFSET(channels_str), AV_OPT_TYPE_STRING, { .str = "all" }, .flags = A|F },
{ NULL }
}

Definition at line 52 of file af_channelsplit.c.

◆ ff_af_channelsplit

const AVFilter ff_af_channelsplit
Initial value:
= {
.name = "channelsplit",
.description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams."),
.priv_size = sizeof(ChannelSplitContext),
.priv_class = &channelsplit_class,
.init = init,
.outputs = NULL,
}

Definition at line 228 of file af_channelsplit.c.

FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
F
#define F
Definition: af_channelsplit.c:51
A
#define A
Definition: af_channelsplit.c:50
OFFSET
#define OFFSET(x)
Definition: af_channelsplit.c:49
ChannelSplitContext
Definition: af_channelsplit.c:40
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
NULL
#define NULL
Definition: coverity.c:32
activate
static int activate(AVFilterContext *ctx)
Definition: af_channelsplit.c:177
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:33
AV_OPT_TYPE_CHLAYOUT
@ AV_OPT_TYPE_CHLAYOUT
Definition: opt.h:262
AVFILTER_FLAG_DYNAMIC_OUTPUTS
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:112
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
init
static av_cold int init(AVFilterContext *ctx)
Definition: af_channelsplit.c:60
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_channelsplit.c:117
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:249
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_channelsplit.c:124