46 #define OFFSET(x) offsetof(ChannelSplitContext, x)
47 #define A AV_OPT_FLAG_AUDIO_PARAM
48 #define F AV_OPT_FLAG_FILTERING_PARAM
50 {
"channel_layout",
"Input channel layout.",
OFFSET(channel_layout_str),
AV_OPT_TYPE_STRING, { .str =
"stereo" }, .flags =
A|
F },
60 uint64_t channel_layout;
62 int all = 0, ret = 0,
i;
66 s->channel_layout_str);
72 if (!strcmp(
s->channels_str,
"all")) {
74 channel_layout =
s->channel_layout;
123 for (
i = 0;
i <
ctx->nb_outputs;
i++) {
141 for (
i = 0;
i <
ctx->nb_outputs;
i++) {
172 .
name =
"channelsplit",
175 .priv_class = &channelsplit_class,
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
AVFILTER_DEFINE_CLASS(channelsplit)
static int query_formats(AVFilterContext *ctx)
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
static const AVOption channelsplit_options[]
static const AVFilterPad avfilter_af_channelsplit_inputs[]
static av_cold int init(AVFilterContext *ctx)
AVFilter ff_af_channelsplit
Macro definitions for various function/variable attributes.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
#define flags(name, subs,...)
audio channel layout utility functions
channel
Use these values when setting the channel map with ebur128_set_channel().
int av_get_channel_layout_channel_index(uint64_t channel_layout, uint64_t channel)
Get the index of a channel in channel_layout.
uint64_t av_get_channel_layout(const char *name)
Return a channel layout id that matches name, or 0 if no match is found.
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
int av_get_extended_channel_layout(const char *name, uint64_t *channel_layout, int *nb_channels)
Return a channel layout and the number of channels based on the specified name.
uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
Get the channel with the given index in channel_layout.
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int ff_insert_outpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new output pad for the filter.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Describe the class of an AVClass context structure.
A list of supported channel layouts.
A link between two filters.
AVFilterContext * dst
dest filter
A filter pad used for either input or output.
enum AVMediaType type
AVFilterPad type.
const char * name
Pad name.
const char * name
Filter name.
This structure describes decoded (raw) audio or video data.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int channels
number of audio channels, only used for audio.
uint64_t channel_layout
Channel layout of the audio data.
uint8_t ** extended_data
pointers to the data planes/channels.
char * channel_layout_str