From 94ccfbc1326ddf554d2ef3bf631f0358c2d20fb3 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 15 Aug 2013 16:31:34 +0200 Subject: AVFoundation: Enable QVideoWidget on iOS Change-Id: I88041e7a2ea052fe449542eeaada31c09d93d163 Reviewed-by: Richard Moe Gustavsen --- .../mediaplayer/avfmediaplayerservice.mm | 11 ++++---- .../avfoundation/mediaplayer/mediaplayer.pro | 32 +++++++++++----------- 2 files changed, 21 insertions(+), 22 deletions(-) (limited to 'src/plugins/avfoundation/mediaplayer') diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm index 668a26ee3..398f00e2f 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm @@ -46,10 +46,9 @@ #if defined(Q_OS_OSX) # include "avfvideooutput.h" # include "avfvideorenderercontrol.h" - -# ifndef QT_NO_WIDGETS -# include "avfvideowidgetcontrol.h" -# endif +#endif +#ifndef QT_NO_WIDGETS +# include "avfvideowidgetcontrol.h" #endif QT_USE_NAMESPACE @@ -93,7 +92,8 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name) m_session->setVideoOutput(qobject_cast(m_videoOutput)); return m_videoOutput; } -# ifndef QT_NO_WIDGETS +#endif +#ifndef QT_NO_WIDGETS if (qstrcmp(name, QVideoWidgetControl_iid) == 0) { if (!m_videoOutput) m_videoOutput = new AVFVideoWidgetControl(this); @@ -101,7 +101,6 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name) m_session->setVideoOutput(qobject_cast(m_videoOutput)); return m_videoOutput; } -# endif #endif return 0; } diff --git a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro index f0bd18c57..e5bccd150 100644 --- a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro +++ b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro @@ -20,28 +20,16 @@ HEADERS += \ avfmediaplayermetadatacontrol.h \ avfmediaplayerservice.h \ avfmediaplayersession.h \ - avfmediaplayerserviceplugin.h + avfmediaplayerserviceplugin.h \ + avfvideooutput.h OBJECTIVE_SOURCES += \ avfmediaplayercontrol.mm \ avfmediaplayermetadatacontrol.mm \ avfmediaplayerservice.mm \ avfmediaplayerserviceplugin.mm \ - avfmediaplayersession.mm - -!ios { - HEADERS += \ - avfvideorenderercontrol.h \ - avfdisplaylink.h \ - avfvideoframerenderer.h \ - avfvideooutput.h - OBJECTIVE_SOURCES += \ - avfvideorenderercontrol.mm \ - avfdisplaylink.mm \ - avfvideoframerenderer.mm \ - avfvideooutput.mm - - LIBS += -framework QuartzCore -framework AppKit + avfmediaplayersession.mm \ + avfvideooutput.mm qtHaveModule(widgets) { QT += multimediawidgets-private @@ -53,6 +41,18 @@ OBJECTIVE_SOURCES += \ avfvideowidgetcontrol.mm \ avfvideowidget.mm } + +!ios { + LIBS += -framework QuartzCore -framework AppKit + + HEADERS += \ + avfvideorenderercontrol.h \ + avfdisplaylink.h \ + avfvideoframerenderer.h + OBJECTIVE_SOURCES += \ + avfvideorenderercontrol.mm \ + avfdisplaylink.mm \ + avfvideoframerenderer.mm } OTHER_FILES += \ -- cgit v1.2.3