summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/MediaPlayer.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 19:08:45 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:51:31 +0100
commit2bde8e466a4451c7319e3a072d118917957d6554 (patch)
tree28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Source/WebCore/platform/graphics/MediaPlayer.h
parent6939c99b71d9372d14a0c74a772108052e8c48c8 (diff)
downloadexternal_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Source/WebCore/platform/graphics/MediaPlayer.h')
-rw-r--r--Source/WebCore/platform/graphics/MediaPlayer.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/Source/WebCore/platform/graphics/MediaPlayer.h b/Source/WebCore/platform/graphics/MediaPlayer.h
index f41af01..5872c88 100644
--- a/Source/WebCore/platform/graphics/MediaPlayer.h
+++ b/Source/WebCore/platform/graphics/MediaPlayer.h
@@ -46,8 +46,10 @@
#endif
#ifdef __OBJC__
+@class AVPlayer;
@class QTMovie;
#else
+class AVPlayer;
class QTMovie;
#endif
class QTMovieGWorld;
@@ -71,6 +73,7 @@ struct PlatformMedia {
GStreamerGWorldType,
ChromiumMediaPlayerType,
QtMediaPlayerType,
+ AVFoundationMediaPlayerType,
} type;
union {
@@ -80,6 +83,7 @@ struct PlatformMedia {
GStreamerGWorld* gstreamerGWorld;
MediaPlayerPrivateInterface* chromiumMediaPlayer;
MediaPlayerPrivateInterface* qtMediaPlayer;
+ AVPlayer* avfMediaPlayer;
} media;
};
@@ -115,10 +119,10 @@ public:
// time has jumped, eg. not as a result of normal playback
virtual void mediaPlayerTimeChanged(MediaPlayer*) { }
-
+
// the media file duration has changed, or is now known
virtual void mediaPlayerDurationChanged(MediaPlayer*) { }
-
+
// the playback rate has changed
virtual void mediaPlayerRateChanged(MediaPlayer*) { }
@@ -178,49 +182,53 @@ public:
IntSize naturalSize();
bool hasVideo() const;
bool hasAudio() const;
+<<<<<<< HEAD
#if PLATFORM(ANDROID)
enum MediaElementType { Video, Audio };
void setMediaElementType(MediaElementType type) { m_mediaElementType = type; }
MediaElementType mediaElementType() { return m_mediaElementType; }
#endif
+=======
+
+>>>>>>> webkit.org at r82507
void setFrameView(FrameView* frameView) { m_frameView = frameView; }
FrameView* frameView() { return m_frameView; }
bool inMediaDocument();
-
+
IntSize size() const { return m_size; }
void setSize(const IntSize& size);
-
+
void load(const String& url, const ContentType&);
void cancelLoad();
-
+
bool visible() const;
void setVisible(bool);
-
+
void prepareToPlay();
void play();
void pause();
-
+
bool paused() const;
bool seeking() const;
-
+
float duration() const;
float currentTime() const;
void seek(float time);
float startTime() const;
-
+
float rate() const;
void setRate(float);
bool preservesPitch() const;
void setPreservesPitch(bool);
-
+
PassRefPtr<TimeRanges> buffered();
float maxTimeSeekable();
unsigned bytesLoaded();
-
+
float volume() const;
void setVolume(float);
@@ -235,13 +243,13 @@ public:
void paint(GraphicsContext*, const IntRect&);
void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
-
+
enum NetworkState { Empty, Idle, Loading, Loaded, FormatError, NetworkError, DecodeError };
NetworkState networkState();
enum ReadyState { HaveNothing, HaveMetadata, HaveCurrentData, HaveFutureData, HaveEnoughData };
ReadyState readyState();
-
+
enum MovieLoadType { Unknown, Download, StoredStream, LiveStream };
MovieLoadType movieLoadType() const;
@@ -320,6 +328,7 @@ private:
bool m_muted;
bool m_preservesPitch;
bool m_privateBrowsing;
+ bool m_shouldPrepareToRender;
#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
WebMediaPlayerProxy* m_playerProxy; // not owned or used, passed to m_private
#endif