libavfilter/af_aformat.c File Reference

format audio filter More...

#include "libavutil/audioconvert.h"
#include "libavutil/avstring.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  AFormatContext

Defines

#define OFFSET(x)   offsetof(AFormatContext, x)
#define A   AV_OPT_FLAG_AUDIO_PARAM
#define PARSE_FORMATS(str, type, list, add_to_list, get_fmt, none, desc)

Functions

static int get_sample_rate (const char *samplerate)
static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
static int query_formats (AVFilterContext *ctx)

Variables

static const AVOption options []
static const AVClass aformat_class
AVFilter avfilter_af_aformat


Detailed Description

format audio filter

Definition in file af_aformat.c.


Define Documentation

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 48 of file af_aformat.c.

#define OFFSET (  )     offsetof(AFormatContext, x)

Definition at line 47 of file af_aformat.c.

#define PARSE_FORMATS ( str,
type,
list,
add_to_list,
get_fmt,
none,
desc   ) 

Value:

do {                                                                        \
    char *next, *cur = str;                                                 \
    while (cur) {                                                           \
        type fmt;                                                           \
        next = strchr(cur, ',');                                            \
        if (next)                                                           \
            *next++ = 0;                                                    \
                                                                            \
        if ((fmt = get_fmt(cur)) == none) {                                 \
            av_log(ctx, AV_LOG_ERROR, "Error parsing " desc ": %s.\n", cur);\
            ret = AVERROR(EINVAL);                                          \
            goto fail;                                                      \
        }                                                                   \
        add_to_list(&list, fmt);                                            \
                                                                            \
        cur = next;                                                         \
    }                                                                       \
} while (0)

Definition at line 63 of file af_aformat.c.

Referenced by init().


Function Documentation

static int get_sample_rate ( const char *  samplerate  )  [static]

Definition at line 83 of file af_aformat.c.

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

Definition at line 89 of file af_aformat.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 120 of file af_aformat.c.


Variable Documentation

const AVClass aformat_class [static]

Initial value:

 {
    .class_name = "aformat filter",
    .item_name  = av_default_item_name,
    .option     = options,
    .version    = LIBAVUTIL_VERSION_INT,
}

Definition at line 56 of file af_aformat.c.

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        = (AVFilterPad[]) {{ .name            = "default",
                                        .type            = AVMEDIA_TYPE_AUDIO,
                                        .filter_samples  = ff_null_filter_samples },
                                      { .name = NULL}},
    .outputs       = (AVFilterPad[]) {{ .name            = "default",
                                        .type            = AVMEDIA_TYPE_AUDIO},
                                      { .name = NULL}},
}

Definition at line 134 of file af_aformat.c.

const AVOption options[] [static]

Initial value:

 {
    { "sample_fmts",     "A comma-separated list of sample formats.",  OFFSET(formats_str),         AV_OPT_TYPE_STRING, .flags = A },
    { "sample_rates",    "A comma-separated list of sample rates.",    OFFSET(sample_rates_str),    AV_OPT_TYPE_STRING, .flags = A },
    { "channel_layouts", "A comma-separated list of channel layouts.", OFFSET(channel_layouts_str), AV_OPT_TYPE_STRING, .flags = A },
    { NULL },
}

Definition at line 49 of file af_aformat.c.


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