Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] videotoolbox: Add SDK ifdefs for use of kVTVideoDecoderReferenceMissingErr
Date: Tue, 25 Mar 2025 18:16:38 +0800
Message-ID: <tencent_4B2D019A3B40B59ADA9F5AABC44ED0702908@qq.com> (raw)
In-Reply-To: <20250325100132.57710-1-martin@martin.st>


> 在 2025年3月25日,下午6:01,Martin Storsjö <martin@martin.st> 写道:
> 
> This error constant was only added in the macOS 12 and iOS 15
> SDKs.
> 
> If building with an older SDK, assume that the error doesn't
> match this constant.
> 
> This fixes build errors with older SDKs after
> c6214b0d691566c7cb0f2ff5be08a24c3534e5bb.
> 
> As this constant is declared unconditionally (without any target
> version guards) in the headers, one can't reproduce this issue
> while building with a newer SDK and targeting an older version
> with -mmacosx-version-min=.
> 
> Technically, checking just one of MAC_OS_VERSION_12_0 and
> __IPHONE_15_0 is enough; the macOS SDKs and iOS SDKs share these
> files, so files from a similar point in time do have the same
> defines. Therefore, we don't really need to expand this with
> checks for tvOS, watchOS and other OS variants.
> ---
> libavcodec/videotoolbox.c | 5 +++++
> 1 file changed, 5 insertions(+)
> 
> diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
> index aaa6129576..7f7b910b26 100644
> --- a/libavcodec/videotoolbox.c
> +++ b/libavcodec/videotoolbox.c
> @@ -728,8 +728,13 @@ static void videotoolbox_decoder_callback(void *opaque,
>     }
> 
>     if (!image_buffer) {
> +#if defined(MAC_OS_VERSION_12_0) || defined(__IPHONE_15_0)
> +        // kVTVideoDecoderReferenceMissingErr was defined in the macOS 12/iOS 15 SDK
>         if (status != kVTVideoDecoderReferenceMissingErr)
>             vtctx->reconfig_needed = true;
> +#else
> +        vtctx->reconfig_needed = true;
> +#endif

I used its numeric value initially, but after checking the doc,

kVTVideoDecoderReferenceMissingErr
iOS 6.0+
iPadOS 6.0+
Mac Catalyst 13.0+
macOS 10.8+
tvOS 10.2+
visionOS 1.0+













I replaced it with the enum.

Now I wondering what does this macOS 10.8 mean.

Anyway, can we use the numeric value here?

> 
>         av_log(vtctx->logctx, status ? AV_LOG_WARNING : AV_LOG_DEBUG,
>                "vt decoder cb: output image buffer is null: %i, reconfig %d\n",
> --
> 2.39.5 (Apple Git-154)
> 
> _______________________________________________
> 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".

  reply	other threads:[~2025-03-25 10:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 10:01 Martin Storsjö
2025-03-25 10:16 ` Zhao Zhili [this message]
2025-03-25 10:46   ` Martin Storsjö
2025-03-25 11:30     ` Zhao Zhili
2025-03-25 11:33       ` Martin Storsjö

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_4B2D019A3B40B59ADA9F5AABC44ED0702908@qq.com \
    --to=quinkblack-at-foxmail.com@ffmpeg.org \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git