From patchwork Mon May 25 13:12:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 19850 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0B6A344AB13 for ; Mon, 25 May 2020 16:13:05 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DC90368834D; Mon, 25 May 2020 16:13:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.red.khirnov.net (unknown [176.97.15.10]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7818C680890 for ; Mon, 25 May 2020 16:12:58 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail.red.khirnov.net (Postfix) with ESMTP id BC22B28A680 for ; Mon, 25 May 2020 15:12:57 +0200 (CEST) Received: from mail.red.khirnov.net ([IPv6:::1]) by localhost (mail.red.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id XVbPYFwOLjYe for ; Mon, 25 May 2020 15:12:54 +0200 (CEST) Received: from quelana.khirnov.net (quelana.khirnov.net [IPv6:2a00:c500:561:200::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "quelana.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail.red.khirnov.net (Postfix) with ESMTPS id CCD1628A67F for ; Mon, 25 May 2020 15:12:53 +0200 (CEST) Received: from localhost (quelana.khirnov.net [IPv6:::1]) by quelana.khirnov.net (Postfix) with ESMTP id E857520279 for ; Mon, 25 May 2020 15:12:48 +0200 (CEST) Received: from quelana.khirnov.net ([IPv6:::1]) by localhost (quelana.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id zNjn0jODmvkZ for ; Mon, 25 May 2020 15:12:48 +0200 (CEST) Received: from libav.daenerys.khirnov.net (libav.daenerys.khirnov.net [IPv6:2a00:c500:561:201::7]) by quelana.khirnov.net (Postfix) with ESMTP id 0119722DCD for ; Mon, 25 May 2020 15:12:31 +0200 (CEST) Received: by libav.daenerys.khirnov.net (Postfix, from userid 1000) id A909220E0099; Mon, 25 May 2020 15:12:27 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 25 May 2020 15:12:16 +0200 Message-Id: <20200525131216.17444-3-anton@khirnov.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200525131216.17444-1-anton@khirnov.net> References: <20200525131216.17444-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec.h: move avcodec_get_{type, name} to codec_id.h X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavcodec/avcodec.h | 11 ----------- libavcodec/codec_id.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 4f46a1fb2e..01099bc8cd 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4115,17 +4115,6 @@ attribute_deprecated int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); #endif -/** - * Get the type of the given codec. - */ -enum AVMediaType avcodec_get_type(enum AVCodecID codec_id); - -/** - * Get the name of a codec. - * @return a static string identifying the codec; never NULL - */ -const char *avcodec_get_name(enum AVCodecID id); - /** * @return a positive value if s is open (i.e. avcodec_open2() was called on it * with no corresponding avcodec_close()), 0 otherwise. diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index e95737c0a2..f7cb0a6056 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -21,6 +21,8 @@ #ifndef AVCODEC_CODEC_ID_H #define AVCODEC_CODEC_ID_H +#include "libavutil/avutil.h" + /** * @addtogroup lavc_core * @{ @@ -556,6 +558,16 @@ enum AVCodecID { AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001, ///< Passthrough codec, AVFrames wrapped in AVPacket }; +/** + * Get the type of the given codec. + */ +enum AVMediaType avcodec_get_type(enum AVCodecID codec_id); + +/** + * Get the name of a codec. + * @return a static string identifying the codec; never NULL + */ +const char *avcodec_get_name(enum AVCodecID id); /** * @}