[FFmpeg-devel] [PATCH 07/16] lavfi/framesync2: add common options.
Paul B Mahol
onemda at gmail.com
Wed Aug 30 12:25:53 EEST 2017
On 8/10/17, Nicolas George <george at nsup.org> wrote:
> Also add functions and macros to help filters chaining these
> options to their own.
>
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
> libavfilter/framesync2.c | 55
> ++++++++++++++++++++++++++++++++++++++++++++++--
> libavfilter/framesync2.h | 44 +++++++++++++++++++++++++++++++++++++-
> 2 files changed, 96 insertions(+), 3 deletions(-)
>
>
> Unchanged.
>
>
> diff --git a/libavfilter/framesync2.c b/libavfilter/framesync2.c
> index 0f78a1733b..fae06aa1f5 100644
> --- a/libavfilter/framesync2.c
> +++ b/libavfilter/framesync2.c
> @@ -19,24 +19,43 @@
> */
>
> #include "libavutil/avassert.h"
> +#include "libavutil/opt.h"
> #include "avfilter.h"
> #include "filters.h"
> #include "framesync2.h"
> #include "internal.h"
>
> #define OFFSET(member) offsetof(FFFrameSync, member)
> +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
> +
> +enum EOFAction {
> + EOF_ACTION_REPEAT,
> + EOF_ACTION_ENDALL,
> + EOF_ACTION_PASS
> +};
>
> static const char *framesync_name(void *ptr)
> {
> return "framesync";
> }
>
> +static const AVOption framesync_options[] = {
> + { "eof_action", "Action to take when encountering EOF from secondary
> input ",
> + OFFSET(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" },
> + { "shortest", "force termination when the shortest input terminates",
> OFFSET(opt_shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
> + { "repeatlast", "repeat overlay of the last overlay frame",
> OFFSET(opt_repeatlast), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FLAGS },
Overlay means something for overlay filter only for others its source
of confusion.
So description need be changed.
More information about the ffmpeg-devel
mailing list