[FFmpeg-devel] [PATCH] ffprobe: Support extracting the number of reference frames

Stefano Sabatini stefasab at gmail.com
Tue Dec 30 10:24:56 CET 2014


On date Monday 2014-12-29 12:47:48 +0100, Michael Niedermayer encoded:
> Fixes Ticket3141
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
>  doc/ffprobe.xsd                |    1 +
>  ffprobe.c                      |    1 +
>  tests/ref/fate/ffprobe_compact |    4 ++--
>  tests/ref/fate/ffprobe_csv     |    4 ++--
>  tests/ref/fate/ffprobe_default |    2 ++
>  tests/ref/fate/ffprobe_flat    |    2 ++
>  tests/ref/fate/ffprobe_ini     |    2 ++
>  tests/ref/fate/ffprobe_json    |    2 ++
>  tests/ref/fate/ffprobe_xml     |    4 ++--
>  9 files changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
> index c2cab37..31ca418 100644
> --- a/doc/ffprobe.xsd
> +++ b/doc/ffprobe.xsd
> @@ -182,6 +182,7 @@
>        <xsd:attribute name="color_primaries"      type="xsd:string"/>
>        <xsd:attribute name="chroma_location"      type="xsd:string"/>
>        <xsd:attribute name="timecode"             type="xsd:string"/>
> +      <xsd:attribute name="ref_frames"           type="xsd:int"/>
>  
>        <!-- audio attributes -->
>        <xsd:attribute name="sample_fmt"       type="xsd:string"/>
> diff --git a/ffprobe.c b/ffprobe.c
> index 24ecafd..456ffbd 100644
> --- a/ffprobe.c
> +++ b/ffprobe.c
> @@ -2141,6 +2141,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
>              } else {
>                  print_str_opt("timecode", "N/A");
>              }
> +            print_int("ref_frames", dec_ctx->refs);

Nit: I'd prefer to keep the same name as in the AVCodecContext, so
that hit's easier to map ffprobe output to the various fields. On the
other hand the new name is more meaningful.

[...]

Patch looks good, thanks.
-- 
FFmpeg = Faithful Fantastic Muttering Philosofic EnGraver


More information about the ffmpeg-devel mailing list