diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2009-12-18 16:40:40 +1000 |
---|---|---|
committer | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2009-12-18 16:40:40 +1000 |
commit | 519f8736a9da2cee17eb2ef30fdf22251da1a3fd (patch) | |
tree | 97ea60e300ba9cdce008c402fda0d6d6cc803116 /plugins/multimedia/qt7/qt7movierenderer.h | |
parent | 13d112fc5cd78d1d0334e39d91610d24c73f826d (diff) |
Implemented video renderer control using QuickTime C API.
To be used on Carbon builds.
Diffstat (limited to 'plugins/multimedia/qt7/qt7movierenderer.h')
-rw-r--r-- | plugins/multimedia/qt7/qt7movierenderer.h | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/plugins/multimedia/qt7/qt7movierenderer.h b/plugins/multimedia/qt7/qt7movierenderer.h new file mode 100644 index 0000000000..67e937c934 --- /dev/null +++ b/plugins/multimedia/qt7/qt7movierenderer.h @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QT7MOVIERENDERER_H +#define QT7MOVIERENDERER_H + +#include <QtCore/qobject.h> +#include <QtCore/qmutex.h> + +#include <qvideorenderercontrol.h> +#include <qmediaplayer.h> + +#include <QtGui/qmacdefines_mac.h> +#include "qt7videooutputcontrol.h" + +#include <CoreVideo/CVOpenGLTexture.h> +#include <QuickTime/QuickTime.h> + +class QT7PlayerSession; +class QT7PlayerService; + +QTM_BEGIN_NAMESPACE + +class QCvDisplayLink; + +class QT7MovieRenderer : public QT7VideoRendererControl +{ +Q_OBJECT +public: + QT7MovieRenderer(QObject *parent = 0); + virtual ~QT7MovieRenderer(); + + void setEnabled(bool); + void setMovie(void *movie); + + QAbstractVideoSurface *surface() const; + void setSurface(QAbstractVideoSurface *surface); + + QSize nativeSize() const; + +private slots: + void updateVideoFrame(const CVTimeStamp &ts); + +private: + void setupVideoOutput(); + bool createPixelBufferVisualContext(); + bool createGLVisualContext(); + + void *m_movie; + + QMutex m_mutex; + + QCvDisplayLink *m_displayLink; +#ifdef QUICKTIME_C_API_AVAILABLE + QTVisualContextRef m_visualContext; +#endif + QAbstractVideoSurface *m_surface; + QSize m_nativeSize; +}; + +QTM_END_NAMESPACE + +#endif |