diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-24 06:06:59 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-24 06:06:59 (GMT) |
commit | 2fccc31367b207cff68de063d9f3d55a993cde42 (patch) | |
tree | b2cbe561e9059e6e9959d857ff0ccf884cee6c69 /src | |
parent | e3999a4f91194b7508dbd1d3e6f595f729022ed7 (diff) | |
parent | ba2daf7d948f740cd9ada2a26249ebbf76f5ca12 (diff) | |
download | Qt-2fccc31367b207cff68de063d9f3d55a993cde42.zip Qt-2fccc31367b207cff68de063d9f3d55a993cde42.tar.gz Qt-2fccc31367b207cff68de063d9f3d55a993cde42.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging:
Added extra video buffer handle types.
QuickTime MovieViewOutput: remove view from layout and reset source
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/video/qabstractvideobuffer.cpp | 2 | ||||
-rw-r--r-- | src/multimedia/video/qabstractvideobuffer.h | 2 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movieviewoutput.h | 1 | ||||
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movieviewoutput.mm | 32 |
4 files changed, 33 insertions, 4 deletions
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp index 465a1e7..e9d30d0 100644 --- a/src/multimedia/video/qabstractvideobuffer.cpp +++ b/src/multimedia/video/qabstractvideobuffer.cpp @@ -71,6 +71,8 @@ QT_BEGIN_NAMESPACE \value NoHandle The buffer has no handle, its data can only be accessed by mapping the buffer. \value GLTextureHandle The handle of the buffer is an OpenGL texture ID. + \value XvShmImageHandle The handle contains pointer to shared memory XVideo image. + \value CoreImageHandle The handle contains pointer to Mac OS X CIImage. \value UserHandle Start value for user defined handle types. \sa handleType() diff --git a/src/multimedia/video/qabstractvideobuffer.h b/src/multimedia/video/qabstractvideobuffer.h index 4ffa46f..a8389db 100644 --- a/src/multimedia/video/qabstractvideobuffer.h +++ b/src/multimedia/video/qabstractvideobuffer.h @@ -61,6 +61,8 @@ public: { NoHandle, GLTextureHandle, + XvShmImageHandle, + CoreImageHandle, UserHandle = 1000 }; diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h index 31a0314..49049ad 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.h +++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.h @@ -100,6 +100,7 @@ private: void *m_movie; void *m_movieView; + bool m_layouted; WId m_winId; QRect m_displayRect; diff --git a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm index d8dbf9b..8e4dd9b 100644 --- a/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm +++ b/src/plugins/mediaservices/qt7/qt7movieviewoutput.mm @@ -154,6 +154,7 @@ QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent) :QT7VideoWindowControl(parent), m_movie(0), m_movieView(0), + m_layouted(false), m_winId(0), m_fullscreen(false), m_aspectRatioMode(Qt::KeepAspectRatio), @@ -166,6 +167,8 @@ QT7MovieViewOutput::QT7MovieViewOutput(QObject *parent) QT7MovieViewOutput::~QT7MovieViewOutput() { + [(QTMovieView*)m_movieView release]; + [(QTMovie*)m_movie release]; } void QT7MovieViewOutput::setupVideoOutput() @@ -186,6 +189,7 @@ void QT7MovieViewOutput::setupVideoOutput() [(QTMovieView*)m_movieView setMovie:(QTMovie*)m_movie]; [(NSView *)m_winId addSubview:(QTMovieView*)m_movieView]; + m_layouted = true; setDisplayRect(m_displayRect); } @@ -196,8 +200,21 @@ void QT7MovieViewOutput::setEnabled(bool) void QT7MovieViewOutput::setMovie(void *movie) { - m_movie = movie; - setupVideoOutput(); + if (m_movie != movie) { + if (m_movie) { + if (m_movieView) + [(QTMovieView*)m_movieView setMovie:nil]; + + [(QTMovie*)m_movie release]; + } + + m_movie = movie; + + if (m_movie) + [(QTMovie*)m_movie retain]; + + setupVideoOutput(); + } } void QT7MovieViewOutput::updateNaturalSize(const QSize &newSize) @@ -215,8 +232,15 @@ WId QT7MovieViewOutput::winId() const void QT7MovieViewOutput::setWinId(WId id) { - m_winId = id; - setupVideoOutput(); + if (m_winId != id) { + if (m_movieView && m_layouted) { + [(QTMovieView*)m_movieView removeFromSuperview]; + m_layouted = false; + } + + m_winId = id; + setupVideoOutput(); + } } QRect QT7MovieViewOutput::displayRect() const |