diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 16:21:14 +0200 |
commit | 8995b83bcbfbb68245f779b64e5517627c6cc6ea (patch) | |
tree | 17985605dab9263cc2444bd4d45f189e142cca7c /Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h | |
parent | b9c9652036d5e9f1e29c574f40bc73a35c81ace6 (diff) |
Imported WebKit commit cf4f8fc6f19b0629f51860cb2d4b25e139d07e00 (http://svn.webkit.org/repository/webkit/trunk@131592)
New snapshot that includes the build fixes for Mac OS X 10.6 and earlier as well
as the previously cherry-picked changes
Diffstat (limited to 'Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h')
-rw-r--r-- | Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h index f15af138d..8e31c9d6d 100644 --- a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h +++ b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h @@ -22,8 +22,10 @@ #include "MediaPlayerPrivate.h" +#include <QAbstractVideoSurface> #include <QMediaPlayer> #include <QObject> +#include <QVideoSurfaceFormat> QT_BEGIN_NAMESPACE class QMediaPlayerControl; @@ -37,9 +39,9 @@ QT_END_NAMESPACE namespace WebCore { -class MediaPlayerPrivateQt : public QObject, public MediaPlayerPrivateInterface +class MediaPlayerPrivateQt : public QAbstractVideoSurface, public MediaPlayerPrivateInterface #if USE(ACCELERATED_COMPOSITING) - , public TextureMapperPlatformLayer + , public TextureMapperPlatformLayer #endif { @@ -107,7 +109,7 @@ public: virtual void acceleratedRenderingStateChanged() { } // Const-casting here is safe, since all of TextureMapperPlatformLayer's functions are const.g virtual PlatformLayer* platformLayer() const { return 0; } - virtual void paintToTextureMapper(TextureMapper*, const FloatRect& targetRect, const TransformationMatrix&, float opacity, BitmapTexture* mask) const; + virtual void paintToTextureMapper(TextureMapper*, const FloatRect& targetRect, const TransformationMatrix&, float opacity, BitmapTexture* mask); #endif virtual PlatformMedia platformMedia() const; @@ -116,17 +118,21 @@ public: void removeVideoItem(); void restoreVideoItem(); + // QAbstractVideoSurface methods + virtual bool start(const QVideoSurfaceFormat& format); + virtual QList<QVideoFrame::PixelFormat> supportedPixelFormats(QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle) const; + virtual bool present(const QVideoFrame& frame); + private Q_SLOTS: void mediaStatusChanged(QMediaPlayer::MediaStatus); void handleError(QMediaPlayer::Error); void stateChanged(QMediaPlayer::State); - void nativeSizeChanged(const QSizeF&); + void surfaceFormatChanged(const QVideoSurfaceFormat&); void positionChanged(qint64); void durationChanged(qint64); void bufferStatusChanged(int); void volumeChanged(int); void mutedChanged(bool); - void repaint(); private: void updateStates(); @@ -139,15 +145,14 @@ private: MediaPlayer* m_webCorePlayer; QMediaPlayer* m_mediaPlayer; QMediaPlayerControl* m_mediaPlayerControl; - QGraphicsVideoItem* m_videoItem; - QGraphicsScene* m_videoScene; + QVideoSurfaceFormat m_frameFormat; + QVideoFrame m_currentVideoFrame; mutable MediaPlayer::NetworkState m_networkState; mutable MediaPlayer::ReadyState m_readyState; IntSize m_currentSize; IntSize m_naturalSize; - IntSize m_oldNaturalSize; bool m_isVisible; bool m_isSeeking; bool m_composited; |