diff mbox series

[FFmpeg-devel] fftools/ffmpeg: rename -enc_stats* to -stats_enc*

Message ID 20230209142643.19623-1-anton@khirnov.net
State Accepted
Commit 2c4dcbd66be6427b8c91afbff63a77fbce5123b7
Headers show
Series [FFmpeg-devel] fftools/ffmpeg: rename -enc_stats* to -stats_enc* | expand

Checks

Context Check Description
andriy/configure_x86 warning Failed to apply patch

Commit Message

Anton Khirnov Feb. 9, 2023, 2:26 p.m. UTC
This is consistent with -stats_mux*

As the options were added very recently, this should not break any
users.
---
 Changelog            |  2 +-
 doc/ffmpeg.texi      | 20 ++++++++++----------
 fftools/ffmpeg_opt.c | 12 ++++++------
 3 files changed, 17 insertions(+), 17 deletions(-)

Comments

Stefano Sabatini Feb. 10, 2023, 11:59 p.m. UTC | #1
On date Thursday 2023-02-09 15:26:43 +0100, Anton Khirnov wrote:
> This is consistent with -stats_mux*
> 
> As the options were added very recently, this should not break any
> users.
> ---
>  Changelog            |  2 +-
>  doc/ffmpeg.texi      | 20 ++++++++++----------
>  fftools/ffmpeg_opt.c | 12 ++++++------
>  3 files changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/Changelog b/Changelog
> index bd9fe9922d..11dfd7ef73 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -32,7 +32,7 @@ version <next>:
>  - WADY DPCM decoder and demuxer
>  - CBD2 DPCM decoder
>  - ssim360 video filter
> -- ffmpeg CLI new options: -enc_stats_pre[_fmt], -enc_stats_post[_fmt],
> +- ffmpeg CLI new options: -stats_enc_pre[_fmt], -stats_enc_post[_fmt],
>    -stats_mux_pre[_fmt]
>  - hstack_vaapi, vstack_vaapi and xstack_vaapi filters
>  - XMD ADPCM decoder and demuxer
> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
> index 076956d128..d9d4b75567 100644
> --- a/doc/ffmpeg.texi
> +++ b/doc/ffmpeg.texi
> @@ -2061,30 +2061,30 @@ encoder/muxer, it does not change the stream to conform to this value. Setting
>  values that do not match the stream properties may result in encoding failures
>  or invalid output files.
>  
> -@item -enc_stats_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
> -@item -enc_stats_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
> +@item -stats_enc_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
> +@item -stats_enc_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
>  @item -stats_mux_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
>  Write per-frame encoding information about the matching streams into the file
>  given by @var{path}.
>  
> -@option{-enc_stats_pre} writes information about raw video or audio frames right
> -before they are sent for encoding, while @option{-enc_stats_post} writes
> +@option{-stats_enc_pre} writes information about raw video or audio frames right
> +before they are sent for encoding, while @option{-stats_enc_post} writes
>  information about encoded packets as they are received from the encoder.
>  @option{-stats_mux_pre} writes information about packets just as they are about to
>  be sent to the muxer. Every frame or packet produces one line in the specified
> -file. The format of this line is controlled by @option{-enc_stats_pre_fmt} /
> -@option{-enc_stats_post_fmt} / @option{-stats_mux_pre_fmt}.
> +file. The format of this line is controlled by @option{-stats_enc_pre_fmt} /
> +@option{-stats_enc_post_fmt} / @option{-stats_mux_pre_fmt}.
>  
>  When stats for multiple streams are written into a single file, the lines
>  corresponding to different streams will be interleaved. The precise order of
>  this interleaving is not specified and not guaranteed to remain stable between
>  different invocations of the program, even with the same options.
>  
> -@item -enc_stats_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
> -@item -enc_stats_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
> +@item -stats_enc_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
> +@item -stats_enc_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
>  @item -stats_mux_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
> -Specify the format for the lines written with @option{-enc_stats_pre} /
> -@option{-enc_stats_post} / @option{-stats_mux_pre}.
> +Specify the format for the lines written with @option{-stats_enc_pre} /
> +@option{-stats_enc_post} / @option{-stats_mux_pre}.
>  
>  @var{format_spec} is a string that may contain directives of the form
>  @var{@{fmt@}}. @var{format_spec} is backslash-escaped --- use \@{, \@}, and \\
> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> index ed7ee6ab7d..055275d813 100644
> --- a/fftools/ffmpeg_opt.c
> +++ b/fftools/ffmpeg_opt.c
> @@ -1544,16 +1544,16 @@ const OptionDef options[] = {
>          { .off = OFFSET(bits_per_raw_sample) },
>          "set the number of bits per raw sample", "number" },
>  
> -    { "enc_stats_pre",      HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre)      },
> +    { "stats_enc_pre",      HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre)      },
>          "write encoding stats before encoding" },
> -    { "enc_stats_post",     HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post)     },
> +    { "stats_enc_post",     HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post)     },
>          "write encoding stats after encoding" },
>      { "stats_mux_pre",      HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(mux_stats)          },
>          "write packets stats before muxing" },
> -    { "enc_stats_pre_fmt",  HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre_fmt)  },
> -        "format of the stats written with -enc_stats_pre" },
> -    { "enc_stats_post_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post_fmt) },
> -        "format of the stats written with -enc_stats_post" },
> +    { "stats_enc_pre_fmt",  HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre_fmt)  },
> +        "format of the stats written with -stats_enc_pre" },
> +    { "stats_enc_post_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post_fmt) },
> +        "format of the stats written with -stats_enc_post" },
>      { "stats_mux_pre_fmt",  HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(mux_stats_fmt)      },
>          "format of the stats written with -stats_mux_pre" },

