libavfilter/af_amerge.c File Reference

Audio merging filter. More...

#include "libavutil/audioconvert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/opt.h"
#include "libswresample/swresample.h"
#include "avfilter.h"
#include "audio.h"
#include "bufferqueue.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AMergeContext
struct  AMergeContext::AMergeContext::amerge_input

Defines

#define OFFSET(x)   offsetof(AMergeContext, x)
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM

Functions

 AVFILTER_DEFINE_CLASS (amerge)
static av_cold void uninit (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static int config_output (AVFilterLink *outlink)
static int request_frame (AVFilterLink *outlink)
static void copy_samples (int nb_inputs, struct amerge_input in[], int *route, uint8_t *ins[], uint8_t **outs, int ns, int bps)
 Copy samples from several input streams to one output stream.
static int filter_samples (AVFilterLink *inlink, AVFilterBufferRef *insamples)
static av_cold int init (AVFilterContext *ctx, const char *args)

Variables

static const AVOption amerge_options []
AVFilter avfilter_af_amerge


Detailed Description

Audio merging filter.

Definition in file af_amerge.c.


Define Documentation

#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM

Definition at line 50 of file af_amerge.c.

#define OFFSET (  )     offsetof(AMergeContext, x)

Definition at line 49 of file af_amerge.c.


Function Documentation

AVFILTER_DEFINE_CLASS ( amerge   ) 

static int config_output ( AVFilterLink outlink  )  [static]

Definition at line 138 of file af_amerge.c.

static void copy_samples ( int  nb_inputs,
struct amerge_input  in[],
int route,
uint8_t ins[],
uint8_t **  outs,
int  ns,
int  bps 
) [inline, static]

Copy samples from several input streams to one output stream.

Parameters:
nb_inputs number of inputs
in inputs; used only for the nb_ch field;
route routing values; input channel i goes to output channel route[i]; i < in[0].nb_ch are the channels from the first output; i >= in[0].nb_ch are the channels from the second output
ins pointer to the samples of each inputs, in packed format; will be left at the end of the copied samples
outs pointer to the samples of the output, in packet format; must point to a buffer big enough; will be left at the end of the copied samples
ns number of samples to copy
bps bytes per sample

Definition at line 199 of file af_amerge.c.

static int filter_samples ( AVFilterLink inlink,
AVFilterBufferRef insamples 
) [static]

Definition at line 220 of file af_amerge.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args 
) [static]

Definition at line 296 of file af_amerge.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 72 of file af_amerge.c.

static int request_frame ( AVFilterLink outlink  )  [static]

Definition at line 170 of file af_amerge.c.

Referenced by ff_request_frame(), and init().

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 60 of file af_amerge.c.


Variable Documentation

const AVOption amerge_options[] [static]

Initial value:

 {
    { "inputs", "specify the number of inputs", OFFSET(nb_inputs),
      AV_OPT_TYPE_INT, { .i64 = 2 }, 2, SWR_CH_MAX, FLAGS },
    {0}
}

Definition at line 52 of file af_amerge.c.

Initial value:

 {
    .name          = "amerge",
    .description   = NULL_IF_CONFIG_SMALL("Merge two audio streams into "
                                          "a single multi-channel stream."),
    .priv_size     = sizeof(AMergeContext),
    .init          = init,
    .uninit        = uninit,
    .query_formats = query_formats,

    .inputs    = (const AVFilterPad[]) { { .name = NULL } },
    .outputs   = (const AVFilterPad[]) {
        { .name             = "default",
          .type             = AVMEDIA_TYPE_AUDIO,
          .config_props     = config_output,
          .request_frame    = request_frame, },
        { .name = NULL }
    },
    .priv_class = &amerge_class,
}

Definition at line 326 of file af_amerge.c.


Generated on Fri Oct 26 02:50:09 2012 for FFmpeg by  doxygen 1.5.8