libavfilter/af_aformat.c File Reference

format audio filter More...

#include "libavutil/audioconvert.h"
#include "libavutil/avstring.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AFormatContext

Defines

#define ADD_FORMATS(all_formats, fmt_name, fmt_type, fmts_list)

Functions

static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
static int query_formats (AVFilterContext *ctx)
static void filter_samples (AVFilterLink *inlink, AVFilterBufferRef *insamplesref)

Variables

AVFilter avfilter_af_aformat


Detailed Description

format audio filter

Definition in file af_aformat.c.


Define Documentation

#define ADD_FORMATS ( all_formats,
fmt_name,
fmt_type,
fmts_list   ) 

Value:

fmts_str = av_get_token(&args, ":");                                \
    if (!fmts_str || !*fmts_str)                                        \
        goto arg_fail;                                                  \
    if (!strcmp(fmts_str, "all")) {                                     \
        aformat->fmts_list = all_formats;                               \
    } else {                                                            \
        for (fmt_str = fmts_str;                                        \
             fmt_str = av_strtok(fmt_str, ",", &ptr); fmt_str = NULL) { \
            if ((ret = ff_parse_##fmt_name((fmt_type *)&fmt,            \
                                           fmt_str, ctx)) < 0) {        \
                av_freep(&fmts_str);                                    \
                return ret;                                             \
            }                                                           \
            avfilter_add_format(&aformat->fmts_list, fmt);              \
        }                                                               \
    }                                                                   \
    av_freep(&fmts_str);                                                \
    if (*args)                                                          \
        args++;

Referenced by init().


Function Documentation

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

Definition at line 89 of file af_aformat.c.

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

Definition at line 35 of file af_aformat.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 79 of file af_aformat.c.


Variable Documentation

Initial value:

 {
    .name          = "aformat",
    .description   = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."),
    .init          = init,
    .query_formats = query_formats,
    .priv_size     = sizeof(AFormatContext),

    .inputs        = (const AVFilterPad[]) {{ .name      = "default",
                                        .type            = AVMEDIA_TYPE_AUDIO,
                                        .filter_samples  = filter_samples},
                                      { .name = NULL}},
    .outputs       = (const AVFilterPad[]) {{ .name      = "default",
                                        .type            = AVMEDIA_TYPE_AUDIO},
                                      { .name = NULL}},
}

Definition at line 94 of file af_aformat.c.


Generated on Fri Oct 26 02:46:11 2012 for FFmpeg by  doxygen 1.5.8