From patchwork Thu Feb 25 20:37:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 25992 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 50CFB44B4CB for ; Thu, 25 Feb 2021 22:44:06 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2A79268A2BB; Thu, 25 Feb 2021 22:44:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 565C268065D for ; Thu, 25 Feb 2021 22:43:59 +0200 (EET) Received: by mail-pj1-f52.google.com with SMTP id l18so4288317pji.3 for ; Thu, 25 Feb 2021 12:43:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=/svhUbeiT2rfW2iLYxR4sniZ36LsjX+uUiEyTdoSxX8=; b=rsoPz3emgcu8ZL8bKlnqu+JdnyGarF3fsubxsi++frUYpeWwrAcPyjHb1GatOyT+Mk u4SA17SOClna2+3H+shXMiO/RUeQ0IV68ATdiYYE0BunZThs1PMIXNjhRR3dgM4FWM4f sw+cS2oLOIGHISNvMc1+ibbR8s01EsaXB3PbS39U/Ot2qwcxxS+1gum0+Oy5wghj/gco aHdozlV7R4bydR/l+mkVKey/QZsbf4BGtiydYhkMabs7A7ebFjqXWPUMeFD5iZwZ3Fk0 aRr5weZTV05JRDtNyCFm+8rlmwaErMg98bdctmsG+bGBulDYVDKzHmQt3pajvqzS/R4l yDQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=/svhUbeiT2rfW2iLYxR4sniZ36LsjX+uUiEyTdoSxX8=; b=ZAC2SIpeBuFe8nc6O4Xx8xpfG+ix0+4e0Gf8k0rB+FulcnlcwoUDLykT5SHpz1+U8C vd1INR1rvgt/ThqX9V97xvoDLF/ph4Tno3CpfERzQyMnJCb3SBlI1xe0z2WPz2pjwwS+ 0YrgSFGlvK1QAzt1GYskrfPnJgyr0BnUcTMoZHxfrfVvBt2NvCkuiNo6hSm30sQ/Fxhe h9QCEfkvngUBvsfe0ka5kPJ724aZjKMXiN6VF7u/+lBq84k4VxD7A7zZE2vsO3pHDfC8 R6ahTwdQfP74EL3hEEWs9lXrhU6rhk9rl8buVDDyOddvL3vtIetEF0LWfW8JqEG0HMal 00qw== X-Gm-Message-State: AOAM532TVfHdnLGvmDq5KnJFZsAKKAIgjjMlkIlLAeMnJ1PDs+9LG3cw 6sC6Y5fq45/VI3ZbX1zOBHWsMEOsqy8= X-Google-Smtp-Source: ABdhPJxWTwwb+brrHZ4u1HsoG3RxvGNXbbEYJFnCETaMNZvFUgnwsVYkMudt8tJo/loyg+3nOXrl6w== X-Received: by 2002:a05:6214:209:: with SMTP id i9mr4844360qvt.4.1614285464434; Thu, 25 Feb 2021 12:37:44 -0800 (PST) Received: from localhost.localdomain ([181.23.89.132]) by smtp.gmail.com with ESMTPSA id w5sm4186485qta.45.2021.02.25.12.37.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Feb 2021 12:37:43 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 25 Feb 2021 17:37:28 -0300 Message-Id: <20210225203728.2106-1-jamrial@gmail.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/options: deprecate avcodec_get_frame_class() 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" AVFrame hasn't been a struct defined in libavcodec for a decade now, when it was moved to libavutil. Found-by: mkver Signed-off-by: James Almer --- libavcodec/avcodec.h | 8 ++++---- libavcodec/options.c | 2 ++ libavcodec/version.h | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index ddca770cc4..f1380e0c4c 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2770,13 +2770,13 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec); */ const AVClass *avcodec_get_class(void); +#if FF_API_GET_FRAME_CLASS /** - * Get the AVClass for AVFrame. It can be used in combination with - * AV_OPT_SEARCH_FAKE_OBJ for examining options. - * - * @see av_opt_find(). + * @deprecated This function should not be used. */ +attribute_deprecated const AVClass *avcodec_get_frame_class(void); +#endif /** * Get the AVClass for AVSubtitleRect. It can be used in combination with diff --git a/libavcodec/options.c b/libavcodec/options.c index ff16e2cbfd..6e904b61d8 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -312,6 +312,7 @@ const AVClass *avcodec_get_class(void) return &av_codec_context_class; } +#if FF_API_GET_FRAME_CLASS #define FOFFSET(x) offsetof(AVFrame,x) static const AVOption frame_options[]={ @@ -338,6 +339,7 @@ const AVClass *avcodec_get_frame_class(void) { return &av_frame_class; } +#endif #define SROFFSET(x) offsetof(AVSubtitleRect,x) diff --git a/libavcodec/version.h b/libavcodec/version.h index e5a5ec8abc..2962d94df2 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -150,5 +150,8 @@ #ifndef FF_API_DEBUG_MV #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60) #endif +#ifndef FF_API_GET_FRAME_CLASS +#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60) +#endif #endif /* AVCODEC_VERSION_H */