#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 A AV_OPT_FLAG_AUDIO_PARAM |
Definition at line 42 of file af_asyncts.c.
#define OFFSET | ( | x | ) | offsetof(ASyncContext, x) |
Definition at line 41 of file af_asyncts.c.
static int config_props | ( | AVFilterLink * | link | ) | [static] |
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] |
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] |
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.
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.