libavfilter/af_amerge.c File Reference

Audio merging filter. More...

#include "libswresample/swresample.h"
#include "avfilter.h"
#include "audio.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AMergeContext
struct  AMergeContext::AMergeContext::amerge_queue

Defines

#define QUEUE_SIZE   16

Functions

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_in_ch[2], int *route, uint8_t *ins[2], uint8_t **outs, int ns, int bps)
 Copy samples from two input streams to one output stream.
static void filter_samples (AVFilterLink *inlink, AVFilterBufferRef *insamples)

Variables

AVFilter avfilter_af_amerge


Detailed Description

Audio merging filter.

Definition in file af_amerge.c.


Define Documentation

#define QUEUE_SIZE   16

Definition at line 31 of file af_amerge.c.


Function Documentation

static int config_output ( AVFilterLink outlink  )  [static]

Definition at line 113 of file af_amerge.c.

static void copy_samples ( int  nb_in_ch[2],
int *  route,
uint8_t ins[2],
uint8_t **  outs,
int  ns,
int  bps 
) [inline, static]

Copy samples from two input streams to one output stream.

Parameters:
nb_in_ch number of channels in each input stream
route routing values; input channel i goes to output channel route[i]; i < nb_in_ch[0] are the channels from the first output; i >= nb_in_ch[0] 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 168 of file af_amerge.c.

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

Definition at line 186 of file af_amerge.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 53 of file af_amerge.c.

static int request_frame ( AVFilterLink outlink  )  [static]

Definition at line 140 of file af_amerge.c.

Referenced by avfilter_request_frame().

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 43 of file af_amerge.c.


Variable Documentation

Initial value:

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

    .inputs    = (const AVFilterPad[]) {
        { .name             = "in1",
          .type             = AVMEDIA_TYPE_AUDIO,
          .filter_samples   = filter_samples,
          .min_perms        = AV_PERM_READ, },
        { .name             = "in2",
          .type             = AVMEDIA_TYPE_AUDIO,
          .filter_samples   = filter_samples,
          .min_perms        = AV_PERM_READ, },
        { .name = NULL }
    },
    .outputs   = (const AVFilterPad[]) {
        { .name             = "default",
          .type             = AVMEDIA_TYPE_AUDIO,
          .config_props     = config_output,
          .request_frame    = request_frame, },
        { .name = NULL }
    },
}

Definition at line 274 of file af_amerge.c.


Generated on Fri Oct 26 02:48:00 2012 for FFmpeg by  doxygen 1.5.8