FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
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"

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)
 

Functions

 AVFILTER_DEFINE_CLASS (join)
 
static int try_push_frame (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *link, AVFrame *frame)
 
static int parse_maps (AVFilterContext *ctx)
 
static av_cold int join_init (AVFilterContext *ctx)
 
static av_cold 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 AVFilterPad avfilter_af_join_outputs []
 
AVFilter ff_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 OFFSET (   x)    offsetof(JoinContext, x)

Definition at line 66 of file af_join.c.

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 67 of file af_join.c.

Definition at line 68 of file af_join.c.

#define PARSE_CHANNEL (   str,
  var,
  inout 
)
Value:
if (!(var = av_get_channel_layout(str))) { \
av_log(ctx, AV_LOG_ERROR, "Invalid " inout " channel: %s.\n", str);\
return AVERROR(EINVAL); \
} \
av_log(ctx, AV_LOG_ERROR, "Channel map describes more than one " \
inout " channel.\n"); \
return AVERROR(EINVAL); \
}
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the 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.
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define AVERROR(e)
Definition: error.h:43
return
AVFormatContext * ctx
Definition: movenc.c:48
if(ret< 0)
Definition: vf_mcdeint.c:282

Referenced by parse_maps().

Function Documentation

AVFILTER_DEFINE_CLASS ( join  )
static int try_push_frame ( AVFilterContext ctx)
static

Definition at line 413 of file af_join.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink link,
AVFrame frame 
)
static

Definition at line 83 of file af_join.c.

Referenced by join_init().

static int parse_maps ( AVFilterContext ctx)
static

Definition at line 109 of file af_join.c.

Referenced by join_init().

static av_cold int join_init ( AVFilterContext ctx)
static

Definition at line 196 of file af_join.c.

static av_cold void join_uninit ( AVFilterContext ctx)
static

Definition at line 241 of file af_join.c.

static int join_query_formats ( AVFilterContext ctx)
static

Definition at line 256 of file af_join.c.

static void guess_map_matching ( AVFilterContext ctx,
ChannelMap ch,
uint64_t *  inputs 
)
static

Definition at line 279 of file af_join.c.

Referenced by join_config_output().

static void guess_map_any ( AVFilterContext ctx,
ChannelMap ch,
uint64_t *  inputs 
)
static

Definition at line 297 of file af_join.c.

Referenced by join_config_output().

static int join_config_output ( AVFilterLink outlink)
static

Definition at line 316 of file af_join.c.

static int join_request_frame ( AVFilterLink outlink)
static

Definition at line 398 of file af_join.c.

Variable Documentation

const AVOption join_options[]
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 "
"output stream.", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0, A|F },
{ "map", "A comma-separated list of channels maps in the format "
"'input_stream.input_channel-output_channel.",
OFFSET(map), AV_OPT_TYPE_STRING, .flags = A|F },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define A
Definition: af_join.c:67
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
const VDPAUPixFmtMap * map
#define F
Definition: af_join.c:68
#define OFFSET(x)
Definition: af_join.c:66

Definition at line 69 of file af_join.c.

const AVFilterPad avfilter_af_join_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = join_config_output,
.request_frame = join_request_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int join_request_frame(AVFilterLink *outlink)
Definition: af_join.c:398
static int join_config_output(AVFilterLink *outlink)
Definition: af_join.c:316

Definition at line 516 of file af_join.c.

AVFilter ff_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,
}
#define NULL
Definition: coverity.c:32
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:105
static av_cold void join_uninit(AVFilterContext *ctx)
Definition: af_join.c:241
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:287
static av_cold int join_init(AVFilterContext *ctx)
Definition: af_join.c:196
static int flags
Definition: log.c:57
static int join_query_formats(AVFilterContext *ctx)
Definition: af_join.c:256
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad avfilter_af_join_outputs[]
Definition: af_join.c:516
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static int query_formats(AVFilterContext *ctx)
Definition: aeval.c:244

Definition at line 526 of file af_join.c.