diff mbox series

[FFmpeg-devel,v1,2/2] avfilter/vf_overlay: remove the duplicated framesync option

Message ID 20200317105501.2847-2-lance.lmwang@gmail.com
State New
Headers show
Series [FFmpeg-devel,v1] avfilter/src_movie: Fix the loop function of dynamic logo
Related show

Checks

Context Check Description
andriy/ffmpeg-patchwork pending
andriy/ffmpeg-patchwork success Applied patch
andriy/ffmpeg-patchwork success Configure finished
andriy/ffmpeg-patchwork success Make finished
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Limin Wang March 17, 2020, 10:55 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

After applied the patch, we can change default eof_action from repeat to pass still.

./ffmpeg -y -filter_complex "movie=./input.mkv,setpts=PTS-STARTPTS[main];movie=./overlay.mkv:loop=2,setpts=PTS-STARTPTS[overlay];[main][overlay]overlay=10:10:
 enable='between(t,0,25):eof_action=pass"  test.mkv

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/vf_overlay.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Paul B Mahol March 17, 2020, 12:09 p.m. UTC | #1
NAK

Was added explicitly by Michael, to keep all scripts working.
So you should not sent such patches.

On 3/17/20, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
>
> After applied the patch, we can change default eof_action from repeat to
> pass still.
>
> ./ffmpeg -y -filter_complex
> "movie=./input.mkv,setpts=PTS-STARTPTS[main];movie=./overlay.mkv:loop=2,setpts=PTS-STARTPTS[overlay];[main][overlay]overlay=10:10:
>  enable='between(t,0,25):eof_action=pass"  test.mkv
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/vf_overlay.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> index 0a8f089c0d..a481f74076 100644
> --- a/libavfilter/vf_overlay.c
> +++ b/libavfilter/vf_overlay.c
> @@ -993,16 +993,9 @@ static int activate(AVFilterContext *ctx)
>  static const AVOption overlay_options[] = {
>      { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING,
> {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
>      { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING,
> {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
> -    { "eof_action", "Action to take when encountering EOF from secondary
> input ",
> -        OFFSET(fs.opt_eof_action), AV_OPT_TYPE_INT, { .i64 =
> EOF_ACTION_REPEAT },
> -        EOF_ACTION_REPEAT, EOF_ACTION_PASS, .flags = FLAGS, "eof_action" },
> -        { "repeat", "Repeat the previous frame.",   0, AV_OPT_TYPE_CONST, {
> .i64 = EOF_ACTION_REPEAT }, .flags = FLAGS, "eof_action" },
> -        { "endall", "End both streams.",            0, AV_OPT_TYPE_CONST, {
> .i64 = EOF_ACTION_ENDALL }, .flags = FLAGS, "eof_action" },
> -        { "pass",   "Pass through the main input.", 0, AV_OPT_TYPE_CONST, {
> .i64 = EOF_ACTION_PASS },   .flags = FLAGS, "eof_action" },
>      { "eval", "specify when to evaluate expressions", OFFSET(eval_mode),
> AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_FRAME}, 0, EVAL_MODE_NB-1, FLAGS, "eval"
> },
>           { "init",  "eval expressions once during initialization", 0,
> AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT},  .flags = FLAGS, .unit = "eval" },
>           { "frame", "eval expressions per-frame",                  0,
> AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
> -    { "shortest", "force termination when the shortest input terminates",
> OFFSET(fs.opt_shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
>      { "format", "set output format", OFFSET(format), AV_OPT_TYPE_INT,
> {.i64=OVERLAY_FORMAT_YUV420}, 0, OVERLAY_FORMAT_NB-1, FLAGS, "format" },
>          { "yuv420", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV420},
> .flags = FLAGS, .unit = "format" },
>          { "yuv422", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV422},
> .flags = FLAGS, .unit = "format" },
> @@ -1010,7 +1003,6 @@ static const AVOption overlay_options[] = {
>          { "rgb",    "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_RGB},
> .flags = FLAGS, .unit = "format" },
>          { "gbrp",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_GBRP},
> .flags = FLAGS, .unit = "format" },
>          { "auto",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_AUTO},
> .flags = FLAGS, .unit = "format" },
> -    { "repeatlast", "repeat overlay of the last overlay frame",
> OFFSET(fs.opt_repeatlast), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
>      { "alpha", "alpha format", OFFSET(alpha_format), AV_OPT_TYPE_INT,
> {.i64=0}, 0, 1, FLAGS, "alpha_format" },
>          { "straight",      "", 0, AV_OPT_TYPE_CONST, {.i64=0}, .flags =
> FLAGS, .unit = "alpha_format" },
>          { "premultiplied", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, .flags =
> FLAGS, .unit = "alpha_format" },
> --
> 2.21.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".
Limin Wang March 17, 2020, 2:39 p.m. UTC | #2
On Tue, Mar 17, 2020 at 01:09:59PM +0100, Paul B Mahol wrote:
> NAK
> 
> Was added explicitly by Michael, to keep all scripts working.
> So you should not sent such patches.

Sorry, I have realized it'll break the short option without eof_action.
please ignore the patch.

> 
> On 3/17/20, lance.lmwang@gmail.com <lance.lmwang@gmail.com> wrote:
> > From: Limin Wang <lance.lmwang@gmail.com>
> >
> > After applied the patch, we can change default eof_action from repeat to
> > pass still.
> >
> > ./ffmpeg -y -filter_complex
> > "movie=./input.mkv,setpts=PTS-STARTPTS[main];movie=./overlay.mkv:loop=2,setpts=PTS-STARTPTS[overlay];[main][overlay]overlay=10:10:
> >  enable='between(t,0,25):eof_action=pass"  test.mkv
> >
> > Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> > ---
> >  libavfilter/vf_overlay.c | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
> > index 0a8f089c0d..a481f74076 100644
> > --- a/libavfilter/vf_overlay.c
> > +++ b/libavfilter/vf_overlay.c
> > @@ -993,16 +993,9 @@ static int activate(AVFilterContext *ctx)
> >  static const AVOption overlay_options[] = {
> >      { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING,
> > {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
> >      { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING,
> > {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
> > -    { "eof_action", "Action to take when encountering EOF from secondary
> > input ",
> > -        OFFSET(fs.opt_eof_action), AV_OPT_TYPE_INT, { .i64 =
> > EOF_ACTION_REPEAT },
> > -        EOF_ACTION_REPEAT, EOF_ACTION_PASS, .flags = FLAGS, "eof_action" },
> > -        { "repeat", "Repeat the previous frame.",   0, AV_OPT_TYPE_CONST, {
> > .i64 = EOF_ACTION_REPEAT }, .flags = FLAGS, "eof_action" },
> > -        { "endall", "End both streams.",            0, AV_OPT_TYPE_CONST, {
> > .i64 = EOF_ACTION_ENDALL }, .flags = FLAGS, "eof_action" },
> > -        { "pass",   "Pass through the main input.", 0, AV_OPT_TYPE_CONST, {
> > .i64 = EOF_ACTION_PASS },   .flags = FLAGS, "eof_action" },
> >      { "eval", "specify when to evaluate expressions", OFFSET(eval_mode),
> > AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_FRAME}, 0, EVAL_MODE_NB-1, FLAGS, "eval"
> > },
> >           { "init",  "eval expressions once during initialization", 0,
> > AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT},  .flags = FLAGS, .unit = "eval" },
> >           { "frame", "eval expressions per-frame",                  0,
> > AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
> > -    { "shortest", "force termination when the shortest input terminates",
> > OFFSET(fs.opt_shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
> >      { "format", "set output format", OFFSET(format), AV_OPT_TYPE_INT,
> > {.i64=OVERLAY_FORMAT_YUV420}, 0, OVERLAY_FORMAT_NB-1, FLAGS, "format" },
> >          { "yuv420", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV420},
> > .flags = FLAGS, .unit = "format" },
> >          { "yuv422", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV422},
> > .flags = FLAGS, .unit = "format" },
> > @@ -1010,7 +1003,6 @@ static const AVOption overlay_options[] = {
> >          { "rgb",    "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_RGB},
> > .flags = FLAGS, .unit = "format" },
> >          { "gbrp",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_GBRP},
> > .flags = FLAGS, .unit = "format" },
> >          { "auto",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_AUTO},
> > .flags = FLAGS, .unit = "format" },
> > -    { "repeatlast", "repeat overlay of the last overlay frame",
> > OFFSET(fs.opt_repeatlast), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
> >      { "alpha", "alpha format", OFFSET(alpha_format), AV_OPT_TYPE_INT,
> > {.i64=0}, 0, 1, FLAGS, "alpha_format" },
> >          { "straight",      "", 0, AV_OPT_TYPE_CONST, {.i64=0}, .flags =
> > FLAGS, .unit = "alpha_format" },
> >          { "premultiplied", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, .flags =
> > FLAGS, .unit = "alpha_format" },
> > --
> > 2.21.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".
diff mbox series

Patch

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 0a8f089c0d..a481f74076 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -993,16 +993,9 @@  static int activate(AVFilterContext *ctx)
 static const AVOption overlay_options[] = {
     { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
     { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS },
-    { "eof_action", "Action to take when encountering EOF from secondary input ",
-        OFFSET(fs.opt_eof_action), AV_OPT_TYPE_INT, { .i64 = EOF_ACTION_REPEAT },
-        EOF_ACTION_REPEAT, EOF_ACTION_PASS, .flags = FLAGS, "eof_action" },
-        { "repeat", "Repeat the previous frame.",   0, AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_REPEAT }, .flags = FLAGS, "eof_action" },
-        { "endall", "End both streams.",            0, AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_ENDALL }, .flags = FLAGS, "eof_action" },
-        { "pass",   "Pass through the main input.", 0, AV_OPT_TYPE_CONST, { .i64 = EOF_ACTION_PASS },   .flags = FLAGS, "eof_action" },
     { "eval", "specify when to evaluate expressions", OFFSET(eval_mode), AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_FRAME}, 0, EVAL_MODE_NB-1, FLAGS, "eval" },
          { "init",  "eval expressions once during initialization", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT},  .flags = FLAGS, .unit = "eval" },
          { "frame", "eval expressions per-frame",                  0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },
-    { "shortest", "force termination when the shortest input terminates", OFFSET(fs.opt_shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
     { "format", "set output format", OFFSET(format), AV_OPT_TYPE_INT, {.i64=OVERLAY_FORMAT_YUV420}, 0, OVERLAY_FORMAT_NB-1, FLAGS, "format" },
         { "yuv420", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV420}, .flags = FLAGS, .unit = "format" },
         { "yuv422", "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_YUV422}, .flags = FLAGS, .unit = "format" },
@@ -1010,7 +1003,6 @@  static const AVOption overlay_options[] = {
         { "rgb",    "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_RGB},    .flags = FLAGS, .unit = "format" },
         { "gbrp",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_GBRP},   .flags = FLAGS, .unit = "format" },
         { "auto",   "", 0, AV_OPT_TYPE_CONST, {.i64=OVERLAY_FORMAT_AUTO},   .flags = FLAGS, .unit = "format" },
-    { "repeatlast", "repeat overlay of the last overlay frame", OFFSET(fs.opt_repeatlast), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
     { "alpha", "alpha format", OFFSET(alpha_format), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, "alpha_format" },
         { "straight",      "", 0, AV_OPT_TYPE_CONST, {.i64=0}, .flags = FLAGS, .unit = "alpha_format" },
         { "premultiplied", "", 0, AV_OPT_TYPE_CONST, {.i64=1}, .flags = FLAGS, .unit = "alpha_format" },