Compile in 32-bit mode.
authorMorten Johan Sørvig <morten.sorvig@digia.com>
Tue, 8 Jan 2013 13:39:10 +0000 (14:39 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 8 Jan 2013 13:44:41 +0000 (14:44 +0100)
CGRect == NSRect only in 64-bit mode.

Don't add -framework QuickTime based on the host arch,
use QT_ARCH instead.

Change-Id: I829bc1bcfe37f70a07e8c55a5bc7dee90aaa981a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm
src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.mm
src/plugins/qt7/qt7.pro

index 3fb9354..f931060 100644 (file)
@@ -257,8 +257,8 @@ static void *AVFMediaPlayerSessionObserverCurrentItemObservationContext = &AVFMe
             NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
             if ([tracks count]) {
                 AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
-                m_playerLayer.anchorPoint = NSMakePoint(0.0f, 0.0f);
-                m_playerLayer.bounds = NSMakeRect(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
+                m_playerLayer.anchorPoint = CGPointMake(0.0f, 0.0f);
+                m_playerLayer.bounds = CGRectMake(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
             }
         }
 
@@ -368,8 +368,8 @@ static void *AVFMediaPlayerSessionObserverCurrentItemObservationContext = &AVFMe
                 NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
                 if ([tracks count]) {
                     AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
-                    m_playerLayer.anchorPoint = NSMakePoint(0.0f, 0.0f);
-                    m_playerLayer.bounds = NSMakeRect(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
+                    m_playerLayer.anchorPoint = CGPointMake(0.0f, 0.0f);
+                    m_playerLayer.bounds = CGRectMake(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
                 }
             }
 
index b8cd782..c995d92 100644 (file)
@@ -207,7 +207,7 @@ void AVFVideoWidgetControl::updateVideoFrame(const CVTimeStamp &ts)
 
 void AVFVideoWidgetControl::setupVideoOutput()
 {
-    NSRect layerBounds = [(AVPlayerLayer*)m_playerLayer bounds];
+    CGRect layerBounds = [(AVPlayerLayer*)m_playerLayer bounds];
     m_nativeSize = QSize(layerBounds.size.width, layerBounds.size.height);
     m_videoWidget->setNativeSize(m_nativeSize);
 
index ae87bd4..f5d8bae 100644 (file)
@@ -23,7 +23,7 @@ LIBS += -framework AppKit -framework AudioUnit \
 
 # QUICKTIME_C_API_AVAILABLE is true only on i386
 # so make sure to link QuickTime
-contains(QMAKE_HOST.arch, i386) {
+contains(QT_ARCH, i386) {
     LIBS += -framework QuickTime
 }