[FFmpeg-cvslog] asetpts: add AVOptions
Michael Niedermayer
git at videolan.org
Fri Apr 12 15:52:25 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Apr 12 15:46:52 2013 +0200| [1007de703305a2cb36a3fc5633d2635270206b15] | committer: Michael Niedermayer
asetpts: add AVOptions
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1007de703305a2cb36a3fc5633d2635270206b15
---
libavfilter/f_setpts.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/libavfilter/f_setpts.c b/libavfilter/f_setpts.c
index 1a7710f..eec527a 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,
};
More information about the ffmpeg-cvslog
mailing list