From: Damiano Galassi Date: Fri, 17 Jun 2016 10:04:22 +0000 (+0200) Subject: MacGui: fix build with 10.12sdk, disable QTKit because is no longer available. X-Git-Tag: 1.0.0~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05c56f469700073a4e171943934c4fb9d908e63e;p=handbrake MacGui: fix build with 10.12sdk, disable QTKit because is no longer available. --- diff --git a/macosx/HBPreviewController.m b/macosx/HBPreviewController.m index 9c8903b7e..e6515ce74 100644 --- a/macosx/HBPreviewController.m +++ b/macosx/HBPreviewController.m @@ -548,7 +548,11 @@ - (void)setUpPlaybackOfURL:(NSURL *)fileURL playerClass:(Class)class; { +#if __HB_QTKIT_PLAYER_AVAILABLE NSArray *availablePlayerClasses = @[[HBAVPlayer class], [HBQTKitPlayer class]]; +#else + NSArray *availablePlayerClasses = @[[HBAVPlayer class]]; +#endif self.player = [[class alloc] initWithURL:fileURL]; diff --git a/macosx/HBQTKitPlayer.h b/macosx/HBQTKitPlayer.h index a9a9de54a..d87473683 100644 --- a/macosx/HBQTKitPlayer.h +++ b/macosx/HBQTKitPlayer.h @@ -9,6 +9,10 @@ #import "HBPlayer.h" +#if __MAC_OS_X_VERSION_MAX_ALLOWED < 101200 + #define __HB_QTKIT_PLAYER_AVAILABLE 1 +#endif + NS_ASSUME_NONNULL_BEGIN @interface HBQTKitPlayer : NSObject diff --git a/macosx/HBQTKitPlayer.m b/macosx/HBQTKitPlayer.m index e44413f55..6c464426b 100644 --- a/macosx/HBQTKitPlayer.m +++ b/macosx/HBQTKitPlayer.m @@ -5,6 +5,9 @@ It may be used under the terms of the GNU General Public License. */ #import "HBQTKitPlayer.h" + +#if __HB_QTKIT_PLAYER_AVAILABLE + #import @import HandBrakeKit; @@ -395,3 +398,5 @@ typedef void (^HBPlayableObverser)(void); } @end + +#endif