AVFoundation: Add QVideoWindowControl support

This adds the capability to render videos directly to native
window surfaces when using the AVFoundation plugin.  This adds limited
support for displaying videos from QML on iOS.  These videos are
displayed in a CALayer above the QQuickWindow, so it will not be
possible to render any QtQuick items on top of a video using the
QVideoWindowControl to provide video.

[ChangeLog][QtMultimedia][iOS] Add limited support for playing videos in
QtQuick on iOS (Videos are played on top of scene with limited transform
support).

Change-Id: I80381d9a07b45b6fa1959678166e6da0004f8c19
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Andy Nichols
2014-03-06 17:44:14 +01:00
committed by The Qt Project
parent ec3d65aecf
commit ea5d56c5ab
4 changed files with 378 additions and 2 deletions

View File

@@ -50,6 +50,7 @@
#ifndef QT_NO_WIDGETS
# include "avfvideowidgetcontrol.h"
#endif
#include "avfvideowindowcontrol.h"
QT_USE_NAMESPACE
@@ -102,6 +103,13 @@ QMediaControl *AVFMediaPlayerService::requestControl(const char *name)
return m_videoOutput;
}
#endif
if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
if (!m_videoOutput)
m_videoOutput = new AVFVideoWindowControl(this);
m_session->setVideoOutput(qobject_cast<AVFVideoOutput*>(m_videoOutput));
return m_videoOutput;
}
return 0;
}