[FFmpeg-devel] [PATCH] lavfi/timecode: give a new alias "timecode_rate" to the the r/rate option

Stefano Sabatini stefasab at gmail.com
Wed May 2 00:59:50 CEST 2012


The option is related to the timecode, the new name clearly specifies the
context. Also it allows to list the option close to the other timecode
options.
---
 doc/filters.texi          |    6 +++---
 libavfilter/vf_drawtext.c |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 2483fde..46be49e 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1329,9 +1329,6 @@ Default value is "render".
 For more information consult the documentation for the FT_LOAD_*
 libfreetype flags.
 
- at item rate, r
-Set the timecode frame rate (timecode only).
-
 @item shadowcolor
 The color to be used for drawing a shadow behind the drawn text.  It
 can be a color name (e.g. "yellow") or a string in the 0xRRGGBB[AA]
@@ -1352,6 +1349,9 @@ Set the initial timecode representation in "hh:mm:ss[:;.]ff"
 format. It can be used with or without text parameter. @var{rate}
 option must be specified.
 
+ at item timecode_rate, rate, r
+Set the timecode frame rate (timecode only).
+
 @item text
 The text string to be drawn. The text must be a sequence of UTF-8
 encoded characters.
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 74a19c8..59f6f00 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -178,6 +178,7 @@ static const AVOption drawtext_options[]= {
 {"draw",     "if false do not draw", OFFSET(draw_expr),          AV_OPT_TYPE_STRING, {.str="1"},   CHAR_MIN, CHAR_MAX },
 {"timecode", "set initial timecode", OFFSET(tc_opt_string),      AV_OPT_TYPE_STRING, {.str=NULL},  CHAR_MIN, CHAR_MAX },
 {"tc24hmax", "set 24 hours max (timecode only)", OFFSET(tc24hmax), AV_OPT_TYPE_INT,  {.dbl=0},            0,        1 },
+{"timecode_rate", "set rate (timecode only)", OFFSET(tc_rate),   AV_OPT_TYPE_RATIONAL, {.dbl=0},          0,  INT_MAX },
 {"r",        "set rate (timecode only)", OFFSET(tc_rate),        AV_OPT_TYPE_RATIONAL, {.dbl=0},          0,  INT_MAX },
 {"rate",     "set rate (timecode only)", OFFSET(tc_rate),        AV_OPT_TYPE_RATIONAL, {.dbl=0},          0,  INT_MAX },
 {"fix_bounds", "if true, check and fix text coords to avoid clipping",
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list