libavfilter/af_asyncts.c File Reference

#include "libavresample/avresample.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "audio.h"
#include "avfilter.h"

Go to the source code of this file.

Data Structures

struct  ASyncContext

Defines

#define OFFSET(x)   offsetof(ASyncContext, x)
#define A   AV_OPT_FLAG_AUDIO_PARAM

Functions

static int init (AVFilterContext *ctx, const char *args, void *opaque)
static void uninit (AVFilterContext *ctx)
static int config_props (AVFilterLink *link)
static int request_frame (AVFilterLink *link)
static void write_to_fifo (ASyncContext *s, AVFilterBufferRef *buf)
static int64_t get_delay (ASyncContext *s)
static void filter_samples (AVFilterLink *inlink, AVFilterBufferRef *buf)

Variables

static const AVOption options []
static const AVClass async_class
AVFilter avfilter_af_asyncts


Define Documentation

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 42 of file af_asyncts.c.

#define OFFSET (  )     offsetof(ASyncContext, x)

Definition at line 41 of file af_asyncts.c.


Function Documentation

static int config_props ( AVFilterLink link  )  [static]

Definition at line 87 of file af_asyncts.c.

Referenced by start_frame().

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

Definition at line 151 of file af_asyncts.c.

static int64_t get_delay ( ASyncContext s  )  [static]

Definition at line 146 of file af_asyncts.c.

Referenced by filter_samples().

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

Definition at line 58 of file af_asyncts.c.

static int request_frame ( AVFilterLink link  )  [static]

Definition at line 115 of file af_asyncts.c.

static void uninit ( AVFilterContext ctx  )  [static]

Definition at line 77 of file af_asyncts.c.

static void write_to_fifo ( ASyncContext s,
AVFilterBufferRef buf 
) [static]

Definition at line 138 of file af_asyncts.c.

Referenced by end_frame(), and filter_samples().


Variable Documentation

const AVClass async_class [static]

Initial value:

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

Definition at line 51 of file af_asyncts.c.

Initial value:

 {
    .name        = "asyncts",
    .description = NULL_IF_CONFIG_SMALL("Sync audio data to timestamps"),

    .init        = init,
    .uninit      = uninit,

    .priv_size   = sizeof(ASyncContext),

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

Definition at line 222 of file af_asyncts.c.

const AVOption options[] [static]

Initial value:

 {
    { "compensate", "Stretch/squeeze the data to make it match the timestamps", OFFSET(resample),      AV_OPT_TYPE_INT,   { 0 },   0, 1,       A },
    { "min_delta",  "Minimum difference between timestamps and audio data "
                    "(in seconds) to trigger padding/trimmin the data.",        OFFSET(min_delta_sec), AV_OPT_TYPE_FLOAT, { 0.1 }, 0, INT_MAX, A },
    { "max_comp",   "Maximum compensation in samples per second.",              OFFSET(max_comp),      AV_OPT_TYPE_INT,   { 500 }, 0, INT_MAX, A },
    { NULL },
}

Definition at line 43 of file af_asyncts.c.


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