<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/d2f9f6bb49a41d643b1c975e2bcfd6805e0ca2d5">https://github.com/macports/macports-ports/commit/d2f9f6bb49a41d643b1c975e2bcfd6805e0ca2d5</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new d2f9f6bb49a ffmpeg6: add upstream patch, for earlier macOS releases
</span>d2f9f6bb49a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit d2f9f6bb49a41d643b1c975e2bcfd6805e0ca2d5
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Tue Apr 2 13:41:37 2024 -0400
<span style='display:block; white-space:pre;color:#404040;'> ffmpeg6: add upstream patch, for earlier macOS releases
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> - Failure Specifics: error: use of undeclared identifier 'kVTCompressionPropertyKey_EncoderID'
</span><span style='display:block; white-space:pre;color:#404040;'> - Note: Since this patch is applied unconditionally, rev-bump to rebuild across-the-board.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/68720
</span>---
multimedia/ffmpeg6/Portfile | 6 +-
multimedia/ffmpeg6/files/patch-issue-10695.diff | 146 ++++++++++++++++++++++++
2 files changed, 151 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/Portfile b/multimedia/ffmpeg6/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d08cfa85006..d48d07ebe9f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/multimedia/ffmpeg6/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -17,7 +17,7 @@ name ffmpeg6
</span> set my_name ffmpeg
version 6.1.1
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> epoch 0
license LGPL-2.1+
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -109,6 +109,10 @@ patchfiles-append patch-libavcodec-profvidworkflow.diff
</span> # TODO: Raise the issue to upstream
patchfiles-append patch-libavcodec-librsvgdec.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.macports.org/ticket/68720
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Remove once upstream has included these in the next release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-issue-10695.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # enable auto configure of asm optimizations
# requires Xcode 3.1 or better on Leopard
minimum_xcodeversions {9 3.1}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg6/files/patch-issue-10695.diff b/multimedia/ffmpeg6/files/patch-issue-10695.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..77f48758219
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg6/files/patch-issue-10695.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,146 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#==================================================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Patches for ffmpeg6 build issues, on macOS 10.12 and earlier. Specifically related to use of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# identifier 'kVTCompressionPropertyKey_EncoderID', when targeting macOS < 10.13.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Upstream Ticket: https://trac.ffmpeg.org/ticket/10695
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# MacPorts Ticket: https://trac.macports.org/ticket/68720
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Note that this patch includes two upstream commits:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - https://github.com/FFmpeg/FFmpeg/commit/cb049d377f54f6b747667a93e4b719380c3e9475.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# - https://github.com/FFmpeg/FFmpeg/commit/d526a34c20647f54a2cd8f5871b7dc24214578fe.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#==================================================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From cb049d377f54f6b747667a93e4b719380c3e9475 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Zhao Zhili <zhilizhao@tencent.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sat, 25 Nov 2023 12:06:01 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] avcodec/videotoolboxenc: Fix build failure due to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PropertyKey_EncoderID
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavcodec/videotoolboxenc.c | 4 +++-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 3 insertions(+), 1 deletion(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b0e827d14a8b5..b8a07e4e44273 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavcodec/videotoolboxenc.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavcodec/videotoolboxenc.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -119,6 +119,7 @@ static struct{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef kVTCompressionPropertyKey_TargetQualityForAlpha;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef kVTCompressionPropertyKey_ConstantBitRate;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFStringRef kVTCompressionPropertyKey_EncoderID;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef kVTVideoEncoderSpecification_RequireHardwareAcceleratedVideoEncoder;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -191,6 +192,7 @@ static void loadVTEncSymbols(void){
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GET_SYM(kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "PrioritizeEncodingSpeedOverQuality");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GET_SYM(kVTCompressionPropertyKey_ConstantBitRate, "ConstantBitRate");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ GET_SYM(kVTCompressionPropertyKey_EncoderID, "EncoderID");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GET_SYM(kVTVideoEncoderSpecification_EnableHardwareAcceleratedVideoEncoder,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "EnableHardwareAcceleratedVideoEncoder");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1178,7 +1180,7 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef encoderID = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ status = VTSessionCopyProperty(vtctx->session,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- kVTCompressionPropertyKey_EncoderID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compat_keys.kVTCompressionPropertyKey_EncoderID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kCFAllocatorDefault,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ &encoderID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (status == noErr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From d526a34c20647f54a2cd8f5871b7dc24214578fe Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Zhao Zhili <zhilizhao@tencent.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sat, 25 Nov 2023 12:06:02 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] avcodec/videotoolboxenc: refactor dump encoder name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libavcodec/videotoolboxenc.c | 65 +++++++++++++++++++++---------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 38 insertions(+), 27 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index b8a07e4e44273..fbd33fd3f965c 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavcodec/videotoolboxenc.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavcodec/videotoolboxenc.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -280,6 +280,41 @@ typedef struct VTEncContext {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int max_ref_frames;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } VTEncContext;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static int vt_dump_encoder(AVCodecContext *avctx)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ VTEncContext *vtctx = avctx->priv_data;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFStringRef encoder_id = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int status;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFIndex length, max_size;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char *name;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ status = VTSessionCopyProperty(vtctx->session,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ compat_keys.kVTCompressionPropertyKey_EncoderID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ kCFAllocatorDefault,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ &encoder_id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ // OK if not supported
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (status != noErr)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ length = CFStringGetLength(encoder_id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_size = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ name = av_malloc(max_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!name) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFRelease(encoder_id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return AVERROR(ENOMEM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFStringGetCString(encoder_id,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ kCFStringEncodingUTF8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ av_log(avctx, AV_LOG_DEBUG, "Init the encoder: %s\n", name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ av_freep(&name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ CFRelease(encoder_id);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int vtenc_populate_extradata(AVCodecContext *avctx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CMVideoCodecType codec_type,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFStringRef profile_level,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1176,33 +1211,9 @@ static int vtenc_create_encoder(AVCodecContext *avctx,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- // Dump the init encoder
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFStringRef encoderID = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- status = VTSessionCopyProperty(vtctx->session,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- compat_keys.kVTCompressionPropertyKey_EncoderID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- kCFAllocatorDefault,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &encoderID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (status == noErr) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFIndex length = CFStringGetLength(encoderID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFIndex max_size = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- char *name = av_malloc(max_size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (!name) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFRelease(encoderID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return AVERROR(ENOMEM);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFStringGetCString(encoderID,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- name,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- max_size,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- kCFStringEncodingUTF8);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- av_log(avctx, AV_LOG_DEBUG, "Init the encoder: %s\n", name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- av_freep(&name);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (encoderID != NULL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- CFRelease(encoderID);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ status = vt_dump_encoder(avctx);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (status < 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return status;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (avctx->flags & AV_CODEC_FLAG_QSCALE && !vtenc_qscale_enabled()) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ av_log(avctx, AV_LOG_ERROR, "Error: -q:v qscale not available for encoder. Use -b:v bitrate instead.\n");
</span></pre><pre style='margin:0'>
</pre>