[FFmpeg-devel] [PATCH] fftools/frobe: print crop_* frame fields

Stefano Sabatini stefasab at gmail.com
Sun Mar 26 22:36:34 EEST 2023


Nit: "fprobe" typo

On date Sunday 2023-03-26 16:30:40 -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  doc/ffprobe.xsd                    |   4 +
>  fftools/ffprobe.c                  |   4 +
>  tests/ref/fate/exif-image-embedded |   4 +
>  tests/ref/fate/exif-image-jpg      |   4 +
>  tests/ref/fate/exif-image-tiff     |   4 +
>  tests/ref/fate/exif-image-webp     |   4 +
>  tests/ref/fate/ffprobe_compact     |  16 ++--
>  tests/ref/fate/ffprobe_csv         |  16 ++--
>  tests/ref/fate/ffprobe_default     |  32 +++++++
>  tests/ref/fate/ffprobe_flat        |  32 +++++++
>  tests/ref/fate/ffprobe_ini         |  32 +++++++
>  tests/ref/fate/ffprobe_json        |  32 +++++++
>  tests/ref/fate/ffprobe_xml         |  16 ++--
>  tests/ref/fate/ffprobe_xsd         |  16 ++--
>  tests/ref/fate/h264-dts_5frames    |  20 +++++
>  tests/ref/fate/jpg-icc             |   4 +
>  tests/ref/fate/mov-zombie          | 130 ++++++++++++++---------------
>  tests/ref/fate/png-icc             |   4 +
>  tests/ref/fate/png-side-data       |   4 +
>  19 files changed, 281 insertions(+), 97 deletions(-)
> 
> diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
> index 0920380108..87ca265d63 100644
> --- a/doc/ffprobe.xsd
> +++ b/doc/ffprobe.xsd
> @@ -106,6 +106,10 @@
>        <!-- video attributes -->
>        <xsd:attribute name="width"                  type="xsd:long"  />
>        <xsd:attribute name="height"                 type="xsd:long"  />
> +      <xsd:attribute name="crop_top"               type="xsd:long"  />
> +      <xsd:attribute name="crop_bottom"            type="xsd:long"  />
> +      <xsd:attribute name="crop_left"              type="xsd:long"  />
> +      <xsd:attribute name="crop_right"             type="xsd:long"  />
>        <xsd:attribute name="pix_fmt"                type="xsd:string"/>
>        <xsd:attribute name="sample_aspect_ratio"    type="xsd:string"/>
>        <xsd:attribute name="pict_type"              type="xsd:string"/>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index 561b514f0b..d6e5a79c7e 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -2620,6 +2620,10 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
>      case AVMEDIA_TYPE_VIDEO:
>          print_int("width",                  frame->width);
>          print_int("height",                 frame->height);
> +        print_int("crop_top",               frame->crop_top);
> +        print_int("crop_bottom",            frame->crop_bottom);
> +        print_int("crop_left",              frame->crop_left);
> +        print_int("crop_right",             frame->crop_left);

LGTM, thanks.


More information about the ffmpeg-devel mailing list