summaryrefslogtreecommitdiffstats
path: root/src/plugins/mediaservices/qt7/qt7movierenderer.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mediaservices/qt7/qt7movierenderer.mm')
-rw-r--r--src/plugins/mediaservices/qt7/qt7movierenderer.mm13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.mm b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
index 1c1f5e4..a6d9d8d 100644
--- a/src/plugins/mediaservices/qt7/qt7movierenderer.mm
+++ b/src/plugins/mediaservices/qt7/qt7movierenderer.mm
@@ -46,6 +46,7 @@
#include "qt7playercontrol.h"
#include "qt7movierenderer.h"
#include "qt7playersession.h"
+#include "qt7ciimagevideobuffer.h"
#include "qcvdisplaylink.h"
#include <QtCore/qdebug.h>
#include <QtCore/qcoreapplication.h>
@@ -64,7 +65,7 @@ class CVGLTextureVideoBuffer : public QAbstractVideoBuffer
{
public:
CVGLTextureVideoBuffer(CVOpenGLTextureRef buffer)
- : QAbstractVideoBuffer(NoHandle)
+ : QAbstractVideoBuffer(GLTextureHandle)
, m_buffer(buffer)
, m_mode(NotMapped)
{
@@ -82,11 +83,6 @@ public:
return QVariant(int(id));
}
- HandleType handleType() const
- {
- return GLTextureHandle;
- }
-
MapMode mapMode() const { return m_mode; }
uchar *map(MapMode mode, int *numBytes, int *bytesPerLine)
@@ -447,15 +443,14 @@ void QT7MovieRenderer::updateVideoFrame(const CVTimeStamp &ts)
OSStatus status = QTVisualContextCopyImageForTime(m_visualContext, NULL, &ts, &imageBuffer);
if (status == noErr && imageBuffer) {
- //qDebug() << "render video frame";
QAbstractVideoBuffer *buffer = 0;
if (m_usingGLContext) {
- buffer = new CVGLTextureVideoBuffer((CVOpenGLTextureRef)imageBuffer);
+ buffer = new QT7CIImageVideoBuffer([CIImage imageWithCVImageBuffer:imageBuffer]);
CVOpenGLTextureRelease((CVOpenGLTextureRef)imageBuffer);
- //qDebug() << "render GL video frame" << buffer->handle();
} else {
buffer = new CVPixelBufferVideoBuffer((CVPixelBufferRef)imageBuffer);
+ //buffer = new QT7CIImageVideoBuffer( [CIImage imageWithCVImageBuffer:imageBuffer] );
CVPixelBufferRelease((CVPixelBufferRef)imageBuffer);
}