42 #define OFFSET(x) offsetof(ChannelSplitContext, x)
43 #define A AV_OPT_FLAG_AUDIO_PARAM
45 {
"channel_layout",
"Input channel layout.",
OFFSET(channel_layout_str),
AV_OPT_TYPE_STRING, { .str =
"stereo" }, .flags =
A },
149 .
name =
"channelsplit",
156 .
inputs = avfilter_af_channelsplit_inputs,
uint8_t ** extended_data
pointers to the data planes/channels.
static int init(AVFilterContext *ctx, const char *arg)
AVFilter avfilter_af_channelsplit
AVFilterBufferRefAudioProps * audio
audio buffer specific properties
static const AVFilterPad outputs[]
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
int av_set_options_string(void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep)
Parse the key/value pairs list in opts.
enum AVMediaType type
AVFilterPad type.
struct AVFilterChannelLayouts * in_channel_layouts
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
const char * name
Pad name.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
AVFilterLink ** inputs
array of pointers to input links
uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index)
Get the channel with the given index in channel_layout.
static const AVClass channelsplit_class
A filter pad used for either input or output.
A link between two filters.
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. ...
void * priv
private data for use by the filter
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[]
struct AVFilterChannelLayouts * out_channel_layouts
void av_log(void *avcl, int level, const char *fmt,...)
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
AVFilterBufferRef * avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
Add a new reference to a buffer.
common internal API header
audio channel layout utility functions
static void ff_insert_outpad(AVFilterContext *f, unsigned index, AVFilterPad *p)
Insert a new output pad for the filter.
static const AVOption options[]
struct ChannelSplitContext ChannelSplitContext
A reference to an AVFilterBuffer.
char * channel_layout_str
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
filter name
uint64_t channel_layout
channel layout of audio buffer
AVFilterLink ** outputs
array of pointers to output links
void av_opt_free(void *obj)
Free all string and binary options in obj.
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
static int query_formats(AVFilterContext *ctx)
uint8_t * data[8]
picture/audio data for each plane
uint64_t av_get_channel_layout(const char *name)
Return a channel layout id that matches name, or 0 if no match is found.