]> granicus.if.org Git - handbrake/commitdiff
MacGui: fix build with 10.12sdk, disable QTKit because is no longer available.
authorDamiano Galassi <damiog@gmail.com>
Fri, 17 Jun 2016 10:04:22 +0000 (12:04 +0200)
committerDamiano Galassi <damiog@gmail.com>
Fri, 17 Jun 2016 10:04:22 +0000 (12:04 +0200)
macosx/HBPreviewController.m
macosx/HBQTKitPlayer.h
macosx/HBQTKitPlayer.m

index 9c8903b7e7424deefc9574a9ae2c077c56a33805..e6515ce74ee79e6c6bb01abaf423c8f37af99996 100644 (file)
 
 - (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];
 
index a9a9de54a8d997ba20939ea6495c81b3ee37daef..d87473683201c8062cd830fe1839b1bdecb3e72f 100644 (file)
@@ -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>
index e44413f55e061fe9d69a52b255b9125911894ac4..6c464426b3aee0d6c21a23e896422a619f0495c9 100644 (file)
@@ -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