summaryrefslogtreecommitdiff
path: root/src/multimediawidgets
diff options
context:
space:
mode:
authorDmytro Poplavskiy <dmytro.poplavskiy@nokia.com>2012-08-23 15:59:18 +1000
committerQt by Nokia <qt-info@nokia.com>2012-08-27 07:59:42 +0200
commit09a7fda9711290ae00f74f5d762148c5b2f5f534 (patch)
treeea68b7a06f7b0b9803865c87c506e3788abce70c /src/multimediawidgets
parent3613a14b3804d09d84a141b268f79857568b01b4 (diff)
downloadqtmultimedia-09a7fda9711290ae00f74f5d762148c5b2f5f534.tar.gz
Re-enabled CIImage based gfx video item on Mac
Also prefer CoreImageHandle to GLTextureHandle in QuickTime player backend, to avoid unnecessary copy via FBO. Change-Id: Id5aa039c438378b7bbf816b7845b05574683c471 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/multimediawidgets')
-rw-r--r--src/multimediawidgets/multimediawidgets.pro3
-rw-r--r--src/multimediawidgets/qpaintervideosurface.cpp4
-rw-r--r--src/multimediawidgets/qpaintervideosurface_mac.mm6
3 files changed, 8 insertions, 5 deletions
diff --git a/src/multimediawidgets/multimediawidgets.pro b/src/multimediawidgets/multimediawidgets.pro
index 8c5f69aac..a913cbbd9 100644
--- a/src/multimediawidgets/multimediawidgets.pro
+++ b/src/multimediawidgets/multimediawidgets.pro
@@ -31,8 +31,7 @@ SOURCES += \
qvideowidget.cpp
mac {
- # QtWidgets is not yet supported on Mac (!).
- false:!simulator {
+ !simulator {
PRIVATE_HEADERS += qpaintervideosurface_mac_p.h
OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm
}
diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
index 8b37acbdf..c14d1c833 100644
--- a/src/multimediawidgets/qpaintervideosurface.cpp
+++ b/src/multimediawidgets/qpaintervideosurface.cpp
@@ -209,7 +209,7 @@ void QVideoSurfaceGenericPainter::updateColors(int, int, int, int)
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
-#ifndef Q_WS_MAC
+#ifndef Q_OS_MAC
# ifndef APIENTRYP
# ifdef APIENTRY
# define APIENTRYP APIENTRY *
@@ -1673,7 +1673,7 @@ void QPainterVideoSurface::createPainter()
{
Q_ASSERT(!m_painter);
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (m_glContext)
m_glContext->makeCurrent();
diff --git a/src/multimediawidgets/qpaintervideosurface_mac.mm b/src/multimediawidgets/qpaintervideosurface_mac.mm
index a741d9eea..ee4d181fc 100644
--- a/src/multimediawidgets/qpaintervideosurface_mac.mm
+++ b/src/multimediawidgets/qpaintervideosurface_mac.mm
@@ -134,6 +134,8 @@ QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::paint(
const QRectF &target, QPainter *painter, const QRectF &source)
{
if (m_frame.handleType() == QAbstractVideoBuffer::CoreImageHandle) {
+//Non OpenGL CI rendering is disabled for now since qt_mac_cg_context is moved to platform plugin
+#ifdef ENABLE_CORE_GRAPHICS_VIDEO_RENDERING
if (painter->paintEngine()->type() == QPaintEngine::CoreGraphics ) {
CIImage *img = (CIImage*)(m_frame.handle().value<void*>());
@@ -168,7 +170,9 @@ QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::paint(
return QAbstractVideoSurface::NoError;
}
}
- } else if (painter->paintEngine()->type() == QPaintEngine::OpenGL2 ||
+ } else
+#endif
+ if (painter->paintEngine()->type() == QPaintEngine::OpenGL2 ||
painter->paintEngine()->type() == QPaintEngine::OpenGL) {
CIImage *img = (CIImage*)(m_frame.handle().value<void*>());