[FFmpeg-devel] [PATCH 1/4] doc/utils: Rewrite doc for time duration syntax

Stefano Sabatini stefasab at gmail.com
Mon Oct 14 20:13:55 CEST 2013


Nit: Rewrite -> rewrite

On date Sunday 2013-10-13 18:37:10 -0700, Timothy Gu encoded:
> Signed-off-by: Timothy Gu <timothygu99 at gmail.com>
> ---
>  doc/utils.texi | 39 ++++++++++++++++++++++++++++++++++-----
>  1 file changed, 34 insertions(+), 5 deletions(-)

> 
> diff --git a/doc/utils.texi b/doc/utils.texi
> index 243973d..e098ab6 100644
> --- a/doc/utils.texi
> +++ b/doc/utils.texi
> @@ -96,14 +96,43 @@ year-month-day.
>  @anchor{time duration syntax}
>  @section Time duration
>  
> -The accepted syntax is:

> +There are two accepted syntaxes for expressing time duration. Either
> +one is perfectly valid.

Second sentence is redundant.

> +
> + at example
> +[-][@var{HH}:]@var{MM}:@var{SS}[. at var{m}...]
> + at end example
> +
> + at var{HH} expresses the number of hours, @var{MM} the number of minutes
> +for a maximum of 2 digits, and @var{SS} the number of seconds for a
> +maximum of 2 digits. The @var{m} at the end expresses decimal value for
> + at var{SS}.
> +
> + at emph{or}
> +
>  @example
> -[-][HH:]MM:SS[.m...]
> -[-]S+[.m...]
> +[-]@var{S}+[. at var{m}...]
>  @end example

I think this can be generalized to:
[-][[@var{HH}:]@var{MM}:]@var{SS}[. at var{m}...]

since both HH and MM are optional (note: parseutils.h should be
probably updated as well.)
  
> - at var{HH} expresses the number of hours, @var{MM} the number a of minutes
> -and @var{SS} the number of seconds.
> + at var{S} expresses the number of seconds, with the optional decimal part
> + at var{m}.
> +
> +In both expressions, the optional @samp{-} indicates negative duration.
> +
> + at subsection Examples
> +
> +The following examples are all valid time duration:
> +

> + at table @samp
> + at item 55
> +55 seconds.
> +
> + at item 12:03:45
> +12 hours, 03 minutes and 45 seconds.
> +
> + at item 23.189
> +23.189 seconds.

nit: drop the final "." (rationale: non complete sentence)

Should be good otherwise.
-- 
FFmpeg = Fierce and Fantastic Mega Pitiful Ephemeral Gladiator


More information about the ffmpeg-devel mailing list