FFmpeg
|
af_join.c File Reference
Audio join filter. More...
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
Include dependency graph for af_join.c:
Go to the source code of this file.
Data Structures | |
struct | ChannelMap |
struct | JoinContext |
Macros | |
#define | OFFSET(x) offsetof(JoinContext, x) |
#define | A AV_OPT_FLAG_AUDIO_PARAM |
#define | F AV_OPT_FLAG_FILTERING_PARAM |
#define | PARSE_CHANNEL(str, var, inout) |
Typedefs | |
typedef struct ChannelMap | ChannelMap |
typedef struct JoinContext | JoinContext |
Functions | |
static int | filter_frame (AVFilterLink *link, AVFrame *frame) |
static int | parse_maps (AVFilterContext *ctx) |
static int | join_init (AVFilterContext *ctx) |
static void | join_uninit (AVFilterContext *ctx) |
static int | join_query_formats (AVFilterContext *ctx) |
static void | guess_map_matching (AVFilterContext *ctx, ChannelMap *ch, uint64_t *inputs) |
static void | guess_map_any (AVFilterContext *ctx, ChannelMap *ch, uint64_t *inputs) |
static int | join_config_output (AVFilterLink *outlink) |
static int | join_request_frame (AVFilterLink *outlink) |
Variables | |
static const AVOption | join_options [] |
static const AVClass | join_class |
static const AVFilterPad | avfilter_af_join_outputs [] |
AVFilter | avfilter_af_join |
Detailed Description
Audio join filter.
Join multiple audio inputs as different channels in a single output
Definition in file af_join.c.
Macro Definition Documentation
#define A AV_OPT_FLAG_AUDIO_PARAM |
#define F AV_OPT_FLAG_FILTERING_PARAM |
#define OFFSET | ( | x | ) | offsetof(JoinContext, x) |
#define PARSE_CHANNEL | ( | str, | |
var, | |||
inout | |||
) |
Value:
} \
inout " channel.\n"); \
}
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
Definition: channel_layout.c:191
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFilterBuffer 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.Buffer references ownership and permissions
uint64_t av_get_channel_layout(const char *name)
Return a channel layout id that matches name, or 0 if no match is found.
Definition: channel_layout.c:132
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return
Definition: filter_design.txt:216
Referenced by parse_maps().
Typedef Documentation
typedef struct ChannelMap ChannelMap |
typedef struct JoinContext JoinContext |
Function Documentation
|
static |
Definition at line 87 of file af_join.c.
Referenced by join_init().
|
static |
Definition at line 290 of file af_join.c.
Referenced by join_config_output().
|
static |
Definition at line 272 of file af_join.c.
Referenced by join_config_output().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 103 of file af_join.c.
Referenced by join_init().
Variable Documentation
AVFilter avfilter_af_join |
Initial value:
= {
.name = "join",
.description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into "
"multi-channel output."),
.priv_size = sizeof(JoinContext),
.priv_class = &join_class,
.uninit = join_uninit,
}
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:424
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
struct JoinContext JoinContext
static const AVFilterPad avfilter_af_join_outputs[]
Definition: af_join.c:505
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:216
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.config_props = join_config_output,
.request_frame = join_request_frame,
},
{ NULL }
}
Definition: avutil.h:144
|
static |
Initial value:
= {
.class_name = "join filter",
.item_name = av_default_item_name,
.option = join_options,
.version = LIBAVUTIL_VERSION_INT,
}
|
static |
Initial value:
= {
{ "inputs", "Number of input streams.", OFFSET(inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 1, INT_MAX, A|F },
{ "channel_layout", "Channel layout of the "
{ "map", "A comma-separated list of channels maps in the format "
"'input_stream.input_channel-output_channel.",
{ NULL },
}
Definition: opt.h:222
Definition: opt.h:226
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:216
Generated on Mon Nov 18 2024 06:52:04 for FFmpeg by 1.8.11