mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
gst_all_1.*: build with the macOS 12.3 SDK
Thanks to <https://github.com/NixOS/nixpkgs/pull/340131>, this now works, and we no longer need to vendor the patch.
This commit is contained in:
parent
3052d8e230
commit
b45e06c521
@ -1,49 +0,0 @@
|
||||
From 816f2ccad16413a4961a0001fc02d8874d4fde47 Mon Sep 17 00:00:00 2001
|
||||
From: Alessandro Bono <alessandro.bono369@gmail.com>
|
||||
Date: Wed, 10 Jul 2024 15:33:34 +0200
|
||||
Subject: [PATCH] vtdec: Use kVTVideoDecoderReferenceMissingErr only when
|
||||
defined
|
||||
|
||||
The enum value is declared present since macOS 10.8+[1]. Howerver,
|
||||
the compilation now fails with the 10.15 SDK:
|
||||
```
|
||||
../sys/applemedia/vtdec.c:1219:12: error: use of undeclared identifier 'kVTVideoDecoderReferenceMissingErr'; did you mean 'kVTVideoDecoderMalfunctionErr'?
|
||||
case kVTVideoDecoderReferenceMissingErr:
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
kVTVideoDecoderMalfunctionErr
|
||||
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h:40:2: note: 'kVTVideoDecoderMalfunctionErr' declared here
|
||||
kVTVideoDecoderMalfunctionErr = -12911, // c.f. -8960
|
||||
^
|
||||
1 error generated.
|
||||
```
|
||||
|
||||
Put the enum usage under #ifdef. When missing, the behavior will be
|
||||
the same as before commit a5c437c6430cdce603e46e09400beb4c5b9f5374.
|
||||
|
||||
[1] https://developer.apple.com/documentation/videotoolbox/kvtvideodecoderreferencemissingerr?language=objc
|
||||
---
|
||||
sys/applemedia/vtdec.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c
|
||||
index 57fcbf9928a5..517c15365b52 100644
|
||||
--- a/sys/applemedia/vtdec.c
|
||||
+++ b/sys/applemedia/vtdec.c
|
||||
@@ -1216,12 +1216,14 @@ gst_vtdec_session_output_callback (void *decompression_output_ref_con,
|
||||
|
||||
if (status != noErr) {
|
||||
switch (status) {
|
||||
+#ifdef kVTVideoDecoderReferenceMissingErr
|
||||
case kVTVideoDecoderReferenceMissingErr:
|
||||
/* ReferenceMissingErr is not critical, when it occurs the frame
|
||||
* usually has the kVTDecodeInfo_FrameDropped flag set. Log only for debugging purposes. */
|
||||
GST_DEBUG_OBJECT (vtdec, "ReferenceMissingErr when decoding frame %d",
|
||||
frame->decode_frame_number);
|
||||
break;
|
||||
+#endif
|
||||
#ifndef HAVE_IOS
|
||||
case codecBadDataErr: /* SW decoder on macOS uses a different code from the hardware one... */
|
||||
#endif
|
||||
--
|
||||
GitLab
|
||||
|
@ -129,11 +129,6 @@ stdenv.mkDerivation rec {
|
||||
src = ./fix-paths.patch;
|
||||
inherit (addDriverRunpath) driverLink;
|
||||
})
|
||||
|
||||
# vtdec: Use kVTVideoDecoderReferenceMissingErr only when defined
|
||||
# <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7157>
|
||||
# TODO: Remove this when the build with the newer SDK works.
|
||||
./darwin-old-sdk-fix.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -15,6 +15,7 @@
|
||||
, lib
|
||||
, Cocoa
|
||||
, CoreServices
|
||||
, xpc
|
||||
, testers
|
||||
, rustc
|
||||
, withRust ?
|
||||
@ -87,6 +88,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Cocoa
|
||||
CoreServices
|
||||
xpc
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ callPackage
|
||||
{ stdenv
|
||||
, callPackage
|
||||
, AVFoundation
|
||||
, AudioToolbox
|
||||
, Cocoa
|
||||
@ -14,12 +15,15 @@
|
||||
, Security
|
||||
, SystemConfiguration
|
||||
, VideoToolbox
|
||||
, xpc
|
||||
, ipu6ep-camera-hal
|
||||
, ipu6epmtl-camera-hal
|
||||
}:
|
||||
|
||||
{
|
||||
gstreamer = callPackage ./core { inherit Cocoa CoreServices; };
|
||||
inherit stdenv;
|
||||
|
||||
gstreamer = callPackage ./core { inherit Cocoa CoreServices xpc; };
|
||||
|
||||
gstreamermm = callPackage ./gstreamermm { };
|
||||
|
||||
|
@ -20346,9 +20346,11 @@ with pkgs;
|
||||
|
||||
gsettings-qt = libsForQt5.callPackage ../development/libraries/gsettings-qt { };
|
||||
|
||||
gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer {
|
||||
gst_all_1 = recurseIntoAttrs (callPackage ../development/libraries/gstreamer {
|
||||
callPackage = newScope gst_all_1;
|
||||
inherit (darwin.apple_sdk.frameworks) AudioToolbox AVFoundation Cocoa CoreFoundation CoreMedia CoreServices CoreVideo DiskArbitration Foundation IOKit MediaToolbox OpenGL Security SystemConfiguration VideoToolbox;
|
||||
stdenv = if stdenv.isDarwin then overrideSDK stdenv "12.3" else stdenv;
|
||||
inherit (darwin.apple_sdk_12_3.frameworks) AudioToolbox AVFoundation Cocoa CoreFoundation CoreMedia CoreServices CoreVideo DiskArbitration Foundation IOKit MediaToolbox OpenGL Security SystemConfiguration VideoToolbox;
|
||||
inherit (darwin.apple_sdk_12_3.libs) xpc;
|
||||
});
|
||||
|
||||
gusb = callPackage ../development/libraries/gusb { };
|
||||
|
Loading…
Reference in New Issue
Block a user