summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-06-26 15:20:53 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2018-06-26 13:40:37 +0000
commit135c762ea0bb2c13f9568b9c85b10633f0c6ce34 (patch)
tree26f91a38e7bae54161d9d7bc50d949c0e52b05b4
parent5c8f9a292c2b3352373c7c9833519e06fc4bff0a (diff)
downloadqtmultimedia-135c762ea0bb2c13f9568b9c85b10633f0c6ce34.tar.gz
AVFoundation: Do not use AVFVideoRendererControl if no opengl
Removed code to use AVFVideoRendererControl to avoid link error. Task-number: QTBUG-69076 Change-Id: Iea87570fa6bb95541507d2ed84b6a1aa70984370 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm
index 6218401b3..91def6b3b 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm
@@ -42,7 +42,9 @@
#include "avfmediaplayercontrol.h"
#include "avfmediaplayermetadatacontrol.h"
#include "avfvideooutput.h"
+#if QT_CONFIG(opengl)
#include "avfvideorenderercontrol.h"
+#endif
#ifndef QT_NO_WIDGETS
# include "avfvideowidgetcontrol.h"
#endif
@@ -84,7 +86,7 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name)
if (qstrcmp(name, QMetaDataReaderControl_iid) == 0)
return m_playerMetaDataControl;
-
+#if QT_CONFIG(opengl)
if (qstrcmp(name, QVideoRendererControl_iid) == 0) {
if (!m_videoOutput)
m_videoOutput = new AVFVideoRendererControl(this);
@@ -92,7 +94,7 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name)
m_session->setVideoOutput(qobject_cast<AVFVideoOutput*>(m_videoOutput));
return m_videoOutput;
}
-
+#endif
#ifndef QT_NO_WIDGETS
if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
if (!m_videoOutput)
@@ -118,11 +120,12 @@ void AVFMediaPlayerService::releaseControl(QMediaControl *control)
qDebug() << Q_FUNC_INFO << control;
#endif
if (m_videoOutput == control) {
+#if QT_CONFIG(opengl)
AVFVideoRendererControl *renderControl = qobject_cast<AVFVideoRendererControl*>(m_videoOutput);
if (renderControl)
renderControl->setSurface(0);
-
+#endif
m_videoOutput = 0;
m_session->setVideoOutput(0);