From: Thilo Borgmann <thilo.borgmann@mail.de>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_tpad: use enum for start/stop_mode
Date: Fri, 5 May 2023 22:01:08 +0200
Message-ID: <e0aec4f3-9b1c-c606-0e84-338784003bdb@mail.de> (raw)
In-Reply-To: <20230501121842.18868-1-epirat07@gmail.com>
Hi,
Am 01.05.23 um 14:18 schrieb Marvin Scholz:
> ---
> libavfilter/vf_tpad.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
> index f0c065f0c3..88c3c99de4 100644
> --- a/libavfilter/vf_tpad.c
> +++ b/libavfilter/vf_tpad.c
> @@ -27,6 +27,12 @@
> #include "formats.h"
> #include "drawutils.h"
>
> +enum PadMode {
> + MODE_ADD = 0,
> + MODE_CLONE,
> + NB_MODE
> +};
> +
> typedef struct TPadContext {
> const AVClass *class;
> int pad_start;
> @@ -51,10 +57,10 @@ typedef struct TPadContext {
> static const AVOption tpad_options[] = {
> { "start", "set the number of frames to delay input", OFFSET(pad_start), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, VF },
> { "stop", "set the number of frames to add after input finished", OFFSET(pad_stop), AV_OPT_TYPE_INT, {.i64=0}, -1, INT_MAX, VF },
> - { "start_mode", "set the mode of added frames to start", OFFSET(start_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" },
> - { "add", "add solid-color frames", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, VF, "mode" },
> - { "clone", "clone first/last frame", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, VF, "mode" },
> - { "stop_mode", "set the mode of added frames to end", OFFSET(stop_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" },
> + { "start_mode", "set the mode of added frames to start", OFFSET(start_mode), AV_OPT_TYPE_INT, {.i64=MODE_ADD}, 0, NB_MODE-1, VF, "mode" },
> + { "add", "add solid-color frames", 0, AV_OPT_TYPE_CONST, {.i64=MODE_ADD}, 0, 0, VF, "mode" },
> + { "clone", "clone first/last frame", 0, AV_OPT_TYPE_CONST, {.i64=MODE_CLONE}, 0, 0, VF, "mode" },
> + { "stop_mode", "set the mode of added frames to end", OFFSET(stop_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_MODE-1, VF, "mode" },
I think you wanted to use MODE_ADD to init this as well.
Otherwise LGTM.
-Thilo
_______________________________________________
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".
next prev parent reply other threads:[~2023-05-05 20:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-19 10:42 Marvin Scholz
2023-04-19 10:42 ` [FFmpeg-devel] [PATCH 2/2] avfilter/vf_tpad: accept hardware frames in clone-only mode Marvin Scholz
2023-04-19 10:45 ` Marvin Scholz
2023-05-01 12:18 ` [FFmpeg-devel] [PATCH 1/2] avfilter/vf_tpad: use enum for start/stop_mode Marvin Scholz
2023-05-01 12:18 ` [FFmpeg-devel] [PATCH 2/2] avfilter/vf_tpad: accept hardware frames in clone-only mode Marvin Scholz
2023-05-05 20:02 ` Thilo Borgmann
2023-05-05 20:01 ` Thilo Borgmann [this message]
2023-05-22 10:14 ` [FFmpeg-devel] [PATCH v3 1/2] avfilter/vf_tpad: use enum for start/stop_mode Marvin Scholz
2023-05-22 10:14 ` [FFmpeg-devel] [PATCH v3 2/2] avfilter/vf_tpad: accept hardware frames in clone-only mode Marvin Scholz
2023-05-22 16:37 ` [FFmpeg-devel] [PATCH v3 1/2] avfilter/vf_tpad: use enum for start/stop_mode Niklas Haas
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=e0aec4f3-9b1c-c606-0e84-338784003bdb@mail.de \
--to=thilo.borgmann@mail.de \
--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