Go to the documentation of this file.
46 #define OFFSET(x) offsetof(ChannelSplitContext, x)
47 #define A AV_OPT_FLAG_AUDIO_PARAM
48 #define F AV_OPT_FLAG_FILTERING_PARAM
61 int all = 0,
ret = 0,
i;
63 if (!strcmp(
s->channels_str,
"all")) {
137 for (
i = 0;
i <
ctx->nb_outputs;
i++) {
143 if (!channel_layout.
u.
map)
200 for (
int i = 0;
i <
ctx->nb_outputs;
i++) {
208 for (
int i = 0;
i <
ctx->nb_outputs;
i++) {
223 for (
int i = 0;
i <
ctx->nb_outputs;
i++) {
231 for (
int i = 0;
i <
ctx->nb_outputs;
i++) {
245 .
name =
"channelsplit",
248 .priv_class = &channelsplit_class,
union AVChannelLayout::@427 u
Details about which channels are present in this layout.
A list of supported channel layouts.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
#define FF_OUTLINK_IDX(link)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
AVChannelCustom * map
This member must be used when the channel order is AV_CHANNEL_ORDER_CUSTOM.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define FILTER_INPUTS(array)
This structure describes decoded (raw) audio or video data.
enum AVChannel av_channel_layout_channel_from_index(const AVChannelLayout *channel_layout, unsigned int idx)
Get the channel with the given index in a channel layout.
enum AVChannelOrder order
Channel order used in this layout.
const char * name
Filter name.
int nb_channels
Number of channels in this layout.
A link between two filters.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define AVFILTERPAD_FLAG_FREE_NAME
The pad's name is allocated and should be freed generically.
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
Forward the status on an output link to all input links.
AVChannelLayout ch_layout
Channel layout of the audio data.
A filter pad used for either input or output.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_size)
Get a human-readable string describing the channel layout properties.
AVFILTER_DEFINE_CLASS(channelsplit)
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
void ff_inlink_request_frame(AVFilterLink *link)
Mark that a frame is wanted on the link.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
Describe the class of an AVClass context structure.
static int filter_frame(AVFilterLink *outlink, AVFrame *buf)
#define AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL
The specified retype target order is ignored and the simplest possible (canonical) order is used for ...
static int activate(AVFilterContext *ctx)
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
An AVChannelLayout holds information about the channel layout of audio data.
AVFilterContext * src
source filter
int av_channel_layout_retype(AVChannelLayout *channel_layout, enum AVChannelOrder order, int flags)
Change the AVChannelOrder of a channel layout.
static av_cold int init(AVFilterContext *ctx)
int av_channel_layout_from_string(AVChannelLayout *channel_layout, const char *str)
Initialize a channel layout from a given string description.
#define i(width, name, range_min, range_max)
static const AVOption channelsplit_options[]
int av_channel_name(char *buf, size_t buf_size, enum AVChannel channel_id)
Get a human readable string in an abbreviated form describing a given channel.
uint8_t ** extended_data
pointers to the data planes/channels.
#define FILTER_QUERY_FUNC2(func)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
int flags
A combination of AVFILTERPAD_FLAG_* flags.
const char * name
Pad name.
void * av_calloc(size_t nmemb, size_t size)
static av_cold void uninit(AVFilterContext *ctx)
enum AVMediaType type
AVFilterPad type.
@ AV_CHANNEL_ORDER_CUSTOM
The channel order does not correspond to any other predefined order and is stored as an explicit map.
int av_channel_layout_index_from_channel(const AVChannelLayout *channel_layout, enum AVChannel channel)
Get the index of a given channel in a channel layout.
void av_channel_layout_uninit(AVChannelLayout *channel_layout)
Free any allocated data in the channel layout and reset the channel count to 0.
AVChannelLayout channel_layout
int ff_outlink_get_status(AVFilterLink *link)
Get the status on an output link.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
char * av_strdup(const char *s)
Duplicate a string.
AVChannelLayout ch_layout
channel layout of current buffer (see libavutil/channel_layout.h)
int ff_append_outpad(AVFilterContext *f, AVFilterPad *p)
static const uint16_t channel_layouts[7]
the definition of that something depends on the semantic of the filter The callback must examine the status of the filter s links and proceed accordingly The status of output links is stored in the status_in and status_out fields and tested by the ff_outlink_frame_wanted() function. If this function returns true
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
const AVFilter ff_af_channelsplit