Browse Source

lavfi/drawbox: add "width" and "height" aliases for "w" and "h" options

tags/n1.1
Stefano Sabatini 13 years ago
parent
commit
9d478f38cd
3 changed files with 6 additions and 3 deletions
  1. +2
    -1
      doc/filters.texi
  2. +1
    -1
      libavfilter/version.h
  3. +3
    -1
      libavfilter/vf_drawbox.c

+ 2
- 1
doc/filters.texi View File

@@ -1735,7 +1735,8 @@ The description of the accepted parameters follows.
@item x, y @item x, y
Specify the top left corner coordinates of the box. Default to 0. Specify the top left corner coordinates of the box. Default to 0.


@item width, height
@item width, w
@item height, h
Specify the width and height of the box, if 0 they are interpreted as Specify the width and height of the box, if 0 they are interpreted as
the input width and height. Default to 0. the input width and height. Default to 0.




+ 1
- 1
libavfilter/version.h View File

@@ -30,7 +30,7 @@


#define LIBAVFILTER_VERSION_MAJOR 3 #define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 21 #define LIBAVFILTER_VERSION_MINOR 21
#define LIBAVFILTER_VERSION_MICRO 103
#define LIBAVFILTER_VERSION_MICRO 104


#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \ LIBAVFILTER_VERSION_MINOR, \


+ 3
- 1
libavfilter/vf_drawbox.c View File

@@ -51,8 +51,10 @@ typedef struct {
static const AVOption drawbox_options[] = { static const AVOption drawbox_options[] = {
{ "x", "set the box top-left corner x position", OFFSET(x), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGS }, { "x", "set the box top-left corner x position", OFFSET(x), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGS },
{ "y", "set the box top-left corner y position", OFFSET(y), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGS }, { "y", "set the box top-left corner y position", OFFSET(y), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGS },
{ "width", "set the box width", OFFSET(w), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "w", "set the box width", OFFSET(w), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS }, { "w", "set the box width", OFFSET(w), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "h", "set the box heigth", OFFSET(h), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "height", "set the box height", OFFSET(h), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "h", "set the box height", OFFSET(h), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "color", "set the box edge color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str="black"}, CHAR_MIN, CHAR_MAX, FLAGS }, { "color", "set the box edge color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str="black"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "c", "set the box edge color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str="black"}, CHAR_MIN, CHAR_MAX, FLAGS }, { "c", "set the box edge color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str="black"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "thickness", "set the box maximum thickness", OFFSET(thickness), AV_OPT_TYPE_INT, {.i64=4}, 0, INT_MAX, FLAGS }, { "thickness", "set the box maximum thickness", OFFSET(thickness), AV_OPT_TYPE_INT, {.i64=4}, 0, INT_MAX, FLAGS },


Loading…
Cancel
Save