#include "libavresample/avresample.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.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 |
#define | F AV_OPT_FLAG_FILTERING_PARAM |
Functions | |
AVFILTER_DEFINE_CLASS (asyncts) | |
static int | init (AVFilterContext *ctx, const char *args) |
static void | uninit (AVFilterContext *ctx) |
static int | config_props (AVFilterLink *link) |
static int | request_frame (AVFilterLink *link) |
static int | write_to_fifo (ASyncContext *s, AVFilterBufferRef *buf) |
static int64_t | get_delay (ASyncContext *s) |
static int | filter_samples (AVFilterLink *inlink, AVFilterBufferRef *buf) |
Variables | |
static const AVOption | asyncts_options [] |
AVFilter | avfilter_af_asyncts |
#define A AV_OPT_FLAG_AUDIO_PARAM |
Definition at line 47 of file af_asyncts.c.
#define F AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 48 of file af_asyncts.c.
#define OFFSET | ( | x | ) | offsetof(ASyncContext, x) |
Definition at line 46 of file af_asyncts.c.
AVFILTER_DEFINE_CLASS | ( | asyncts | ) |
static int config_props | ( | AVFilterLink * | link | ) | [static] |
static int filter_samples | ( | AVFilterLink * | inlink, | |
AVFilterBufferRef * | buf | |||
) | [static] |
Definition at line 158 of file af_asyncts.c.
static int64_t get_delay | ( | ASyncContext * | s | ) | [static] |
static int init | ( | AVFilterContext * | ctx, | |
const char * | args | |||
) | [static] |
Definition at line 60 of file af_asyncts.c.
static int request_frame | ( | AVFilterLink * | link | ) | [static] |
Definition at line 113 of file af_asyncts.c.
static void uninit | ( | AVFilterContext * | ctx | ) | [static] |
Definition at line 75 of file af_asyncts.c.
static int write_to_fifo | ( | ASyncContext * | s, | |
AVFilterBufferRef * | buf | |||
) | [static] |
const AVOption asyncts_options[] [static] |
Initial value:
{ { "compensate", "Stretch/squeeze the data to make it match the timestamps", OFFSET(resample), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, A|F }, { "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, { .dbl = 0.1 }, 0, INT_MAX, A|F }, { "max_comp", "Maximum compensation in samples per second.", OFFSET(max_comp), AV_OPT_TYPE_INT, { .i64 = 500 }, 0, INT_MAX, A|F }, { "first_pts", "Assume the first pts should be this value.", OFFSET(pts), AV_OPT_TYPE_INT64, { .i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, A|F }, { NULL }, }
Definition at line 49 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 }}, .priv_class = &asyncts_class, }
Definition at line 236 of file af_asyncts.c.