26 #include "libavutil/attributes.h"
27 #include "libavutil/channel_layout.h"
29 #include "libavutil/opt.h"
43 #define OFFSET(x) offsetof(ChannelSplitContext, x)
44 #define A AV_OPT_FLAG_AUDIO_PARAM
45 #define F AV_OPT_FLAG_FILTERING_PARAM
47 {
"channel_layout",
"Input channel layout.",
OFFSET(channel_layout_str),
AV_OPT_TYPE_STRING, { .str =
"stereo" }, .flags =
A|
F },
140 .
name =
"channelsplit",
143 .priv_class = &channelsplit_class,
146 .
inputs = avfilter_af_channelsplit_inputs,
AVFilter avfilter_af_channelsplit
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
void * priv
private data for use by the filter
static const AVFilterPad outputs[]
uint8_t ** extended_data
pointers to the data planes/channels.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
enum AVMediaType type
AVFilterPad type.
void av_frame_set_channels(AVFrame *frame, int val)
const char * name
Pad name.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
struct AVFilterChannelLayouts * in_channel_layouts
uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
Get the channel with the given index in channel_layout.
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
A filter pad used for either input or output.
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned nb_outputs
number of output pads
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
static const AVFilterPad avfilter_af_channelsplit_inputs[]
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
uint64_t channel_layout
Channel layout of the audio data.
common internal API header
A list of supported channel layouts.
Main libavfilter public API header.
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
AVFilterLink ** outputs
array of pointers to output links
char * channel_layout_str
static const AVOption channelsplit_options[]
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
AVFilterLink ** inputs
array of pointers to input links
static av_cold int init(AVFilterContext *ctx)
AVFilterContext * dst
dest filter
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
AVFrame * av_frame_clone(AVFrame *src)
Create a new frame that references the same data as src.
static int query_formats(AVFilterContext *ctx)
#define AVFILTER_DEFINE_CLASS(fname)
uint64_t av_get_channel_layout(const char *name)
Return a channel layout id that matches name, or 0 if no match is found.
struct AVFilterChannelLayouts * out_channel_layouts
static int ff_insert_outpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new output pad for the filter.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.