From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] avfilter/vf_scale: don't expose framesync options in vf_scale2ref Date: Sun, 5 May 2024 11:02:19 -0300 Message-ID: <20240505140219.3508-1-jamrial@gmail.com> (raw) It doesn't use it. Signed-off-by: James Almer <jamrial@gmail.com> --- libavfilter/vf_scale.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 60d301dcd8..07e9025335 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -1228,7 +1228,7 @@ static const AVOption scale_options[] = { }; static const AVClass scale_class = { - .class_name = "scale(2ref)", + .class_name = "scale", .item_name = av_default_item_name, .option = scale_options, .version = LIBAVUTIL_VERSION_INT, @@ -1268,6 +1268,31 @@ const AVFilter ff_vf_scale = { .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; +static const AVClass *scale2ref_child_class_iterate(void **iter) +{ + const AVClass *c = *iter ? NULL : sws_get_class(); + *iter = (void*)(uintptr_t)c; + return c; +} + +static void *scale2ref_child_next(void *obj, void *prev) +{ + ScaleContext *s = obj; + if (!prev) + return s->sws_opts; + return NULL; +} + +static const AVClass scale2ref_class = { + .class_name = "scale(2ref)", + .item_name = av_default_item_name, + .option = scale_options, + .version = LIBAVUTIL_VERSION_INT, + .category = AV_CLASS_CATEGORY_FILTER, + .child_class_iterate = scale2ref_child_class_iterate, + .child_next = scale2ref_child_next, +}; + static const AVFilterPad avfilter_vf_scale2ref_inputs[] = { { .name = "default", @@ -1303,7 +1328,7 @@ const AVFilter ff_vf_scale2ref = { .init = init, .uninit = uninit, .priv_size = sizeof(ScaleContext), - .priv_class = &scale_class, + .priv_class = &scale2ref_class, FILTER_INPUTS(avfilter_vf_scale2ref_inputs), FILTER_OUTPUTS(avfilter_vf_scale2ref_outputs), FILTER_QUERY_FUNC(query_formats), -- 2.44.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
reply other threads:[~2024-05-05 14:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240505140219.3508-1-jamrial@gmail.com \ --to=jamrial@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git