AVFoundation: Enable QVideoWidget on iOS
Change-Id: I88041e7a2ea052fe449542eeaada31c09d93d163 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
51d0f852b9
commit
94ccfbc132
@@ -46,11 +46,10 @@
|
|||||||
#if defined(Q_OS_OSX)
|
#if defined(Q_OS_OSX)
|
||||||
# include "avfvideooutput.h"
|
# include "avfvideooutput.h"
|
||||||
# include "avfvideorenderercontrol.h"
|
# include "avfvideorenderercontrol.h"
|
||||||
|
#endif
|
||||||
#ifndef QT_NO_WIDGETS
|
#ifndef QT_NO_WIDGETS
|
||||||
# include "avfvideowidgetcontrol.h"
|
# include "avfvideowidgetcontrol.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_USE_NAMESPACE
|
QT_USE_NAMESPACE
|
||||||
|
|
||||||
@@ -93,6 +92,7 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name)
|
|||||||
m_session->setVideoOutput(qobject_cast<AVFVideoOutput*>(m_videoOutput));
|
m_session->setVideoOutput(qobject_cast<AVFVideoOutput*>(m_videoOutput));
|
||||||
return m_videoOutput;
|
return m_videoOutput;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#ifndef QT_NO_WIDGETS
|
#ifndef QT_NO_WIDGETS
|
||||||
if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
|
if (qstrcmp(name, QVideoWidgetControl_iid) == 0) {
|
||||||
if (!m_videoOutput)
|
if (!m_videoOutput)
|
||||||
@@ -101,7 +101,6 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name)
|
|||||||
m_session->setVideoOutput(qobject_cast<AVFVideoOutput*>(m_videoOutput));
|
m_session->setVideoOutput(qobject_cast<AVFVideoOutput*>(m_videoOutput));
|
||||||
return m_videoOutput;
|
return m_videoOutput;
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,29 +20,17 @@ HEADERS += \
|
|||||||
avfmediaplayermetadatacontrol.h \
|
avfmediaplayermetadatacontrol.h \
|
||||||
avfmediaplayerservice.h \
|
avfmediaplayerservice.h \
|
||||||
avfmediaplayersession.h \
|
avfmediaplayersession.h \
|
||||||
avfmediaplayerserviceplugin.h
|
avfmediaplayerserviceplugin.h \
|
||||||
|
avfvideooutput.h
|
||||||
|
|
||||||
OBJECTIVE_SOURCES += \
|
OBJECTIVE_SOURCES += \
|
||||||
avfmediaplayercontrol.mm \
|
avfmediaplayercontrol.mm \
|
||||||
avfmediaplayermetadatacontrol.mm \
|
avfmediaplayermetadatacontrol.mm \
|
||||||
avfmediaplayerservice.mm \
|
avfmediaplayerservice.mm \
|
||||||
avfmediaplayerserviceplugin.mm \
|
avfmediaplayerserviceplugin.mm \
|
||||||
avfmediaplayersession.mm
|
avfmediaplayersession.mm \
|
||||||
|
|
||||||
!ios {
|
|
||||||
HEADERS += \
|
|
||||||
avfvideorenderercontrol.h \
|
|
||||||
avfdisplaylink.h \
|
|
||||||
avfvideoframerenderer.h \
|
|
||||||
avfvideooutput.h
|
|
||||||
OBJECTIVE_SOURCES += \
|
|
||||||
avfvideorenderercontrol.mm \
|
|
||||||
avfdisplaylink.mm \
|
|
||||||
avfvideoframerenderer.mm \
|
|
||||||
avfvideooutput.mm
|
avfvideooutput.mm
|
||||||
|
|
||||||
LIBS += -framework QuartzCore -framework AppKit
|
|
||||||
|
|
||||||
qtHaveModule(widgets) {
|
qtHaveModule(widgets) {
|
||||||
QT += multimediawidgets-private
|
QT += multimediawidgets-private
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
@@ -53,6 +41,18 @@ OBJECTIVE_SOURCES += \
|
|||||||
avfvideowidgetcontrol.mm \
|
avfvideowidgetcontrol.mm \
|
||||||
avfvideowidget.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 += \
|
OTHER_FILES += \
|
||||||
|
|||||||
Reference in New Issue
Block a user