From patchwork Mon May 31 10:18:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 28020 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2742357iof; Mon, 31 May 2021 03:19:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfVTFZN5tNDxc4ihjx57Bm9hw4tXXcNbiv/CBVViuDS/KypPwL0TVoX5HTlrMTsAlLESbN X-Received: by 2002:a17:906:2dca:: with SMTP id h10mr21998407eji.507.1622456366186; Mon, 31 May 2021 03:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622456366; cv=none; d=google.com; s=arc-20160816; b=Nvx1fnkC138RbcJIx3OUD1D2M/aLVmEpSdtthR0f9TpSIjvc8vx2PrHNaRb9nupmM/ 6iMoc310GvrR1FkPkzN2do7tzZuDOgxxAk1goUfoW0aTto6wI2bLcJI0bkpzVplwPP2G KXiTfBwsCbOfEj15+3+8dXIt0IkZrDZzMieSVjls3mh5sTZDDlYCriV3XT9mWFIH+UHK vLpZFJ+IelCB3qEH0nfcEjlFtuko/nTRumOtnSvR7rFrxuOT9wIiOLVDcszmjyzkv1z0 ULbsznGfe+OpL7u4Xs3cz1/8SHkbxEDZ8tW+VUgf8aWXwT+dxB5RMeybd6x5yfIVX8Br BaGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=vtQuiqmZMWqgwQWsKSa5eFi6jpTz2Cal0nwitEZ3zsg=; b=EQN7FrxhWiJQDV3QUelzgvfvpsxpv9apsZqy3sr4Ss0hiwEQLSekXAJJVhJXtDu/yA 7T4RYwcfWCTVwHy2ZHjNb1MDmw9stldkez6DO3IKERaJMX9npQJ08TDtdQTYNIswHl7B urvHJ8vWM7WiAHjGvkoe0asnaJsFBZmH4PGeNakSei+ntDaciwtQuuIDrVXSYJjZq1h+ rQk7m6DuNoVHT5z6gDWyEzm5/FUA04VPOuGXU4MfriiunoGP8koQZQSpXboLcwYnsdGd rMV3w3fbuO5Ka4LlH1XJlRjuvlrPEp11bdtSfB/XVY3tTFPVcRTKg1liupf9jCfbpMw/ ekkg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id l14si10611314edb.409.2021.05.31.03.19.25; Mon, 31 May 2021 03:19:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D570368834B; Mon, 31 May 2021 13:19:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3BCC268812C for ; Mon, 31 May 2021 13:19:15 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 7C314240477 for ; Mon, 31 May 2021 12:19:14 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id mRYXY--zZuRb for ; Mon, 31 May 2021 12:19:14 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (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 "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id EB5DC240476 for ; Mon, 31 May 2021 12:19:13 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id D631C3A125B; Mon, 31 May 2021 12:19:13 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 May 2021 12:18:43 +0200 Message-Id: <20210531101843.5476-1-anton@khirnov.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210523180515.GX4777@pb2> References: <20210523180515.GX4777@pb2> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc: move av_get_pcm_codec() from avcodec.h to codec_id.h X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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" X-TUID: JE/ZGL+ABXVt --- doc/APIchanges | 3 ++- libavcodec/avcodec.h | 8 -------- libavcodec/codec_id.h | 9 +++++++++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 731d55f10d..71095ac78e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -16,7 +16,8 @@ API changes, most recent first: 2021-xx-xx - xxxxxxxxxx - lavc 59.1.100 - avcodec.h codec_id.h Move av_get_bits_per_sample(), av_get_exact_bits_per_sample(), - and avcodec_profile_name() from avcodec.h to codec_id.h. + avcodec_profile_name(), and av_get_pcm_codec() from avcodec.h + to codec_id.h. 2021-xx-xx - xxxxxxxxxx - lavc 59.1.100 - avcodec.h defs.h Add new installed header defs.h. The following definitions are moved diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 3787504ec3..c30c035532 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3111,14 +3111,6 @@ int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels, */ void avcodec_flush_buffers(AVCodecContext *avctx); -/** - * Return the PCM codec associated with a sample format. - * @param be endianness, 0 for little, 1 for big, - * -1 (or anything else) for native - * @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE - */ -enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be); - /** * Return audio frame duration. * diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 3b1a71f8ea..d49f9af36c 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -22,6 +22,7 @@ #define AVCODEC_CODEC_ID_H #include "libavutil/avutil.h" +#include "libavutil/samplefmt.h" /** * @addtogroup lavc_core @@ -611,6 +612,14 @@ int av_get_exact_bits_per_sample(enum AVCodecID codec_id); */ const char *avcodec_profile_name(enum AVCodecID codec_id, int profile); +/** + * Return the PCM codec associated with a sample format. + * @param be endianness, 0 for little, 1 for big, + * -1 (or anything else) for native + * @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE + */ +enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be); + /** * @} */