LGTM.
diff mbox series

Patch

diff --git a/Changelog b/Changelog
index bd9fe9922d..11dfd7ef73 100644
--- a/Changelog
+++ b/Changelog
@@ -32,7 +32,7 @@  version <next>:
 - WADY DPCM decoder and demuxer
 - CBD2 DPCM decoder
 - ssim360 video filter
-- ffmpeg CLI new options: -enc_stats_pre[_fmt], -enc_stats_post[_fmt],
+- ffmpeg CLI new options: -stats_enc_pre[_fmt], -stats_enc_post[_fmt],
   -stats_mux_pre[_fmt]
 - hstack_vaapi, vstack_vaapi and xstack_vaapi filters
 - XMD ADPCM decoder and demuxer
diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index 076956d128..d9d4b75567 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -2061,30 +2061,30 @@  encoder/muxer, it does not change the stream to conform to this value. Setting
 values that do not match the stream properties may result in encoding failures
 or invalid output files.
 
-@item -enc_stats_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
-@item -enc_stats_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
+@item -stats_enc_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
+@item -stats_enc_post[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
 @item -stats_mux_pre[:@var{stream_specifier}] @var{path} (@emph{output,per-stream})
 Write per-frame encoding information about the matching streams into the file
 given by @var{path}.
 
-@option{-enc_stats_pre} writes information about raw video or audio frames right
-before they are sent for encoding, while @option{-enc_stats_post} writes
+@option{-stats_enc_pre} writes information about raw video or audio frames right
+before they are sent for encoding, while @option{-stats_enc_post} writes
 information about encoded packets as they are received from the encoder.
 @option{-stats_mux_pre} writes information about packets just as they are about to
 be sent to the muxer. Every frame or packet produces one line in the specified
-file. The format of this line is controlled by @option{-enc_stats_pre_fmt} /
-@option{-enc_stats_post_fmt} / @option{-stats_mux_pre_fmt}.
+file. The format of this line is controlled by @option{-stats_enc_pre_fmt} /
+@option{-stats_enc_post_fmt} / @option{-stats_mux_pre_fmt}.
 
 When stats for multiple streams are written into a single file, the lines
 corresponding to different streams will be interleaved. The precise order of
 this interleaving is not specified and not guaranteed to remain stable between
 different invocations of the program, even with the same options.
 
-@item -enc_stats_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
-@item -enc_stats_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
+@item -stats_enc_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
+@item -stats_enc_post_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
 @item -stats_mux_pre_fmt[:@var{stream_specifier}] @var{format_spec} (@emph{output,per-stream})
-Specify the format for the lines written with @option{-enc_stats_pre} /
-@option{-enc_stats_post} / @option{-stats_mux_pre}.
+Specify the format for the lines written with @option{-stats_enc_pre} /
+@option{-stats_enc_post} / @option{-stats_mux_pre}.
 
 @var{format_spec} is a string that may contain directives of the form
 @var{@{fmt@}}. @var{format_spec} is backslash-escaped --- use \@{, \@}, and \\
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index ed7ee6ab7d..055275d813 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -1544,16 +1544,16 @@  const OptionDef options[] = {
         { .off = OFFSET(bits_per_raw_sample) },
         "set the number of bits per raw sample", "number" },
 
-    { "enc_stats_pre",      HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre)      },
+    { "stats_enc_pre",      HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre)      },
         "write encoding stats before encoding" },
-    { "enc_stats_post",     HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post)     },
+    { "stats_enc_post",     HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post)     },
         "write encoding stats after encoding" },
     { "stats_mux_pre",      HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(mux_stats)          },
         "write packets stats before muxing" },
-    { "enc_stats_pre_fmt",  HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre_fmt)  },
-        "format of the stats written with -enc_stats_pre" },
-    { "enc_stats_post_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post_fmt) },
-        "format of the stats written with -enc_stats_post" },
+    { "stats_enc_pre_fmt",  HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_pre_fmt)  },
+        "format of the stats written with -stats_enc_pre" },
+    { "stats_enc_post_fmt", HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(enc_stats_post_fmt) },
+        "format of the stats written with -stats_enc_post" },
     { "stats_mux_pre_fmt",  HAS_ARG | OPT_SPEC | OPT_EXPERT | OPT_OUTPUT | OPT_STRING, { .off = OFFSET(mux_stats_fmt)      },
         "format of the stats written with -stats_mux_pre" },