[FFmpeg-devel] [PATCH 3/3] avcodec.h: split AVCodecDescriptor API into its own header

James Almer jamrial at gmail.com
Wed Apr 8 16:28:34 EEST 2020


On 4/8/2020 4:42 AM, Anton Khirnov wrote:
> ---
>  doc/APIchanges          |   3 +-
>  libavcodec/avcodec.h    |  92 +----------------------------
>  libavcodec/codec_desc.c |   4 +-
>  libavcodec/codec_desc.h | 128 ++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 134 insertions(+), 93 deletions(-)
>  create mode 100644 libavcodec/codec_desc.h
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 74b18755e1..4cc2367e69 100644
> --- a/doc/APIchanges
> +++ b/doc/APIchanges
> @@ -15,7 +15,8 @@ libavutil:     2017-10-21
>  
>  API changes, most recent first:
>  
> -2020-xx-xx - xxxxxxxxxx - lavc 58.78.100 - avcodec.h codec_id.h packet.h
> +2020-xx-xx - xxxxxxxxxx - lavc 58.78.100 - avcodec.h codec_desc.h codec_id.h packet.h
> +  Move AVCodecDesc-related public API to new header codec_desc.h.
>    Move AVCodecID enum to new header codec_id.h.
>    Move AVPacket-related public API to new header packet.h.
>  

[...]

> diff --git a/libavcodec/codec_desc.h b/libavcodec/codec_desc.h
> new file mode 100644
> index 0000000000..413a117f48
> --- /dev/null
> +++ b/libavcodec/codec_desc.h
> @@ -0,0 +1,128 @@
> +/*
> + * Codec descriptors public API
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +#ifndef AVCODEC_CODEC_DESC_H
> +#define AVCODEC_CODEC_DESC_H
> +
> +#include "libavutil/avutil.h"
> +
> +#include "codec_id.h"
> +
> +/**
> + * @addtogroup libavc
> + * @{

Same as Patch 2/3.

LGTM otherwise. Much cleaner now, like lavu's pixfmt/pixdesc.


More information about the ffmpeg-devel mailing list