64 #define OFFSET(x) offsetof(AStreamSyncContext, x)
65 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
85 for (i = 0; i < 42; i++)
96 for (i = 0; i < 2; i++) {
113 int id = outlink == ctx->
outputs[1];
123 struct buf_queue *queue = &as->
queue[out_id];
127 queue->buf[queue->tail] =
NULL;
155 for (i = 0; i < 2; i++)
164 int id = outlink == ctx->
outputs[1];
167 while (as->
req[
id] && !(as->
eof & (1 <<
id))) {
184 int id = inlink == ctx->
inputs[1];
188 as->
eof &= ~(1 <<
id);
230 .
name =
"astreamsync",
232 "in a configurable order."),
237 .
inputs = astreamsync_inputs,
238 .
outputs = astreamsync_outputs,
239 .priv_class = &astreamsync_class,
This structure describes decoded (raw) audio or video data.
static const AVFilterPad outputs[]
Main libavfilter public API header.
static enum AVSampleFormat formats[]
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
struct AVFilterChannelLayouts * in_channel_layouts
static int config_output(AVFilterLink *outlink)
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
static double av_q2d(AVRational a)
Convert rational to double.
static const AVFilterPad astreamsync_outputs[]
A filter pad used for either input or output.
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int sample_rate
samples per second
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVOption astreamsync_options[]
void * priv
private data for use by the filter
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
struct AVFilterChannelLayouts * out_channel_layouts
static int query_formats(AVFilterContext *ctx)
AVFilterFormats * in_formats
Lists of formats and channel layouts supported by the input and output filters respectively.
static av_cold void uninit(AVFilterContext *ctx)
AVFilterContext * src
source filter
AVFilterFormats * out_samplerates
A list of supported channel layouts.
AVFilterFormats * in_samplerates
Lists of channel layouts and sample rates used for automatic negotiation.
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
AVFilter ff_af_astreamsync
double var_values[VAR_NB]
AVFrame * buf[QUEUE_SIZE]
struct AStreamSyncContext::buf_queue queue[2]
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
const char * name
Filter name.
static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
AVFilterLink ** outputs
array of pointers to output links
enum MovChannelLayoutTag * layouts
static void send_next(AVFilterContext *ctx)
static const AVFilterPad astreamsync_inputs[]
static av_cold int init(AVFilterContext *ctx)
AVFILTER_DEFINE_CLASS(astreamsync)
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
AVFilterContext * dst
dest filter
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
static int send_out(AVFilterContext *ctx, int out_id)
int nb_samples
number of audio samples (per channel) described by this frame
#define AV_NOPTS_VALUE
Undefined timestamp value.
AVFilterFormats * out_formats
static const char *const var_names[]
static int request_frame(AVFilterLink *outlink)
simple arithmetic expression evaluator