aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/f_setpts.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-04-12 15:46:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-04-12 15:46:52 +0200
commit1007de703305a2cb36a3fc5633d2635270206b15 (patch)
tree12e990f1229a80e4777b218185b2bb74fe315010 /libavfilter/f_setpts.c
parent292f68154b669d2d8e304b4bd7966938d4f9a393 (diff)
downloadffmpeg-1007de703305a2cb36a3fc5633d2635270206b15.tar.gz
asetpts: add AVOptions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/f_setpts.c')
-rw-r--r--libavfilter/f_setpts.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libavfilter/f_setpts.c b/libavfilter/f_setpts.c
index 1a7710fbd4..eec527ac53 100644
--- a/libavfilter/f_setpts.c
+++ b/libavfilter/f_setpts.c
@@ -208,6 +208,21 @@ static av_cold void uninit(AVFilterContext *ctx)
}
#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[] = {
{
.name = "default",
@@ -233,6 +248,7 @@ AVFilter avfilter_af_asetpts = {
.init = init,
.uninit = uninit,
.priv_size = sizeof(SetPTSContext),
+ .priv_class= &asetpts_class,
.inputs = avfilter_af_asetpts_inputs,
.outputs = avfilter_af_asetpts_outputs,
};