diff options
Diffstat (limited to 'WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h')
-rw-r--r-- | WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h index 1b20a84..9572d61 100644 --- a/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h +++ b/WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.h @@ -1,5 +1,6 @@ /* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2009 Apple Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -20,8 +21,7 @@ #ifndef MediaPlayerPrivatePhonon_h #define MediaPlayerPrivatePhonon_h -#include "MediaPlayer.h" -#include <wtf/Noncopyable.h> +#include "MediaPlayerPrivate.h" #include <QObject> #include <phononnamespace.h> @@ -40,31 +40,33 @@ QT_END_NAMESPACE namespace WebCore { - class MediaPlayerPrivate : public QObject, Noncopyable { + class MediaPlayerPrivate : public QObject, public MediaPlayerPrivateInterface { Q_OBJECT public: - MediaPlayerPrivate(MediaPlayer*); + static void registerMediaEngine(MediaEngineRegistrar); ~MediaPlayerPrivate(); // These enums are used for debugging Q_ENUMS(ReadyState NetworkState PhononState) enum ReadyState { - DataUnavailable, - CanShowCurrentFrame, - CanPlay, - CanPlayThrough + HaveNothing, + HaveMetadata, + HaveCurrentData, + HaveFutureData, + HaveEnoughData }; enum NetworkState { - Empty, - LoadFailed, - Loading, - LoadedMetaData, - LoadedFirstFrame, - Loaded + Empty, + Idle, + Loading, + Loaded, + FormatError, + NetworkError, + DecodeError }; enum PhononState { @@ -79,7 +81,7 @@ namespace WebCore { IntSize naturalSize() const; bool hasVideo() const; - void load(String url); + void load(const String &url); void cancelLoad(); void play(); @@ -109,11 +111,9 @@ namespace WebCore { unsigned totalBytes() const; void setVisible(bool); - void setRect(const IntRect&); + void setSize(const IntSize&); void paint(GraphicsContext*, const IntRect&); - static void getSupportedTypes(HashSet<String>&); - static bool isAvailable() { return true; } protected: bool eventFilter(QObject*, QEvent*); @@ -130,6 +130,13 @@ namespace WebCore { void totalTimeChanged(qint64); private: + MediaPlayerPrivate(MediaPlayer*); + static MediaPlayerPrivateInterface* create(MediaPlayer* player); + + static void getSupportedTypes(HashSet<String>&); + static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs); + static bool isAvailable() { return true; } + void updateStates(); MediaPlayer* m_player; |