Commit 1007de70 authored by Michael Niedermayer's avatar Michael Niedermayer

asetpts: add AVOptions

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 292f6815
...@@ -208,6 +208,21 @@ static av_cold void uninit(AVFilterContext *ctx) ...@@ -208,6 +208,21 @@ static av_cold void uninit(AVFilterContext *ctx)
} }
#if CONFIG_ASETPTS_FILTER #if CONFIG_ASETPTS_FILTER
#define OFFSET(x) offsetof(SetPTSContext, x)
#define AFLAGS AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
static const AVOption aoptions[] = {
{ "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = AFLAGS },
{ NULL },
};
static const AVClass asetpts_class = {
.class_name = "asetpts",
.item_name = av_default_item_name,
.option = aoptions,
.version = LIBAVUTIL_VERSION_INT,
};
static const AVFilterPad avfilter_af_asetpts_inputs[] = { static const AVFilterPad avfilter_af_asetpts_inputs[] = {
{ {
.name = "default", .name = "default",
...@@ -233,6 +248,7 @@ AVFilter avfilter_af_asetpts = { ...@@ -233,6 +248,7 @@ AVFilter avfilter_af_asetpts = {
.init = init, .init = init,
.uninit = uninit, .uninit = uninit,
.priv_size = sizeof(SetPTSContext), .priv_size = sizeof(SetPTSContext),
.priv_class= &asetpts_class,
.inputs = avfilter_af_asetpts_inputs, .inputs = avfilter_af_asetpts_inputs,
.outputs = avfilter_af_asetpts_outputs, .outputs = avfilter_af_asetpts_outputs,
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment