Title: [198696] trunk/Source/WebCore
Revision
198696
Author
[email protected]
Date
2016-03-25 16:06:06 -0700 (Fri, 25 Mar 2016)

Log Message

Add a compile time flag for using QTKit
https://bugs.webkit.org/show_bug.cgi?id=155868

Patch by Alex Christensen <[email protected]> on 2016-03-25
Reviewed by Daniel Bates.

* platform/graphics/MediaPlayer.cpp:
(WebCore::buildMediaEnginesVector):
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/MediaTimeQTKit.h:
* platform/graphics/mac/MediaTimeQTKit.mm:
* platform/mac/WebVideoFullscreenController.mm:
(SOFT_LINK_CLASS):
(-[WebVideoFullscreenController setVideoElement:]):
(-[WebVideoFullscreenController updatePowerAssertions]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (198695 => 198696)


--- trunk/Source/WebCore/ChangeLog	2016-03-25 23:04:02 UTC (rev 198695)
+++ trunk/Source/WebCore/ChangeLog	2016-03-25 23:06:06 UTC (rev 198696)
@@ -1,3 +1,20 @@
+2016-03-25  Alex Christensen  <[email protected]>
+
+        Add a compile time flag for using QTKit
+        https://bugs.webkit.org/show_bug.cgi?id=155868
+
+        Reviewed by Daniel Bates.
+
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::buildMediaEnginesVector):
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        * platform/graphics/mac/MediaTimeQTKit.h:
+        * platform/graphics/mac/MediaTimeQTKit.mm:
+        * platform/mac/WebVideoFullscreenController.mm:
+        (SOFT_LINK_CLASS):
+        (-[WebVideoFullscreenController setVideoElement:]):
+        (-[WebVideoFullscreenController updatePowerAssertions]):
+
 2016-03-25  Beth Dakin  <[email protected]>
 
         Autoscrolling from a drag selection does not work in full screen, or when the 

Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (198695 => 198696)


--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp	2016-03-25 23:04:02 UTC (rev 198695)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp	2016-03-25 23:06:06 UTC (rev 198696)
@@ -65,7 +65,9 @@
 #endif
 
 #if PLATFORM(COCOA)
+#if USE(QTKIT)
 #include "MediaPlayerPrivateQTKit.h"
+#endif
 
 #if USE(AVFOUNDATION)
 #include "MediaPlayerPrivateAVFoundationObjC.h"
@@ -207,7 +209,7 @@
     }
 #endif // USE(AVFOUNDATION)
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && USE(QTKIT)
     if (Settings::isQTKitEnabled())
         MediaPlayerPrivateQTKit::registerMediaEngine(addMediaEngine);
 #endif

Modified: trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm (198695 => 198696)


--- trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm	2016-03-25 23:04:02 UTC (rev 198695)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm	2016-03-25 23:06:06 UTC (rev 198696)
@@ -25,7 +25,7 @@
 
 #import "config.h"
 
-#if ENABLE(VIDEO)
+#if ENABLE(VIDEO) && USE(QTKIT)
 
 #import "MediaPlayerPrivateQTKit.h"
 

Modified: trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h (198695 => 198696)


--- trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h	2016-03-25 23:04:02 UTC (rev 198695)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h	2016-03-25 23:06:06 UTC (rev 198696)
@@ -26,7 +26,7 @@
 #ifndef MediaTimeQTKit_h
 #define MediaTimeQTKit_h
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && USE(QTKIT)
 
 #include <QTKit/QTTime.h>
 #include <wtf/MediaTime.h>

Modified: trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm (198695 => 198696)


--- trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm	2016-03-25 23:04:02 UTC (rev 198695)
+++ trunk/Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm	2016-03-25 23:06:06 UTC (rev 198696)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "MediaTimeQTKit.h"
 
-#if PLATFORM(MAC)
+#if PLATFORM(MAC) && USE(QTKIT)
 
 #import "SoftLinking.h"
 #import <QTKit/QTTime.h>

Modified: trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm (198695 => 198696)


--- trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm	2016-03-25 23:04:02 UTC (rev 198695)
+++ trunk/Source/WebCore/platform/mac/WebVideoFullscreenController.mm	2016-03-25 23:06:06 UTC (rev 198696)
@@ -33,21 +33,21 @@
 #import "WebWindowAnimation.h"
 #import <AVFoundation/AVFoundation.h>
 #import <Carbon/Carbon.h>
-#import <QTKit/QTKit.h>
 #import <WebCore/DisplaySleepDisabler.h>
 #import <WebCore/HTMLVideoElement.h>
 #import <WebCore/SoftLinking.h>
 #import <objc/runtime.h>
 
-using namespace WebCore;
-
+#if USE(QTKIT)
+#import <QTKit/QTKit.h>
 SOFT_LINK_FRAMEWORK(QTKit)
 SOFT_LINK_CLASS(QTKit, QTMovieLayer)
-
 SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
-
 #define QTMovieRateDidChangeNotification getQTMovieRateDidChangeNotification()
+#endif
 
+using namespace WebCore;
+
 SOFT_LINK_FRAMEWORK(AVFoundation)
 SOFT_LINK_CLASS(AVFoundation, AVPlayerLayer)
 
@@ -127,6 +127,7 @@
         return;
 
     if ([self isWindowLoaded]) {
+#if USE(QTKIT)
         if (_videoElement->platformMedia().type == PlatformMedia::QTMovieType) {
             QTMovie *movie = _videoElement->platformMedia().media.qtMovie;
             QTMovieLayer *layer = [allocQTMovieLayerInstance() init];
@@ -138,7 +139,9 @@
                                                          name:QTMovieRateDidChangeNotification
                                                        object:movie];
 
-        } else if (_videoElement->platformMedia().type == PlatformMedia::AVFoundationMediaPlayerType) {
+        } else
+#endif
+        if (_videoElement->platformMedia().type == PlatformMedia::AVFoundationMediaPlayerType) {
             AVPlayer *player = _videoElement->platformMedia().media.avfMediaPlayer;
             AVPlayerLayer *layer = [allocAVPlayerLayerInstance() init];
             [self setupVideoOverlay:layer];
@@ -357,6 +360,7 @@
 
 - (void)updatePowerAssertions
 {
+#if USE(QTKIT)
     float rate = 0;
     if (_videoElement && _videoElement->platformMedia().type == PlatformMedia::QTMovieType)
         rate = [_videoElement->platformMedia().media.qtMovie rate];
@@ -365,6 +369,7 @@
         if (!_displaySleepDisabler)
             _displaySleepDisabler = DisplaySleepDisabler::create("com.apple.WebCore - Fullscreen video");
     } else
+#endif
         _displaySleepDisabler = nullptr;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to