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 8471D407E8 for ; Sun, 21 Jul 2024 22:04:32 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D12B468D69C; Mon, 22 Jul 2024 01:04:29 +0300 (EEST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B6B3068D535 for ; Mon, 22 Jul 2024 01:04:23 +0300 (EEST) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-52f008aa351so944796e87.0 for ; Sun, 21 Jul 2024 15:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721599462; x=1722204262; darn=ffmpeg.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=kDT2Nq8lwZrg93Tu483ekiKVJZK3GvUjkzl5fHKyx1w=; b=auHMrY0/3h5buUbEsBIxjpJ+RGEGPkhw0Ft4ulBBcES0fqQDuLa8AiGVQjAllnip/w 2eU/P+9X45R2p58wGy/bUUUxts8QKdDcGC/nmDRJPz2n468TdhP0Us2unLd1k/xVrcAK 1xDVZ9rzxsQBQ00tq3a+Uh1uzd8UC2t1hW7w0BP52PPZX2B7Z0ETEeISVmqJzXjl+bGA qrCjtvsiBYU6ZQpbh/4Jd+4xbje49/pRkF+cEddJ8uf4gTNK0xUzgbyBME3bIc1tRwDr gjOl+v+W8GonYHSJ29ylzwUZgZUNEIm/F16LeWBgoI64dDJuGVdEUoFJwCUVwuTAiZ8K uSEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721599462; x=1722204262; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kDT2Nq8lwZrg93Tu483ekiKVJZK3GvUjkzl5fHKyx1w=; b=FYr2D/10LUBU7WdDbVpJd3SuXVibuaPJ+dl4/d8M8AAngVNgR9fSfF2c0G1Gsp5olk Xf4FGn7XiO2t3vVyeASFUqBwTCAU5ZP/YONtMxCsE/keUSL/iDsnfZS9vEOZl+esg+7v gue5PW97tUGQN7c6Px0KWRr0xSc6m5o9Ng5ayQQ3AbijHywzC2YNwtRKaOy508Nn916A lMTRumDD0qP3H5vNiyjFQScKoT3sp0p+ECpK65q1F1rhUO9VAdPXJXvX68f6wo5hRx14 0RraSxSVj2+o0Tzh/c3q2l2rVD/nBQws+f2H4K1Q6jpKd/9czL6uG5ESEnKa6CPv/0xu 308Q== X-Gm-Message-State: AOJu0YyJUyRaAtHaelelXcdD+ZpKbPoDPNt8IwCo9E1McA+vntwtE1q1 UIU8VaeH6ENpe5THU8M//n0UdDvzs7fxLnKKyZDd0GtnXx97z2ehtgo7ImT5M3BunrXjkxyFuE1 krREDraHAnLI5Oju/zxZt3QULsulAGw== X-Google-Smtp-Source: AGHT+IEKC0dVJJeinFAvLxQMboZn62RaKbULZ4nbGBi3k3yqHSxbBJmTJQC/mUYlsBsHKI8nnTeolQloPG90yPkLNRs= X-Received: by 2002:a05:6512:1047:b0:52e:767a:ada7 with SMTP id 2adb3069b0e04-52efb7ef644mr2882733e87.50.1721599461901; Sun, 21 Jul 2024 15:04:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sean McGovern Date: Sun, 21 Jul 2024 18:04:11 -0400 Message-ID: To: FFmpeg development discussions and patches 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: , 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: 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 > _______________________________________________ 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".