From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 2509543527 for ; Thu, 15 Sep 2022 13:59:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DDED868BBA5; Thu, 15 Sep 2022 16:59:15 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DF91068B7DE for ; Thu, 15 Sep 2022 16:59:09 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 0247E240D1A for ; Thu, 15 Sep 2022 15:59:09 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id lLTeIa_TCzzv for ; Thu, 15 Sep 2022 15:59:08 +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 D7544240D03 for ; Thu, 15 Sep 2022 15:59:07 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 67DE53A0D7F; Thu, 15 Sep 2022 15:58:58 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 15 Sep 2022 15:56:28 +0200 Message-Id: <20220915135627.32230-2-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220915135627.32230-1-anton@khirnov.net> References: <20220915135627.32230-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] lavc/videotoolbox: deprecate write-only output_callback 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This field has never been used for anything, so stop setting it and deprecate it. --- libavcodec/version_major.h | 1 + libavcodec/videotoolbox.c | 2 -- libavcodec/videotoolbox.h | 5 +++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h index 1ec815a7bc..d9386792de 100644 --- a/libavcodec/version_major.h +++ b/libavcodec/version_major.h @@ -51,5 +51,6 @@ #define FF_API_IDCT_NONE (LIBAVCODEC_VERSION_MAJOR < 60) #define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) #define FF_API_AYUV_CODECID (LIBAVCODEC_VERSION_MAJOR < 60) +#define FF_API_VT_OUTPUT_CALLBACK (LIBAVCODEC_VERSION_MAJOR < 60) #endif /* AVCODEC_VERSION_MAJOR_H */ diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index d61d310600..1b1be8ddb4 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -1377,8 +1377,6 @@ static AVVideotoolboxContext *av_videotoolbox_alloc_context_with_pix_fmt(enum AV AVVideotoolboxContext *ret = av_mallocz(sizeof(*ret)); if (ret) { - ret->output_callback = videotoolbox_decoder_callback; - OSType cv_pix_fmt_type = av_map_videotoolbox_format_from_pixfmt2(pix_fmt, full_range); if (cv_pix_fmt_type == 0) { cv_pix_fmt_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange; diff --git a/libavcodec/videotoolbox.h b/libavcodec/videotoolbox.h index af2db0d580..fd8a5b7982 100644 --- a/libavcodec/videotoolbox.h +++ b/libavcodec/videotoolbox.h @@ -37,6 +37,8 @@ #include "libavcodec/avcodec.h" +#include "libavutil/attributes.h" + /** * This struct holds all the information that needs to be passed * between the caller and libavcodec for initializing Videotoolbox decoding. @@ -50,11 +52,14 @@ typedef struct AVVideotoolboxContext { */ VTDecompressionSessionRef session; +#if FF_API_VT_OUTPUT_CALLBACK /** * The output callback that must be passed to the session. * Set by av_videottoolbox_default_init() */ + attribute_deprecated VTDecompressionOutputCallback output_callback; +#endif /** * CVPixelBuffer Format Type that Videotoolbox will use for decoded frames. -- 2.35.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".