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 CFCE04C08D for ; Sun, 21 Jul 2024 22:49:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CBEAB68D691; Mon, 22 Jul 2024 01:49:13 +0300 (EEST) Received: from mr85p00im-hyfv06011301.me.com (mr85p00im-hyfv06011301.me.com [17.58.23.184]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0495568D592 for ; Mon, 22 Jul 2024 01:49:07 +0300 (EEST) Received: from smtpclient.apple (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-hyfv06011301.me.com (Postfix) with ESMTPSA id 54C69180C01E for ; Sun, 21 Jul 2024 22:49:02 +0000 (UTC) Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Date: Mon, 22 Jul 2024 06:48:50 +0800 References: To: FFmpeg development discussions and patches In-Reply-To: Message-Id: <9411EBF1-04ED-4B7C-8B67-EAA518B2BCBC@me.com> X-Mailer: Apple Mail (2.3774.600.62) X-Proofpoint-GUID: XJTDDwe1ITTEKAZlVVXQQG06uCwWRUfI X-Proofpoint-ORIG-GUID: XJTDDwe1ITTEKAZlVVXQQG06uCwWRUfI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-21_20,2024-07-18_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 clxscore=1015 mlxlogscore=999 malwarescore=0 mlxscore=0 bulkscore=0 adultscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2407210180 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Fix build with older SDKs 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: , From: Gnattu OC via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Gnattu OC 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: > On Jul 22, 2024, at 06:45, Gnattu OC via ffmpeg-devel wrote: > > > >> On Jul 22, 2024, at 06:04, Sean McGovern wrote: >> >> Hi Marvin, >> >> >> On Tue, Jul 9, 2024, 10:47 Marvin Scholz wrote: >> >>> I've accidentally used API not available on the checked version. >>> Additionally check for the SDK to be new enough to even have the >>> CVImageBufferCreateColorSpaceFromAttachments API to not fail >>> the build. >>> --- >>> libavutil/hwcontext_videotoolbox.c | 15 ++++++++++++++- >>> 1 file changed, 14 insertions(+), 1 deletion(-) >>> >>> diff --git a/libavutil/hwcontext_videotoolbox.c >>> b/libavutil/hwcontext_videotoolbox.c >>> index 953155ce32..ab7556936d 100644 >>> --- a/libavutil/hwcontext_videotoolbox.c >>> +++ b/libavutil/hwcontext_videotoolbox.c >>> @@ -588,13 +588,26 @@ static int vt_pixbuf_set_colorspace(void *log_ctx, >>> } else >>> CVBufferRemoveAttachment(pixbuf, kCVImageBufferGammaLevelKey); >>> >>> +#if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED >= 100800) || \ >>> + (TARGET_OS_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000) >>> if (__builtin_available(macOS 10.8, iOS 10, *)) { >>> - CFDictionaryRef attachments = CVBufferCopyAttachments(pixbuf, >>> kCVAttachmentMode_ShouldPropagate); >>> + CFDictionaryRef attachments = NULL; >>> + if (__builtin_available(macOS 12.0, iOS 15.0, *)) >>> + attachments = CVBufferCopyAttachments(pixbuf, >>> kCVAttachmentMode_ShouldPropagate); >>> +#if (TARGET_OS_OSX && __MAC_OS_X_VERSION_MIN_REQUIRED <= 120000) || \ >>> + (TARGET_OS_IOS && __IPHONE_OS_VERSION_MIN_REQUIRED <= 150000) >>> + else { >>> + CFDictionaryRef tmp = CVBufferGetAttachments(pixbuf, >>> kCVAttachmentMode_ShouldPropagate); >>> + if (tmp) >>> + attachments = CFDictionaryCreateCopy(NULL, tmp); >>> + } >>> +#endif >>> if (attachments) { >>> colorspace = >>> CVImageBufferCreateColorSpaceFromAttachments(attachments); >>> CFRelease(attachments); >>> } >>> } >>> +#endif >>> >>> if (colorspace) { >>> CVBufferSetAttachment(pixbuf, kCVImageBufferCGColorSpaceKey, >>> >>> base-commit: 9fb8d13d56f20728141fd7070d8a325720727d57 >>> -- >>> 2.39.3 (Apple Git-146) >>> _______________________________________________ >>> 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". >>> >> >> Should this have fixed the Apple M1 FATE node [1]? It seems to be still >> failing. >> >> -- Sean McGovern >> >> [1] https://fate.ffmpeg.org/history.cgi?slot=aarch64-osx-clang-1200.0.32.29 > > I sent another patch that does the availability check at configure time which should fix the fate CI: > https://ffmpeg.org//pipermail/ffmpeg-devel/2024-July/331496.html > Sorry, should be this one: https://ffmpeg.org//pipermail/ffmpeg-devel/2024-July/331499.html >> >>> >> _______________________________________________ >> 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". > > _______________________________________________ > 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". _______________________________________________ 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".