summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-06-17 12:04:22 +0200
committerDamiano Galassi <[email protected]>2016-06-17 12:04:22 +0200
commit05c56f469700073a4e171943934c4fb9d908e63e (patch)
treeb1ce27e8984bbd7407e68536a0ecde95e643d6ce
parent5bddfcb2ff7cff8a0ecef45efbaff57cbad67576 (diff)
MacGui: fix build with 10.12sdk, disable QTKit because is no longer available.
-rw-r--r--macosx/HBPreviewController.m4
-rw-r--r--macosx/HBQTKitPlayer.h4
-rw-r--r--macosx/HBQTKitPlayer.m5
3 files changed, 13 insertions, 0 deletions
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<Class> *availablePlayerClasses = @[[HBAVPlayer class], [HBQTKitPlayer class]];
+#else
+ NSArray<Class> *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 <HBPlayer>
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 <QTKit/QTKit.h>
@import HandBrakeKit;
@@ -395,3 +398,5 @@ typedef void (^HBPlayableObverser)(void);
}
@end
+
+#endif