summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h')
-rw-r--r--WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h58
1 files changed, 33 insertions, 25 deletions
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
index 3f18ab4..677c31a 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,7 +28,7 @@
#if ENABLE(VIDEO)
-#include "MediaPlayer.h"
+#include "MediaPlayerPrivate.h"
#include "Timer.h"
#include <wtf/RetainPtr.h>
@@ -52,11 +52,28 @@ class WebCoreMovieObserver;
namespace WebCore {
-class MediaPlayerPrivate : Noncopyable {
+class MediaPlayerPrivate : public MediaPlayerPrivateInterface {
public:
- MediaPlayerPrivate(MediaPlayer*);
+ static void registerMediaEngine(MediaEngineRegistrar);
+
~MediaPlayerPrivate();
-
+
+ void repaint();
+ void loadStateChanged();
+ void rateChanged();
+ void sizeChanged();
+ void timeChanged();
+ void didEnd();
+
+private:
+ MediaPlayerPrivate(MediaPlayer*);
+
+ // engine support
+ static MediaPlayerPrivateInterface* create(MediaPlayer* player);
+ static void getSupportedTypes(HashSet<String>& types);
+ static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs);
+ static bool isAvailable();
+
IntSize naturalSize() const;
bool hasVideo() const;
@@ -72,11 +89,12 @@ public:
float duration() const;
float currentTime() const;
void seek(float time);
- void setEndTime(float time);
void setRate(float);
void setVolume(float);
-
+
+ void setEndTime(float time);
+
int dataRate() const;
MediaPlayer::NetworkState networkState() const { return m_networkState; }
@@ -89,21 +107,10 @@ public:
unsigned totalBytes() const;
void setVisible(bool);
- void setRect(const IntRect& r);
-
- void loadStateChanged();
- void rateChanged();
- void sizeChanged();
- void timeChanged();
- void didEnd();
+ void setSize(const IntSize&);
- void repaint();
void paint(GraphicsContext*, const IntRect&);
-
- static void getSupportedTypes(HashSet<String>& types);
- static bool isAvailable();
-
-private:
+
void createQTMovie(const String& url);
void setUpVideoRendering();
void tearDownVideoRendering();
@@ -117,10 +124,10 @@ private:
void doSeek();
void cancelSeek();
void seekTimerFired(Timer<MediaPlayerPrivate>*);
- void endPointTimerFired(Timer<MediaPlayerPrivate>*);
float maxTimeLoaded() const;
- void startEndPointTimerIfNeeded();
- void disableUnsupportedTracks(unsigned& enabledTrackCount);
+ void disableUnsupportedTracks();
+
+ bool metaDataAvailable() const { return m_qtMovie && m_readyState >= MediaPlayer::HaveMetadata; }
MediaPlayer* m_player;
RetainPtr<QTMovie> m_qtMovie;
@@ -128,14 +135,15 @@ private:
RetainPtr<QTVideoRendererWebKitOnly> m_qtVideoRenderer;
RetainPtr<WebCoreMovieObserver> m_objcObserver;
float m_seekTo;
- float m_endTime;
Timer<MediaPlayerPrivate> m_seekTimer;
- Timer<MediaPlayerPrivate> m_endPointTimer;
MediaPlayer::NetworkState m_networkState;
MediaPlayer::ReadyState m_readyState;
bool m_startedPlaying;
bool m_isStreaming;
bool m_visible;
+ IntRect m_rect;
+ unsigned m_enabledTrackCount;
+ float m_duration;
#if DRAW_FRAME_RATE
int m_frameCountWhilePlaying;
double m_timeStartedPlaying;