Reviewed by Oliver.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2007 18:46:23 +0000 (18:46 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2007 18:46:23 +0000 (18:46 +0000)
        Rename

        Movie -> MediaPlayer
        MoviePrivate -> MediaPlayerPrivate

        Movie is QuickTime terminology and clashes with its C API.

        * WebCore.xcodeproj/project.pbxproj:
        * html/HTMLMediaElement.cpp:
        (WebCore::HTMLMediaElement::HTMLMediaElement):
        (WebCore::HTMLMediaElement::~HTMLMediaElement):
        (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
        (WebCore::HTMLMediaElement::bufferingRate):
        (WebCore::HTMLMediaElement::load):
        (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
        (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
        (WebCore::HTMLMediaElement::setReadyState):
        (WebCore::HTMLMediaElement::progressEventTimerFired):
        (WebCore::HTMLMediaElement::seek):
        (WebCore::HTMLMediaElement::currentTime):
        (WebCore::HTMLMediaElement::duration):
        (WebCore::HTMLMediaElement::playbackRate):
        (WebCore::HTMLMediaElement::setPlaybackRate):
        (WebCore::HTMLMediaElement::play):
        (WebCore::HTMLMediaElement::pause):
        (WebCore::HTMLMediaElement::setVolume):
        (WebCore::HTMLMediaElement::setMuted):
        (WebCore::HTMLMediaElement::pickMedia):
        (WebCore::HTMLMediaElement::checkIfSeekNeeded):
        (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
        (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
        (WebCore::HTMLMediaElement::addCuePoint):
        (WebCore::HTMLMediaElement::buffered):
        (WebCore::HTMLMediaElement::seekable):
        (WebCore::HTMLMediaElement::effectiveStart):
        (WebCore::HTMLMediaElement::effectiveEnd):
        (WebCore::HTMLMediaElement::effectiveLoopStart):
        (WebCore::HTMLMediaElement::effectiveLoopEnd):
        (WebCore::HTMLMediaElement::updateMediaPlayer):
        (WebCore::HTMLMediaElement::willSaveToCache):
        * html/HTMLMediaElement.h:
        (WebCore::HTMLMediaElement::player):
        * html/HTMLVideoElement.cpp:
        (WebCore::HTMLVideoElement::videoWidth):
        (WebCore::HTMLVideoElement::videoHeight):
        * platform/MIMETypeRegistry.cpp:
        (WebCore::initialiseSupportedMediaMIMETypes):
        (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
        (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
        * platform/MIMETypeRegistry.h:
        * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
        (WebCore::MediaPlayer::MediaPlayer):
        (WebCore::MediaPlayer::~MediaPlayer):
        (WebCore::MediaPlayer::load):
        (WebCore::MediaPlayer::cancelLoad):
        (WebCore::MediaPlayer::play):
        (WebCore::MediaPlayer::pause):
        (WebCore::MediaPlayer::duration):
        (WebCore::MediaPlayer::currentTime):
        (WebCore::MediaPlayer::seek):
        (WebCore::MediaPlayer::paused):
        (WebCore::MediaPlayer::seeking):
        (WebCore::MediaPlayer::naturalSize):
        (WebCore::MediaPlayer::hasVideo):
        (WebCore::MediaPlayer::networkState):
        (WebCore::MediaPlayer::readyState):
        (WebCore::MediaPlayer::volume):
        (WebCore::MediaPlayer::setVolume):
        (WebCore::MediaPlayer::rate):
        (WebCore::MediaPlayer::setRate):
        (WebCore::MediaPlayer::muted):
        (WebCore::MediaPlayer::setMuted):
        (WebCore::MediaPlayer::dataRate):
        (WebCore::MediaPlayer::setEndTime):
        (WebCore::MediaPlayer::addCuePoint):
        (WebCore::MediaPlayer::removeCuePoint):
        (WebCore::MediaPlayer::clearCuePoints):
        (WebCore::MediaPlayer::maxTimeBuffered):
        (WebCore::MediaPlayer::maxTimeSeekable):
        (WebCore::MediaPlayer::bytesLoaded):
        (WebCore::MediaPlayer::totalBytesKnown):
        (WebCore::MediaPlayer::totalBytes):
        (WebCore::MediaPlayer::setRect):
        (WebCore::MediaPlayer::visible):
        (WebCore::MediaPlayer::setVisible):
        (WebCore::MediaPlayer::paint):
        (WebCore::MediaPlayer::getSupportedTypes):
        (WebCore::MediaPlayer::networkStateChanged):
        (WebCore::MediaPlayer::readyStateChanged):
        (WebCore::MediaPlayer::volumeChanged):
        (WebCore::MediaPlayer::timeChanged):
        (WebCore::MediaPlayer::cuePointReached):
        * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
        (WebCore::MediaPlayerClient::~MediaPlayerClient):
        (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
        (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
        (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
        (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
        (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
        * platform/graphics/Movie.cpp: Removed.
        * platform/graphics/Movie.h: Removed.
        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
        (WebCore::mediaPlayerPrivateErrorCallback):
        (WebCore::mediaPlayerPrivateEOSCallback):
        (WebCore::mediaPlayerPrivateStateCallback):
        (WebCore::mediaPlayerPrivateBufferingCallback):
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
        (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
        (WebCore::MediaPlayerPrivate::load):
        (WebCore::MediaPlayerPrivate::play):
        (WebCore::MediaPlayerPrivate::pause):
        (WebCore::MediaPlayerPrivate::duration):
        (WebCore::MediaPlayerPrivate::currentTime):
        (WebCore::MediaPlayerPrivate::seek):
        (WebCore::MediaPlayerPrivate::setEndTime):
        (WebCore::MediaPlayerPrivate::addCuePoint):
        (WebCore::MediaPlayerPrivate::removeCuePoint):
        (WebCore::MediaPlayerPrivate::clearCuePoints):
        (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
        (WebCore::MediaPlayerPrivate::cancelSeek):
        (WebCore::MediaPlayerPrivate::cuePointTimerFired):
        (WebCore::MediaPlayerPrivate::paused):
        (WebCore::MediaPlayerPrivate::seeking):
        (WebCore::MediaPlayerPrivate::naturalSize):
        (WebCore::MediaPlayerPrivate::hasVideo):
        (WebCore::MediaPlayerPrivate::setVolume):
        (WebCore::MediaPlayerPrivate::setMuted):
        (WebCore::MediaPlayerPrivate::setRate):
        (WebCore::MediaPlayerPrivate::dataRate):
        (WebCore::MediaPlayerPrivate::networkState):
        (WebCore::MediaPlayerPrivate::readyState):
        (WebCore::MediaPlayerPrivate::maxTimeBuffered):
        (WebCore::MediaPlayerPrivate::maxTimeSeekable):
        (WebCore::MediaPlayerPrivate::maxTimeLoaded):
        (WebCore::MediaPlayerPrivate::bytesLoaded):
        (WebCore::MediaPlayerPrivate::totalBytesKnown):
        (WebCore::MediaPlayerPrivate::totalBytes):
        (WebCore::MediaPlayerPrivate::cancelLoad):
        (WebCore::MediaPlayerPrivate::updateStates):
        (WebCore::MediaPlayerPrivate::loadStateChanged):
        (WebCore::MediaPlayerPrivate::rateChanged):
        (WebCore::MediaPlayerPrivate::sizeChanged):
        (WebCore::MediaPlayerPrivate::timeChanged):
        (WebCore::MediaPlayerPrivate::volumeChanged):
        (WebCore::MediaPlayerPrivate::didEnd):
        (WebCore::MediaPlayerPrivate::loadingFailed):
        (WebCore::MediaPlayerPrivate::setRect):
        (WebCore::MediaPlayerPrivate::setVisible):
        (WebCore::MediaPlayerPrivate::paint):
        (WebCore::MediaPlayerPrivate::getSupportedTypes):
        (WebCore::MediaPlayerPrivate::createGSTPlayBin):
        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
        * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
        * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
        (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
        (WebCore::MediaPlayerPrivate::createQTMovie):
        (WebCore::MediaPlayerPrivate::createQTMovieView):
        (WebCore::MediaPlayerPrivate::createQTTime):
        (WebCore::MediaPlayerPrivate::load):
        (WebCore::MediaPlayerPrivate::play):
        (WebCore::MediaPlayerPrivate::pause):
        (WebCore::MediaPlayerPrivate::duration):
        (WebCore::MediaPlayerPrivate::currentTime):
        (WebCore::MediaPlayerPrivate::seek):
        (WebCore::MediaPlayerPrivate::doSeek):
        (WebCore::MediaPlayerPrivate::cancelSeek):
        (WebCore::MediaPlayerPrivate::seekTimerFired):
        (WebCore::MediaPlayerPrivate::setEndTime):
        (WebCore::MediaPlayerPrivate::addCuePoint):
        (WebCore::MediaPlayerPrivate::removeCuePoint):
        (WebCore::MediaPlayerPrivate::clearCuePoints):
        (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
        (WebCore::MediaPlayerPrivate::cuePointTimerFired):
        (WebCore::MediaPlayerPrivate::paused):
        (WebCore::MediaPlayerPrivate::seeking):
        (WebCore::MediaPlayerPrivate::naturalSize):
        (WebCore::MediaPlayerPrivate::hasVideo):
        (WebCore::MediaPlayerPrivate::setVolume):
        (WebCore::MediaPlayerPrivate::setMuted):
        (WebCore::MediaPlayerPrivate::setRate):
        (WebCore::MediaPlayerPrivate::dataRate):
        (WebCore::MediaPlayerPrivate::networkState):
        (WebCore::MediaPlayerPrivate::readyState):
        (WebCore::MediaPlayerPrivate::maxTimeBuffered):
        (WebCore::MediaPlayerPrivate::maxTimeSeekable):
        (WebCore::MediaPlayerPrivate::maxTimeLoaded):
        (WebCore::MediaPlayerPrivate::bytesLoaded):
        (WebCore::MediaPlayerPrivate::totalBytesKnown):
        (WebCore::MediaPlayerPrivate::totalBytes):
        (WebCore::MediaPlayerPrivate::cancelLoad):
        (WebCore::MediaPlayerPrivate::updateStates):
        (WebCore::MediaPlayerPrivate::loadStateChanged):
        (WebCore::MediaPlayerPrivate::rateChanged):
        (WebCore::MediaPlayerPrivate::sizeChanged):
        (WebCore::MediaPlayerPrivate::timeChanged):
        (WebCore::MediaPlayerPrivate::volumeChanged):
        (WebCore::MediaPlayerPrivate::didEnd):
        (WebCore::MediaPlayerPrivate::setRect):
        (WebCore::MediaPlayerPrivate::setVisible):
        (WebCore::MediaPlayerPrivate::paint):
        (WebCore::MediaPlayerPrivate::getSupportedTypes):
        (-[WebCoreMovieObserver initWithCallback:WebCore::]):
        * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
        * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
        * rendering/RenderMedia.cpp:
        (WebCore::RenderMedia::player):
        * rendering/RenderMedia.h:
        * rendering/RenderVideo.cpp:
        (WebCore::RenderVideo::RenderVideo):
        (WebCore::RenderVideo::~RenderVideo):
        (WebCore::RenderVideo::videoSizeChanged):
        (WebCore::RenderVideo::paintReplaced):
        (WebCore::RenderVideo::layout):
        (WebCore::RenderVideo::updateFromElement):
        (WebCore::RenderVideo::updatePlayer):
        * rendering/RenderVideo.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

18 files changed:
WebCore/ChangeLog
WebCore/WebCore.pro
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/html/HTMLMediaElement.cpp
WebCore/html/HTMLMediaElement.h
WebCore/html/HTMLVideoElement.cpp
WebCore/platform/MIMETypeRegistry.cpp
WebCore/platform/MIMETypeRegistry.h
WebCore/platform/graphics/MediaPlayer.cpp [moved from WebCore/platform/graphics/Movie.cpp with 59% similarity]
WebCore/platform/graphics/MediaPlayer.h [moved from WebCore/platform/graphics/Movie.h with 83% similarity]
WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp [moved from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp with 72% similarity]
WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h [moved from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h with 72% similarity]
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h [moved from WebCore/platform/graphics/mac/MoviePrivateQTKit.h with 84% similarity]
WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm [moved from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm with 72% similarity]
WebCore/rendering/RenderMedia.cpp
WebCore/rendering/RenderMedia.h
WebCore/rendering/RenderVideo.cpp
WebCore/rendering/RenderVideo.h

index a024b51b9cc6a56848dae1a23dc5af53f4abe14d..67d702f04f35c45c2dc2de4023e7d85e9ff74cab 100644 (file)
@@ -1,3 +1,228 @@
+2007-12-05  Antti Koivisto  <antti@apple.com>
+
+        Reviewed by Oliver.
+
+        Rename
+
+        Movie -> MediaPlayer
+        MoviePrivate -> MediaPlayerPrivate
+        
+        Movie is QuickTime terminology and clashes with its C API.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::HTMLMediaElement):
+        (WebCore::HTMLMediaElement::~HTMLMediaElement):
+        (WebCore::HTMLMediaElement::initAndDispatchProgressEvent):
+        (WebCore::HTMLMediaElement::bufferingRate):
+        (WebCore::HTMLMediaElement::load):
+        (WebCore::HTMLMediaElement::mediaPlayerNetworkStateChanged):
+        (WebCore::HTMLMediaElement::mediaPlayerReadyStateChanged):
+        (WebCore::HTMLMediaElement::setReadyState):
+        (WebCore::HTMLMediaElement::progressEventTimerFired):
+        (WebCore::HTMLMediaElement::seek):
+        (WebCore::HTMLMediaElement::currentTime):
+        (WebCore::HTMLMediaElement::duration):
+        (WebCore::HTMLMediaElement::playbackRate):
+        (WebCore::HTMLMediaElement::setPlaybackRate):
+        (WebCore::HTMLMediaElement::play):
+        (WebCore::HTMLMediaElement::pause):
+        (WebCore::HTMLMediaElement::setVolume):
+        (WebCore::HTMLMediaElement::setMuted):
+        (WebCore::HTMLMediaElement::pickMedia):
+        (WebCore::HTMLMediaElement::checkIfSeekNeeded):
+        (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged):
+        (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
+        (WebCore::HTMLMediaElement::mediaPlayerCuePointReached):
+        (WebCore::HTMLMediaElement::addCuePoint):
+        (WebCore::HTMLMediaElement::buffered):
+        (WebCore::HTMLMediaElement::seekable):
+        (WebCore::HTMLMediaElement::effectiveStart):
+        (WebCore::HTMLMediaElement::effectiveEnd):
+        (WebCore::HTMLMediaElement::effectiveLoopStart):
+        (WebCore::HTMLMediaElement::effectiveLoopEnd):
+        (WebCore::HTMLMediaElement::updateMediaPlayer):
+        (WebCore::HTMLMediaElement::willSaveToCache):
+        * html/HTMLMediaElement.h:
+        (WebCore::HTMLMediaElement::player):
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::videoWidth):
+        (WebCore::HTMLVideoElement::videoHeight):
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::initialiseSupportedMediaMIMETypes):
+        (WebCore::MIMETypeRegistry::isSupportedMediaMIMEType):
+        (WebCore::MIMETypeRegistry::getSupportedMediaMIMETypes):
+        * platform/MIMETypeRegistry.h:
+        * platform/graphics/MediaPlayer.cpp: Copied from WebCore/platform/graphics/Movie.cpp.
+        (WebCore::MediaPlayer::MediaPlayer):
+        (WebCore::MediaPlayer::~MediaPlayer):
+        (WebCore::MediaPlayer::load):
+        (WebCore::MediaPlayer::cancelLoad):
+        (WebCore::MediaPlayer::play):
+        (WebCore::MediaPlayer::pause):
+        (WebCore::MediaPlayer::duration):
+        (WebCore::MediaPlayer::currentTime):
+        (WebCore::MediaPlayer::seek):
+        (WebCore::MediaPlayer::paused):
+        (WebCore::MediaPlayer::seeking):
+        (WebCore::MediaPlayer::naturalSize):
+        (WebCore::MediaPlayer::hasVideo):
+        (WebCore::MediaPlayer::networkState):
+        (WebCore::MediaPlayer::readyState):
+        (WebCore::MediaPlayer::volume):
+        (WebCore::MediaPlayer::setVolume):
+        (WebCore::MediaPlayer::rate):
+        (WebCore::MediaPlayer::setRate):
+        (WebCore::MediaPlayer::muted):
+        (WebCore::MediaPlayer::setMuted):
+        (WebCore::MediaPlayer::dataRate):
+        (WebCore::MediaPlayer::setEndTime):
+        (WebCore::MediaPlayer::addCuePoint):
+        (WebCore::MediaPlayer::removeCuePoint):
+        (WebCore::MediaPlayer::clearCuePoints):
+        (WebCore::MediaPlayer::maxTimeBuffered):
+        (WebCore::MediaPlayer::maxTimeSeekable):
+        (WebCore::MediaPlayer::bytesLoaded):
+        (WebCore::MediaPlayer::totalBytesKnown):
+        (WebCore::MediaPlayer::totalBytes):
+        (WebCore::MediaPlayer::setRect):
+        (WebCore::MediaPlayer::visible):
+        (WebCore::MediaPlayer::setVisible):
+        (WebCore::MediaPlayer::paint):
+        (WebCore::MediaPlayer::getSupportedTypes):
+        (WebCore::MediaPlayer::networkStateChanged):
+        (WebCore::MediaPlayer::readyStateChanged):
+        (WebCore::MediaPlayer::volumeChanged):
+        (WebCore::MediaPlayer::timeChanged):
+        (WebCore::MediaPlayer::cuePointReached):
+        * platform/graphics/MediaPlayer.h: Copied from WebCore/platform/graphics/Movie.h.
+        (WebCore::MediaPlayerClient::~MediaPlayerClient):
+        (WebCore::MediaPlayerClient::mediaPlayerNetworkStateChanged):
+        (WebCore::MediaPlayerClient::mediaPlayerReadyStateChanged):
+        (WebCore::MediaPlayerClient::mediaPlayerVolumeChanged):
+        (WebCore::MediaPlayerClient::mediaPlayerTimeChanged):
+        (WebCore::MediaPlayerClient::mediaPlayerCuePointReached):
+        * platform/graphics/Movie.cpp: Removed.
+        * platform/graphics/Movie.h: Removed.
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp.
+        (WebCore::mediaPlayerPrivateErrorCallback):
+        (WebCore::mediaPlayerPrivateEOSCallback):
+        (WebCore::mediaPlayerPrivateStateCallback):
+        (WebCore::mediaPlayerPrivateBufferingCallback):
+        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::load):
+        (WebCore::MediaPlayerPrivate::play):
+        (WebCore::MediaPlayerPrivate::pause):
+        (WebCore::MediaPlayerPrivate::duration):
+        (WebCore::MediaPlayerPrivate::currentTime):
+        (WebCore::MediaPlayerPrivate::seek):
+        (WebCore::MediaPlayerPrivate::setEndTime):
+        (WebCore::MediaPlayerPrivate::addCuePoint):
+        (WebCore::MediaPlayerPrivate::removeCuePoint):
+        (WebCore::MediaPlayerPrivate::clearCuePoints):
+        (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
+        (WebCore::MediaPlayerPrivate::cancelSeek):
+        (WebCore::MediaPlayerPrivate::cuePointTimerFired):
+        (WebCore::MediaPlayerPrivate::paused):
+        (WebCore::MediaPlayerPrivate::seeking):
+        (WebCore::MediaPlayerPrivate::naturalSize):
+        (WebCore::MediaPlayerPrivate::hasVideo):
+        (WebCore::MediaPlayerPrivate::setVolume):
+        (WebCore::MediaPlayerPrivate::setMuted):
+        (WebCore::MediaPlayerPrivate::setRate):
+        (WebCore::MediaPlayerPrivate::dataRate):
+        (WebCore::MediaPlayerPrivate::networkState):
+        (WebCore::MediaPlayerPrivate::readyState):
+        (WebCore::MediaPlayerPrivate::maxTimeBuffered):
+        (WebCore::MediaPlayerPrivate::maxTimeSeekable):
+        (WebCore::MediaPlayerPrivate::maxTimeLoaded):
+        (WebCore::MediaPlayerPrivate::bytesLoaded):
+        (WebCore::MediaPlayerPrivate::totalBytesKnown):
+        (WebCore::MediaPlayerPrivate::totalBytes):
+        (WebCore::MediaPlayerPrivate::cancelLoad):
+        (WebCore::MediaPlayerPrivate::updateStates):
+        (WebCore::MediaPlayerPrivate::loadStateChanged):
+        (WebCore::MediaPlayerPrivate::rateChanged):
+        (WebCore::MediaPlayerPrivate::sizeChanged):
+        (WebCore::MediaPlayerPrivate::timeChanged):
+        (WebCore::MediaPlayerPrivate::volumeChanged):
+        (WebCore::MediaPlayerPrivate::didEnd):
+        (WebCore::MediaPlayerPrivate::loadingFailed):
+        (WebCore::MediaPlayerPrivate::setRect):
+        (WebCore::MediaPlayerPrivate::setVisible):
+        (WebCore::MediaPlayerPrivate::paint):
+        (WebCore::MediaPlayerPrivate::getSupportedTypes):
+        (WebCore::MediaPlayerPrivate::createGSTPlayBin):
+        * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h: Copied from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h.
+        * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Removed.
+        * platform/graphics/gtk/MoviePrivateGStreamer.h: Removed.
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.h.
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Copied from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm.
+        (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
+        (WebCore::MediaPlayerPrivate::createQTMovie):
+        (WebCore::MediaPlayerPrivate::createQTMovieView):
+        (WebCore::MediaPlayerPrivate::createQTTime):
+        (WebCore::MediaPlayerPrivate::load):
+        (WebCore::MediaPlayerPrivate::play):
+        (WebCore::MediaPlayerPrivate::pause):
+        (WebCore::MediaPlayerPrivate::duration):
+        (WebCore::MediaPlayerPrivate::currentTime):
+        (WebCore::MediaPlayerPrivate::seek):
+        (WebCore::MediaPlayerPrivate::doSeek):
+        (WebCore::MediaPlayerPrivate::cancelSeek):
+        (WebCore::MediaPlayerPrivate::seekTimerFired):
+        (WebCore::MediaPlayerPrivate::setEndTime):
+        (WebCore::MediaPlayerPrivate::addCuePoint):
+        (WebCore::MediaPlayerPrivate::removeCuePoint):
+        (WebCore::MediaPlayerPrivate::clearCuePoints):
+        (WebCore::MediaPlayerPrivate::startCuePointTimerIfNeeded):
+        (WebCore::MediaPlayerPrivate::cuePointTimerFired):
+        (WebCore::MediaPlayerPrivate::paused):
+        (WebCore::MediaPlayerPrivate::seeking):
+        (WebCore::MediaPlayerPrivate::naturalSize):
+        (WebCore::MediaPlayerPrivate::hasVideo):
+        (WebCore::MediaPlayerPrivate::setVolume):
+        (WebCore::MediaPlayerPrivate::setMuted):
+        (WebCore::MediaPlayerPrivate::setRate):
+        (WebCore::MediaPlayerPrivate::dataRate):
+        (WebCore::MediaPlayerPrivate::networkState):
+        (WebCore::MediaPlayerPrivate::readyState):
+        (WebCore::MediaPlayerPrivate::maxTimeBuffered):
+        (WebCore::MediaPlayerPrivate::maxTimeSeekable):
+        (WebCore::MediaPlayerPrivate::maxTimeLoaded):
+        (WebCore::MediaPlayerPrivate::bytesLoaded):
+        (WebCore::MediaPlayerPrivate::totalBytesKnown):
+        (WebCore::MediaPlayerPrivate::totalBytes):
+        (WebCore::MediaPlayerPrivate::cancelLoad):
+        (WebCore::MediaPlayerPrivate::updateStates):
+        (WebCore::MediaPlayerPrivate::loadStateChanged):
+        (WebCore::MediaPlayerPrivate::rateChanged):
+        (WebCore::MediaPlayerPrivate::sizeChanged):
+        (WebCore::MediaPlayerPrivate::timeChanged):
+        (WebCore::MediaPlayerPrivate::volumeChanged):
+        (WebCore::MediaPlayerPrivate::didEnd):
+        (WebCore::MediaPlayerPrivate::setRect):
+        (WebCore::MediaPlayerPrivate::setVisible):
+        (WebCore::MediaPlayerPrivate::paint):
+        (WebCore::MediaPlayerPrivate::getSupportedTypes):
+        (-[WebCoreMovieObserver initWithCallback:WebCore::]):
+        * platform/graphics/mac/MoviePrivateQTKit.h: Removed.
+        * platform/graphics/mac/MoviePrivateQTKit.mm: Removed.
+        * rendering/RenderMedia.cpp:
+        (WebCore::RenderMedia::player):
+        * rendering/RenderMedia.h:
+        * rendering/RenderVideo.cpp:
+        (WebCore::RenderVideo::RenderVideo):
+        (WebCore::RenderVideo::~RenderVideo):
+        (WebCore::RenderVideo::videoSizeChanged):
+        (WebCore::RenderVideo::paintReplaced):
+        (WebCore::RenderVideo::layout):
+        (WebCore::RenderVideo::updateFromElement):
+        (WebCore::RenderVideo::updatePlayer):
+        * rendering/RenderVideo.h:
+
 2007-12-06  Geoffrey Garen  <ggaren@apple.com>
 
         Build fix: access global object directly.
index 6b27e7abe83cea5188604e9728f60e866b390b2a..8b7b25be369df2057743582dec599684de717ca9 100644 (file)
@@ -1099,14 +1099,14 @@ contains(DEFINES, ENABLE_VIDEO=1) {
         html/HTMLSourceElement.cpp \
         html/HTMLVideoElement.cpp \
         html/TimeRanges.cpp \
-        platform/graphics/Movie.cpp \
+        platform/graphics/MediaPlayer.cpp \
         rendering/RenderVideo.cpp \
         rendering/RenderMedia.cpp \
         bindings/js/JSHTMLAudioElementConstructor.cpp 
 
     gtk-port {
         SOURCES += \
-            platform/graphics/gtk/MoviePrivateGStreamer.cpp
+            platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
 
         PKGCONFIG += gstreamer-0.10 gstreamer-plugins-base-0.10 gnome-vfs-2.0
         LIBS += -lgstinterfaces-0.10 -lgstbase-0.10 -lgstvideo-0.10
index b58faade8988e82c75cc2a311b0c82df28d908a4..d310f9dbf73c84e817c46f94775a7dd433467497 100644 (file)
                E44613AF0CD6331000FADA75 /* TimeRanges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E446139D0CD6331000FADA75 /* TimeRanges.cpp */; };
                E44613B00CD6331000FADA75 /* TimeRanges.h in Headers */ = {isa = PBXBuildFile; fileRef = E446139E0CD6331000FADA75 /* TimeRanges.h */; };
                E44613B60CD6344E00FADA75 /* VoidCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = E44613B40CD6344E00FADA75 /* VoidCallback.h */; };
-               E44613E30CD6819F00FADA75 /* Movie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B41E0C0CBF90BD00AF2ECE /* Movie.cpp */; };
-               E44613E40CD681A200FADA75 /* Movie.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E0D0CBF90BD00AF2ECE /* Movie.h */; };
-               E44613E50CD681A600FADA75 /* MoviePrivateQTKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4B41E110CBF90EF00AF2ECE /* MoviePrivateQTKit.mm */; };
-               E44613E60CD681A900FADA75 /* MoviePrivateQTKit.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E100CBF90EF00AF2ECE /* MoviePrivateQTKit.h */; };
+               E44613E30CD6819F00FADA75 /* MediaPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B41E0C0CBF90BD00AF2ECE /* MediaPlayer.cpp */; };
+               E44613E40CD681A200FADA75 /* MediaPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E0D0CBF90BD00AF2ECE /* MediaPlayer.h */; };
+               E44613E50CD681A600FADA75 /* MediaPlayerPrivateQTKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4B41E110CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.mm */; };
+               E44613E60CD681A900FADA75 /* MediaPlayerPrivateQTKit.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E100CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.h */; };
                E44613EB0CD681B400FADA75 /* ProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B41E010CBF8EAA00AF2ECE /* ProgressEvent.cpp */; };
                E44613EC0CD681B500FADA75 /* ProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E4B41E020CBF8EAA00AF2ECE /* ProgressEvent.h */; };
                E44613ED0CD681BA00FADA75 /* JSProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B423850CBFB73C00AF2ECE /* JSProgressEvent.cpp */; };
                E4B41E030CBF8EAA00AF2ECE /* ProgressEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ProgressEvent.idl; sourceTree = "<group>"; };
                E4B41E070CBF8F2100AF2ECE /* JSHTMLAudioElementConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAudioElementConstructor.cpp; sourceTree = "<group>"; };
                E4B41E080CBF8F2100AF2ECE /* JSHTMLAudioElementConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLAudioElementConstructor.h; sourceTree = "<group>"; };
-               E4B41E0C0CBF90BD00AF2ECE /* Movie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Movie.cpp; sourceTree = "<group>"; };
-               E4B41E0D0CBF90BD00AF2ECE /* Movie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Movie.h; sourceTree = "<group>"; };
-               E4B41E100CBF90EF00AF2ECE /* MoviePrivateQTKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoviePrivateQTKit.h; sourceTree = "<group>"; };
-               E4B41E110CBF90EF00AF2ECE /* MoviePrivateQTKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MoviePrivateQTKit.mm; sourceTree = "<group>"; };
+               E4B41E0C0CBF90BD00AF2ECE /* MediaPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaPlayer.cpp; sourceTree = "<group>"; };
+               E4B41E0D0CBF90BD00AF2ECE /* MediaPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayer.h; sourceTree = "<group>"; };
+               E4B41E100CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerPrivateQTKit.h; sourceTree = "<group>"; };
+               E4B41E110CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MediaPlayerPrivateQTKit.mm; sourceTree = "<group>"; };
                E4B41E330CBFB60900AF2ECE /* RenderVideo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderVideo.cpp; sourceTree = "<group>"; };
                E4B41E340CBFB60900AF2ECE /* RenderVideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderVideo.h; sourceTree = "<group>"; };
                E4B4232E0CBFB66400AF2ECE /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
                                B275354F0B053814002CE64F /* IntPointMac.mm */,
                                B27535500B053814002CE64F /* IntRectMac.mm */,
                                B27535510B053814002CE64F /* IntSizeMac.mm */,
-                               E4B41E100CBF90EF00AF2ECE /* MoviePrivateQTKit.h */,
-                               E4B41E110CBF90EF00AF2ECE /* MoviePrivateQTKit.mm */,
+                               E4B41E100CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.h */,
+                               E4B41E110CBF90EF00AF2ECE /* MediaPlayerPrivateQTKit.mm */,
                        );
                        path = mac;
                        sourceTree = "<group>";
                                B27535470B053814002CE64F /* IntSize.h */,
                                B27535480B053814002CE64F /* IntSizeHash.h */,
                                B27535490B053814002CE64F /* mac */,
-                               E4B41E0C0CBF90BD00AF2ECE /* Movie.cpp */,
-                               E4B41E0D0CBF90BD00AF2ECE /* Movie.h */,
+                               E4B41E0C0CBF90BD00AF2ECE /* MediaPlayer.cpp */,
+                               E4B41E0D0CBF90BD00AF2ECE /* MediaPlayer.h */,
                                B27535520B053814002CE64F /* Path.cpp */,
                                B27535530B053814002CE64F /* Path.h */,
                                A88DD4880B4629B000C02990 /* PathTraversalState.cpp */,
                                935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */,
                                85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */,
                                93309DFC099E64920056E581 /* MoveSelectionCommand.h in Headers */,
-                               E44613E40CD681A200FADA75 /* Movie.h in Headers */,
-                               E44613E60CD681A900FADA75 /* MoviePrivateQTKit.h in Headers */,
+                               E44613E40CD681A200FADA75 /* MediaPlayer.h in Headers */,
+                               E44613E60CD681A900FADA75 /* MediaPlayerPrivateQTKit.h in Headers */,
                                85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */,
                                A818721E0977D3C0005826D9 /* NameNodeList.h in Headers */,
                                A8C4A80309D563270003AC8D /* NamedAttrMap.h in Headers */,
                                93EB355F09E37FD600F43799 /* MouseEventWithHitTestResults.cpp in Sources */,
                                85031B470A44EFC700F992E0 /* MouseRelatedEvent.cpp in Sources */,
                                93309DFB099E64920056E581 /* MoveSelectionCommand.cpp in Sources */,
-                               E44613E30CD6819F00FADA75 /* Movie.cpp in Sources */,
-                               E44613E50CD681A600FADA75 /* MoviePrivateQTKit.mm in Sources */,
+                               E44613E30CD6819F00FADA75 /* MediaPlayer.cpp in Sources */,
+                               E44613E50CD681A600FADA75 /* MediaPlayerPrivateQTKit.mm in Sources */,
                                85031B490A44EFC700F992E0 /* MutationEvent.cpp in Sources */,
                                A81872240977D3C0005826D9 /* NameNodeList.cpp in Sources */,
                                A8C4A80409D563270003AC8D /* NamedAttrMap.cpp in Sources */,
index d381f4d023f2d1193978c73f3e0119d45da2c87e..98ceca9ecd4dadf0623442eb777908dcb892e17c 100644 (file)
@@ -43,7 +43,7 @@
 #include "MediaList.h"
 #include "MediaQueryEvaluator.h"
 #include "MIMETypeRegistry.h"
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "RenderVideo.h"
 #include "SystemTime.h"
 #include "TimeRanges.h"
@@ -81,7 +81,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc)
     , m_bufferingRate(0)
     , m_loadNestingLevel(0)
     , m_terminateLoadBelowNestingLevel(0)
-    , m_movie(0)
+    , m_player(0)
 {
     document()->registerForCacheCallbacks(this);
 }
@@ -89,7 +89,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document* doc)
 HTMLMediaElement::~HTMLMediaElement()
 {
     document()->unregisterForCacheCallbacks(this);
-    delete m_movie;
+    delete m_player;
     for (HashMap<float, CallbackVector*>::iterator it = m_cuePoints.begin(); it != m_cuePoints.end(); ++it)
         delete it->second;
 }
@@ -152,9 +152,9 @@ void HTMLMediaElement::scheduleLoad()
 
 void HTMLMediaElement::initAndDispatchProgressEvent(const AtomicString& eventName)
 {
-    bool totalKnown = m_movie && m_movie->totalBytesKnown();
-    unsigned loaded = m_movie ? m_movie->bytesLoaded() : 0;
-    unsigned total = m_movie ? m_movie->totalBytes() : 0;
+    bool totalKnown = m_player && m_player->totalBytesKnown();
+    unsigned loaded = m_player ? m_player->bytesLoaded() : 0;
+    unsigned total = m_player ? m_player->totalBytes() : 0;
     dispatchProgressEvent(eventName, totalKnown, loaded, total);
 }
 
@@ -239,10 +239,10 @@ HTMLMediaElement::NetworkState HTMLMediaElement::networkState() const
 
 float HTMLMediaElement::bufferingRate()
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
     return m_bufferingRate;
-    //return m_movie->dataRate();
+    //return m_player->dataRate();
 }
 
 void HTMLMediaElement::load(ExceptionCode& ec)
@@ -284,9 +284,9 @@ void HTMLMediaElement::load(ExceptionCode& ec)
         m_readyState = DATA_UNAVAILABLE;
         m_paused = true;
         m_seeking = false;
-        if (m_movie) {
-            m_movie->pause();
-            m_movie->seek(0);
+        if (m_player) {
+            m_player->pause();
+            m_player->seek(0);
         }
         m_currentLoop = 0;
         dispatchHTMLEvent(emptiedEvent, false, true);
@@ -314,13 +314,13 @@ void HTMLMediaElement::load(ExceptionCode& ec)
         goto end;
     
     // 10, 11, 12, 13
-    delete m_movie;
-    m_movie = new Movie(this);
-    m_movie->setVolume(m_volume);
-    m_movie->setMuted(m_muted);
+    delete m_player;
+    m_player = new MediaPlayer(this);
+    m_player->setVolume(m_volume);
+    m_player->setMuted(m_muted);
     for (HashMap<float, CallbackVector*>::iterator it = m_cuePoints.begin(); it != m_cuePoints.end(); ++it)
-        m_movie->addCuePoint(it->first);
-    m_movie->load(m_currentSrc);
+        m_player->addCuePoint(it->first);
+    m_player->load(m_currentSrc);
     if (m_loadNestingLevel < m_terminateLoadBelowNestingLevel)
         goto end;
     
@@ -339,20 +339,20 @@ end:
 }
 
 
-void HTMLMediaElement::movieNetworkStateChanged(Movie*)
+void HTMLMediaElement::mediaPlayerNetworkStateChanged(MediaPlayer*)
 {
     if (!m_begun || m_networkState == EMPTY)
         return;
     
     m_terminateLoadBelowNestingLevel = m_loadNestingLevel;
 
-    Movie::NetworkState state = m_movie->networkState();
+    MediaPlayer::NetworkState state = m_player->networkState();
     
     // 3.14.9.4. Loading the media resource
     // 14
-    if (state == Movie::LoadFailed) {
-        //delete m_movie;
-        //m_movie = 0;
+    if (state == MediaPlayer::LoadFailed) {
+        //delete m_player;
+        //m_player = 0;
         // FIXME better error handling
         m_error = new MediaError(MediaError::MEDIA_ERR_NETWORK);
         m_begun = false;
@@ -372,11 +372,11 @@ void HTMLMediaElement::movieNetworkStateChanged(Movie*)
         return;
     }
     
-    if (state >= Movie::Loading && m_networkState < LOADING)
+    if (state >= MediaPlayer::Loading && m_networkState < LOADING)
         m_networkState = LOADING;
     
-    if (state >= Movie::LoadedMetaData && m_networkState < LOADED_METADATA) {
-        m_movie->seek(effectiveStart());
+    if (state >= MediaPlayer::LoadedMetaData && m_networkState < LOADED_METADATA) {
+        m_player->seek(effectiveStart());
         m_networkState = LOADED_METADATA;
         
         dispatchHTMLEvent(durationchangeEvent, false, true);
@@ -388,7 +388,7 @@ void HTMLMediaElement::movieNetworkStateChanged(Movie*)
             return;
     }
     
-    if (state >= Movie::LoadedFirstFrame && m_networkState < LOADED_FIRST_FRAME) {
+    if (state >= MediaPlayer::LoadedFirstFrame && m_networkState < LOADED_FIRST_FRAME) {
         m_networkState = LOADED_FIRST_FRAME;
         
         setReadyState(CAN_SHOW_CURRENT_FRAME);
@@ -415,7 +415,7 @@ void HTMLMediaElement::movieNetworkStateChanged(Movie*)
     }
     
     // 15
-    if (state == Movie::Loaded && m_networkState < LOADED) {
+    if (state == MediaPlayer::Loaded && m_networkState < LOADED) {
         m_begun = false;
         m_networkState = LOADED;
         m_progressEventTimer.stop();
@@ -424,9 +424,9 @@ void HTMLMediaElement::movieNetworkStateChanged(Movie*)
     }
 }
 
-void HTMLMediaElement::movieReadyStateChanged(Movie*)
+void HTMLMediaElement::mediaPlayerReadyStateChanged(MediaPlayer*)
 {
-    Movie::ReadyState state = m_movie->readyState();
+    MediaPlayer::ReadyState state = m_player->readyState();
     setReadyState((ReadyState)state);
 }
 
@@ -467,13 +467,13 @@ void HTMLMediaElement::setReadyState(ReadyState state)
             dispatchHTMLEvent(playEvent, false, true);
         }
     }
-    updateMovie();
+    updateMediaPlayer();
 }
 
 void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*)
 {
-    ASSERT(m_movie);
-    unsigned progress = m_movie->bytesLoaded();
+    ASSERT(m_player);
+    unsigned progress = m_player->bytesLoaded();
     double time = WebCore::currentTime();
     double timedelta = time - m_previousProgressTime;
     if (timedelta)
@@ -537,9 +537,9 @@ void HTMLMediaElement::seek(float time, ExceptionCode& ec)
     // 10
     // As soon as the user agent has established whether or not the media data for the new playback position is available, 
     // and, if it is, decoded enough data to play back that position, the seeking DOM attribute must be set to false.
-    if (m_movie) {
-        m_movie->setEndTime(maxTime);
-        m_movie->seek(time);
+    if (m_player) {
+        m_player->setEndTime(maxTime);
+        m_player->seek(time);
     }
 }
 
@@ -556,11 +556,11 @@ bool HTMLMediaElement::seeking() const
 // playback state
 float HTMLMediaElement::currentTime() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
     if (m_seeking)
         return m_currentTimeDuringSeek;
-    return m_movie->currentTime();
+    return m_player->currentTime();
 }
 
 void HTMLMediaElement::setCurrentTime(float time, ExceptionCode& ec)
@@ -570,7 +570,7 @@ void HTMLMediaElement::setCurrentTime(float time, ExceptionCode& ec)
 
 float HTMLMediaElement::duration() const
 {
-    return m_movie ? m_movie->duration() : 0;
+    return m_player ? m_player->duration() : 0;
 }
 
 bool HTMLMediaElement::paused() const
@@ -597,7 +597,7 @@ void HTMLMediaElement::setDefaultPlaybackRate(float rate, ExceptionCode& ec)
 
 float HTMLMediaElement::playbackRate() const
 {
-    return m_movie ? m_movie->rate() : 0;
+    return m_player ? m_player->rate() : 0;
 }
 
 void HTMLMediaElement::setPlaybackRate(float rate, ExceptionCode& ec)
@@ -606,8 +606,8 @@ void HTMLMediaElement::setPlaybackRate(float rate, ExceptionCode& ec)
         ec = NOT_SUPPORTED_ERR;
         return;
     }
-    if (m_movie && m_movie->rate() != rate) {
-        m_movie->setRate(rate);
+    if (m_player && m_player->rate() != rate) {
+        m_player->setRate(rate);
         dispatchEventAsync(ratechangeEvent);
     }
 }
@@ -630,7 +630,7 @@ void HTMLMediaElement::setAutoplay(bool b)
 void HTMLMediaElement::play(ExceptionCode& ec)
 {
     // 3.14.9.7. Playing the media resource
-    if (!m_movie || networkState() == EMPTY) {
+    if (!m_player || networkState() == EMPTY) {
         ec = 0;
         load(ec);
         if (ec)
@@ -650,13 +650,13 @@ void HTMLMediaElement::play(ExceptionCode& ec)
 
     m_autoplaying = false;
     
-    updateMovie();
+    updateMediaPlayer();
 }
 
 void HTMLMediaElement::pause(ExceptionCode& ec)
 {
     // 3.14.9.7. Playing the media resource
-    if (!m_movie || networkState() == EMPTY) {
+    if (!m_player || networkState() == EMPTY) {
         ec = 0;
         load(ec);
         if (ec)
@@ -671,7 +671,7 @@ void HTMLMediaElement::pause(ExceptionCode& ec)
 
     m_autoplaying = false;
     
-    updateMovie();
+    updateMediaPlayer();
 }
 
 unsigned HTMLMediaElement::playCount() const
@@ -771,8 +771,8 @@ void HTMLMediaElement::setVolume(float vol, ExceptionCode& ec)
         m_volume = vol;
         dispatchEventAsync(volumechangeEvent);
     
-        if (m_movie)
-            m_movie->setVolume(vol);
+        if (m_player)
+            m_player->setVolume(vol);
     }
 }
 
@@ -786,8 +786,8 @@ void HTMLMediaElement::setMuted(bool muted)
     if (m_muted != muted) {
         m_muted = muted;
         dispatchEventAsync(volumechangeEvent);
-        if (m_movie)
-            m_movie->setMuted(muted);
+        if (m_player)
+            m_player->setMuted(muted);
     }
 }
 
@@ -809,7 +809,7 @@ String HTMLMediaElement::pickMedia()
                 }
                 if (source->hasAttribute(typeAttr)) {
                     String type = source->type();
-                    if (!MIMETypeRegistry::isSupportedMovieMIMEType(type))
+                    if (!MIMETypeRegistry::isSupportedMediaMIMEType(type))
                         continue;
                 }
                 mediaSrc = source->src();
@@ -853,21 +853,21 @@ void HTMLMediaElement::checkIfSeekNeeded()
     if (m_currentLoop == playCount() - 1 && time > effectiveEnd())
         seek(effectiveEnd(), ec);
 
-    updateMovie();
+    updateMediaPlayer();
 }
 
-void HTMLMediaElement::movieVolumeChanged(Movie*)
+void HTMLMediaElement::mediaPlayerVolumeChanged(MediaPlayer*)
 {
-    if (!m_movie)
+    if (!m_player)
         return;
-    if (m_movie->volume() != m_volume || m_movie->muted() != m_muted) {
-        m_volume = m_movie->volume();
-        m_muted = m_movie->muted();
+    if (m_player->volume() != m_volume || m_player->muted() != m_muted) {
+        m_volume = m_player->volume();
+        m_muted = m_player->muted();
         dispatchEventAsync(volumechangeEvent);
     }
 }
 
-void HTMLMediaElement::movieTimeChanged(Movie*)
+void HTMLMediaElement::mediaPlayerTimeChanged(MediaPlayer*)
 {
     if (readyState() >= CAN_PLAY)
         m_seeking = false;
@@ -884,10 +884,10 @@ void HTMLMediaElement::movieTimeChanged(Movie*)
         dispatchHTMLEvent(endedEvent, false, true);
     }
 
-    updateMovie();
+    updateMediaPlayer();
 }
 
-void HTMLMediaElement::movieCuePointReached(Movie*, float cueTime)
+void HTMLMediaElement::mediaPlayerCuePointReached(MediaPlayer*, float cueTime)
 {
     CallbackVector* callbackVector = m_cuePoints.get(cueTime);
     if (!callbackVector)
@@ -921,8 +921,8 @@ void HTMLMediaElement::addCuePoint(float time, VoidCallback* voidCallback, bool
     }
     callbackVector->append(CallbackEntry(voidCallback, pause));
     
-    if (m_movie)
-        m_movie->addCuePoint(time);
+    if (m_player)
+        m_player->addCuePoint(time);
 }
 
 void HTMLMediaElement::removeCuePoint(float time, VoidCallback* callback)
@@ -935,9 +935,9 @@ void HTMLMediaElement::removeCuePoint(float time, VoidCallback* callback)
 PassRefPtr<TimeRanges> HTMLMediaElement::buffered() const
 {
     // FIXME real ranges support
-    if (!m_movie || !m_movie->maxTimeBuffered())
+    if (!m_player || !m_player->maxTimeBuffered())
         return new TimeRanges;
-    return new TimeRanges(0, m_movie->maxTimeBuffered());
+    return new TimeRanges(0, m_player->maxTimeBuffered());
 }
 
 PassRefPtr<TimeRanges> HTMLMediaElement::played() const
@@ -949,37 +949,37 @@ PassRefPtr<TimeRanges> HTMLMediaElement::played() const
 PassRefPtr<TimeRanges> HTMLMediaElement::seekable() const
 {
     // FIXME real ranges support
-    if (!m_movie || !m_movie->maxTimeSeekable())
+    if (!m_player || !m_player->maxTimeSeekable())
         return new TimeRanges;
-    return new TimeRanges(0, m_movie->maxTimeSeekable());
+    return new TimeRanges(0, m_player->maxTimeSeekable());
 }
 
 float HTMLMediaElement::effectiveStart() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
-    return min(start(), m_movie->duration());
+    return min(start(), m_player->duration());
 }
 
 float HTMLMediaElement::effectiveEnd() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
-    return min(max(end(), max(start(), loopStart())), m_movie->duration());
+    return min(max(end(), max(start(), loopStart())), m_player->duration());
 }
 
 float HTMLMediaElement::effectiveLoopStart() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
-    return min(loopStart(), m_movie->duration());
+    return min(loopStart(), m_player->duration());
 }
 
 float HTMLMediaElement::effectiveLoopEnd() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
-    return min(max(start(), max(loopStart(), loopEnd())), m_movie->duration());
+    return min(max(start(), max(loopStart(), loopEnd())), m_player->duration());
 }
 
 bool HTMLMediaElement::activelyPlaying() const
@@ -992,18 +992,18 @@ bool HTMLMediaElement::endedPlayback() const
     return networkState() >= LOADED_METADATA && currentTime() >= effectiveEnd() && currentLoop() == playCount() - 1;
 }
 
-void HTMLMediaElement::updateMovie()
+void HTMLMediaElement::updateMediaPlayer()
 {
-    if (!m_movie)
+    if (!m_player)
         return;
     
-    m_movie->setEndTime(currentLoop() == playCount() - 1 ? effectiveEnd() : effectiveLoopEnd());
+    m_player->setEndTime(currentLoop() == playCount() - 1 ? effectiveEnd() : effectiveLoopEnd());
 
     bool shouldBePlaying = activelyPlaying() && currentTime() < effectiveEnd();
-    if (shouldBePlaying && m_movie->paused())
-        m_movie->play();
-    else if (!shouldBePlaying && !m_movie->paused())
-        m_movie->pause();
+    if (shouldBePlaying && m_player->paused())
+        m_player->play();
+    else if (!shouldBePlaying && !m_player->paused())
+        m_player->pause();
     
     if (renderer())
         renderer()->updateFromElement();
@@ -1014,8 +1014,8 @@ void HTMLMediaElement::willSaveToCache()
     // 3.14.9.4. Loading the media resource
     // 14
     if (m_begun) {
-        if (m_movie)
-            m_movie->cancelLoad();
+        if (m_player)
+            m_player->cancelLoad();
         m_error = new MediaError(MediaError::MEDIA_ERR_ABORTED);
         m_begun = false;
         initAndDispatchProgressEvent(abortEvent);
@@ -1029,8 +1029,8 @@ void HTMLMediaElement::willSaveToCache()
     m_wasPlayingBeforeMovingToPageCache = !paused();
     if (m_wasPlayingBeforeMovingToPageCache)
         pause(ec);
-    if (m_movie)
-        m_movie->setVisible(false);
+    if (m_player)
+        m_player->setVisible(false);
 }
 
 void HTMLMediaElement::didRestoreFromCache()
index f26343a26c392f2cef3578ca96620e64beaa36ef..e01abfabd5df36d859ecb3fb3d5cc007721bdac4 100644 (file)
@@ -29,7 +29,7 @@
 #if ENABLE(VIDEO)
 
 #include "HTMLElement.h"
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "Timer.h"
 #include "StringHash.h"
 #include "VoidCallback.h"
@@ -43,7 +43,7 @@ namespace WebCore {
 class MediaError;
 class TimeRanges;
     
-class HTMLMediaElement : public HTMLElement, public MovieClient {
+class HTMLMediaElement : public HTMLElement, public MediaPlayerClient {
 public:
     HTMLMediaElement(const QualifiedName&, Document*);
     virtual ~HTMLMediaElement();
@@ -57,7 +57,7 @@ public:
     virtual void insertedIntoDocument();
     virtual void removedFromDocument();
     
-    Movie* movie() const { return m_movie; }
+    MediaPlayer* player() const { return m_player; }
     
     virtual bool isVideo() const { return false; }
     
@@ -140,12 +140,12 @@ protected:
     
     void setReadyState(ReadyState);
     
-private: // MovieObserver
-    virtual void movieNetworkStateChanged(Movie*);
-    virtual void movieReadyStateChanged(Movie*);
-    virtual void movieTimeChanged(Movie*);
-    virtual void movieVolumeChanged(Movie*);
-    virtual void movieCuePointReached(Movie*, float cueTime);
+private: // MediaPlayerObserver
+    virtual void mediaPlayerNetworkStateChanged(MediaPlayer*);
+    virtual void mediaPlayerReadyStateChanged(MediaPlayer*);
+    virtual void mediaPlayerTimeChanged(MediaPlayer*);
+    virtual void mediaPlayerVolumeChanged(MediaPlayer*);
+    virtual void mediaPlayerCuePointReached(MediaPlayer*, float cueTime);
         
 private:
     void loadTimerFired(Timer<HTMLMediaElement>*);
@@ -155,7 +155,7 @@ private:
     void checkIfSeekNeeded();
     
     String pickMedia();
-    void updateMovie();
+    void updateMediaPlayer();
     float effectiveStart() const;
     float effectiveEnd() const;
     float effectiveLoopStart() const;
@@ -212,7 +212,7 @@ protected:
     typedef Vector<CallbackEntry> CallbackVector;
     HashMap<float, CallbackVector*> m_cuePoints;
     
-    Movie* m_movie;
+    MediaPlayer* m_player;
 };
 
 } //namespace
index 7aa7a2199e9764d3493b37873cc962ed4140a4ff..4a2b2c96fd99295f27236f350da8f094aea32098 100644 (file)
@@ -104,16 +104,16 @@ void HTMLVideoElement::parseMappedAttribute(MappedAttribute *attr)
 
 int HTMLVideoElement::videoWidth() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
-    return m_movie->naturalSize().width();
+    return m_player->naturalSize().width();
 }
 
 int HTMLVideoElement::videoHeight() const
 {
-    if (!m_movie)
+    if (!m_player)
         return 0;
-    return m_movie->naturalSize().height();
+    return m_player->naturalSize().height();
 }
 
 int HTMLVideoElement::width() const
index 5b70916eb6c4c85fcaefc76df12e7b9d603aa577..9fb24d15b36977172cef87c1bd363aadb0d45fe1 100644 (file)
@@ -26,7 +26,7 @@
 #include "config.h"
 #include "MIMETypeRegistry.h"
 
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "StringHash.h"
 #include <wtf/HashMap.h>
 #include <wtf/HashSet.h>
@@ -45,7 +45,7 @@ namespace WebCore
 static WTF::HashSet<String>* supportedImageResourceMIMETypes;
 static WTF::HashSet<String>* supportedImageMIMETypes;
 static WTF::HashSet<String>* supportedNonImageMIMETypes;
-static WTF::HashSet<String>* supportedMovieMIMETypes;
+static WTF::HashSet<String>* supportedMediaMIMETypes;
 
 #if PLATFORM(CG)
 extern String getMIMETypeForUTI(const String& uti);
@@ -147,11 +147,11 @@ static void initialiseSupportedNonImageMimeTypes()
       supportedNonImageMIMETypes->add(types[i]);
 }
     
-static void initialiseSupportedMovieMIMETypes()
+static void initialiseSupportedMediaMIMETypes()
 {
-    supportedMovieMIMETypes = new WTF::HashSet<String>();
+    supportedMediaMIMETypes = new WTF::HashSet<String>();
 #if ENABLE(VIDEO)
-    Movie::getSupportedTypes(*supportedMovieMIMETypes);
+    MediaPlayer::getSupportedTypes(*supportedMediaMIMETypes);
 #endif
 }
 
@@ -196,11 +196,11 @@ bool MIMETypeRegistry::isSupportedNonImageMIMEType(const String& mimeType)
     return !mimeType.isEmpty() && supportedNonImageMIMETypes->contains(mimeType);
 }
 
-bool MIMETypeRegistry::isSupportedMovieMIMEType(const String& mimeType)
+bool MIMETypeRegistry::isSupportedMediaMIMEType(const String& mimeType)
 {
-    if (!supportedMovieMIMETypes)
-        initialiseSupportedMovieMIMETypes();
-    return !mimeType.isEmpty() && supportedMovieMIMETypes->contains(mimeType);     
+    if (!supportedMediaMIMETypes)
+        initialiseSupportedMediaMIMETypes();
+    return !mimeType.isEmpty() && supportedMediaMIMETypes->contains(mimeType);     
 }
     
     
@@ -236,11 +236,11 @@ HashSet<String> &MIMETypeRegistry::getSupportedNonImageMIMETypes()
     return *supportedNonImageMIMETypes;
 }
 
-HashSet<String> &MIMETypeRegistry::getSupportedMovieMIMETypes()
+HashSet<String> &MIMETypeRegistry::getSupportedMediaMIMETypes()
 {
-    if (!supportedMovieMIMETypes)
-        initialiseSupportedMovieMIMETypes();
-    return *supportedMovieMIMETypes;
+    if (!supportedMediaMIMETypes)
+        initialiseSupportedMediaMIMETypes();
+    return *supportedMediaMIMETypes;
 }
     
 }
index b34e80beb9bdbaa9af35a14b431597f4b1b6e308..24520f42589082ac107bc6a11df384c39deeeb41 100644 (file)
@@ -52,8 +52,8 @@ public:
     // document in a frame.
     static bool isSupportedNonImageMIMEType(const String& mimeType);
     
-    // Check to see if a mime type is suitable for being loaded using <movie>
-    static bool isSupportedMovieMIMEType(const String& mimeType); 
+    // Check to see if a mime type is suitable for being loaded using <video> and <audio>
+    static bool isSupportedMediaMIMEType(const String& mimeType); 
 
     // Check to see if a mime type is a valid Java applet mime type
     static bool isJavaAppletMIMEType(const String& mimeType);
@@ -61,7 +61,7 @@ public:
     static HashSet<String>& getSupportedImageMIMETypes();
     static HashSet<String>& getSupportedImageResourceMIMETypes();
     static HashSet<String>& getSupportedNonImageMIMETypes();
-    static HashSet<String>& getSupportedMovieMIMETypes();
+    static HashSet<String>& getSupportedMediaMIMETypes();
 };
 
 } // namespace WebCore
similarity index 59%
rename from WebCore/platform/graphics/Movie.cpp
rename to WebCore/platform/graphics/MediaPlayer.cpp
index 98cd7e3f774b33b39f547525730272d3db27d014..62c17fd0c6abbba34daf82b9b035331431897f1c 100644 (file)
 #include "config.h"
 
 #if ENABLE(VIDEO)
-#include "Movie.h"
+#include "MediaPlayer.h"
 
 #include "IntRect.h"
 #include "MIMETypeRegistry.h"
 
 #if PLATFORM(MAC)
-#include "MoviePrivateQTKit.h"
+#include "MediaPlayerPrivateQTKit.h"
 #elif PLATFORM(GTK)
-#include "MoviePrivateGStreamer.h"
+#include "MediaPlayerPrivateGStreamer.h"
 #endif
 
 namespace WebCore {
     
-    Movie::Movie(MovieClient* client)
-    : m_movieClient(client)
-    , m_private(new MoviePrivate(this))
+    MediaPlayer::MediaPlayer(MediaPlayerClient* client)
+    : m_mediaPlayerClient(client)
+    , m_private(new MediaPlayerPrivate(this))
     , m_parentWidget(0)
     , m_visible(false)
     , m_rate(1.0f)
@@ -50,82 +50,82 @@ namespace WebCore {
 {
 }
 
-Movie::~Movie()
+MediaPlayer::~MediaPlayer()
 {
     delete m_private;
 }
 
-void Movie::load(String url)
+void MediaPlayer::load(String url)
 {
     m_private->load(url);
 }    
 
-void Movie::cancelLoad()
+void MediaPlayer::cancelLoad()
 {
     m_private->cancelLoad();
 }    
 
-void Movie::play()
+void MediaPlayer::play()
 {
     m_private->play();
 }
 
-void Movie::pause()
+void MediaPlayer::pause()
 {
     m_private->pause();
 }
 
-float Movie::duration() const
+float MediaPlayer::duration() const
 {
     return m_private->duration();
 }
 
-float Movie::currentTime() const
+float MediaPlayer::currentTime() const
 {
     return m_private->currentTime();  
 }
 
-void Movie::seek(float time)
+void MediaPlayer::seek(float time)
 {
     m_private->seek(time);
 }
 
-bool Movie::paused() const
+bool MediaPlayer::paused() const
 {
     return m_private->paused();
 }
 
-bool Movie::seeking() const
+bool MediaPlayer::seeking() const
 {
     return m_private->seeking();
 }
 
-IntSize Movie::naturalSize()
+IntSize MediaPlayer::naturalSize()
 {
     return m_private->naturalSize();
 }
 
-bool Movie::hasVideo()
+bool MediaPlayer::hasVideo()
 {
     return m_private->hasVideo();
 }
 
-Movie::NetworkState Movie::networkState()
+MediaPlayer::NetworkState MediaPlayer::networkState()
 {
     return m_private->networkState();
 }
 
-Movie::ReadyState Movie::readyState()
+MediaPlayer::ReadyState MediaPlayer::readyState()
 {
     return m_private->readyState();
 }
 
-float Movie::volume() const
+float MediaPlayer::volume() const
 {
     return m_volume;
 }
 
-void Movie::setVolume(float volume)
+void MediaPlayer::setVolume(float volume)
 {
     if (volume != m_volume) {
         m_volume = volume;
@@ -133,12 +133,12 @@ void Movie::setVolume(float volume)
     }
 }
 
-float Movie::rate() const
+float MediaPlayer::rate() const
 {
     return m_rate;
 }
 
-void Movie::setRate(float rate)
+void MediaPlayer::setRate(float rate)
 {
     if (rate == m_rate) 
         return;
@@ -146,12 +146,12 @@ void Movie::setRate(float rate)
     m_private->setRate(rate);   
 }
 
-bool Movie::muted() const
+bool MediaPlayer::muted() const
 {
     return m_muted;
 }
 
-void Movie::setMuted(bool muted)
+void MediaPlayer::setMuted(bool muted)
 {
     if (muted == m_muted) 
         return;
@@ -159,17 +159,17 @@ void Movie::setMuted(bool muted)
     m_private->setMuted(muted);
 }
 
-int Movie::dataRate() const
+int MediaPlayer::dataRate() const
 {
     return m_private->dataRate();
 }
 
-void Movie::setEndTime(float time)
+void MediaPlayer::setEndTime(float time)
 {
     m_private->setEndTime(time);
 }
 
-void Movie::addCuePoint(float time)
+void MediaPlayer::addCuePoint(float time)
 {
     if (m_cuePoints.contains(time))
         return;
@@ -177,7 +177,7 @@ void Movie::addCuePoint(float time)
     m_private->addCuePoint(time);
 }
 
-void Movie::removeCuePoint(float time)
+void MediaPlayer::removeCuePoint(float time)
 {
     if (!m_cuePoints.contains(time))
         return;
@@ -185,38 +185,38 @@ void Movie::removeCuePoint(float time)
     m_private->removeCuePoint(time);
 }
 
-void Movie::clearCuePoints()
+void MediaPlayer::clearCuePoints()
 {
     m_cuePoints.clear();
     m_private->clearCuePoints();
 }
 
-float Movie::maxTimeBuffered()
+float MediaPlayer::maxTimeBuffered()
 {
     return m_private->maxTimeBuffered();
 }
 
-float Movie::maxTimeSeekable()
+float MediaPlayer::maxTimeSeekable()
 {
     return m_private->maxTimeSeekable();
 }
 
-unsigned Movie::bytesLoaded()
+unsigned MediaPlayer::bytesLoaded()
 {
     return m_private->bytesLoaded();
 }
 
-bool Movie::totalBytesKnown()
+bool MediaPlayer::totalBytesKnown()
 {
     return m_private->totalBytesKnown();
 }
 
-unsigned Movie::totalBytes()
+unsigned MediaPlayer::totalBytes()
 {
     return m_private->totalBytes();
 }
 
-void Movie::setRect(const IntRect& r) 
+void MediaPlayer::setRect(const IntRect& r) 
 { 
     if (m_rect == r)
         return;
@@ -224,12 +224,12 @@ void Movie::setRect(const IntRect& r)
     m_private->setRect(r);
 }
 
-bool Movie::visible() const
+bool MediaPlayer::visible() const
 {
     return m_visible;
 }
 
-void Movie::setVisible(bool b)
+void MediaPlayer::setVisible(bool b)
 {
     if (m_visible == b)
         return;
@@ -237,44 +237,44 @@ void Movie::setVisible(bool b)
     m_private->setVisible(b);
 }
 
-void Movie::paint(GraphicsContext* p, const IntRect& r)
+void MediaPlayer::paint(GraphicsContext* p, const IntRect& r)
 {
     m_private->paint(p, r);
 }
 
-void Movie::getSupportedTypes(HashSet<String>& types)
+void MediaPlayer::getSupportedTypes(HashSet<String>& types)
 {
-    MoviePrivate::getSupportedTypes(types);
+    MediaPlayerPrivate::getSupportedTypes(types);
 } 
 
-void Movie::networkStateChanged()
+void MediaPlayer::networkStateChanged()
 {
-    if (m_movieClient)
-        m_movieClient->movieNetworkStateChanged(this);
+    if (m_mediaPlayerClient)
+        m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this);
 }
 
-void Movie::readyStateChanged()
+void MediaPlayer::readyStateChanged()
 {
-    if (m_movieClient)
-        m_movieClient->movieReadyStateChanged(this);
+    if (m_mediaPlayerClient)
+        m_mediaPlayerClient->mediaPlayerReadyStateChanged(this);
 }
 
-void Movie::volumeChanged()
+void MediaPlayer::volumeChanged()
 {
-    if (m_movieClient)
-        m_movieClient->movieVolumeChanged(this);
+    if (m_mediaPlayerClient)
+        m_mediaPlayerClient->mediaPlayerVolumeChanged(this);
 }
 
-void Movie::timeChanged()
+void MediaPlayer::timeChanged()
 {
-    if (m_movieClient)
-        m_movieClient->movieTimeChanged(this);
+    if (m_mediaPlayerClient)
+        m_mediaPlayerClient->mediaPlayerTimeChanged(this);
 }
 
-void Movie::cuePointReached(float cueTime)
+void MediaPlayer::cuePointReached(float cueTime)
 {
-    if (m_movieClient)
-        m_movieClient->movieCuePointReached(this, cueTime);
+    if (m_mediaPlayerClient)
+        m_mediaPlayerClient->mediaPlayerCuePointReached(this, cueTime);
 }
 
 }
similarity index 83%
rename from WebCore/platform/graphics/Movie.h
rename to WebCore/platform/graphics/MediaPlayer.h
index d322195fad4615e4e78adc0908762466e0f5e87b..2609556baa364b4131b4ee6aeea1608fdeb814f5 100644 (file)
@@ -23,8 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef Movie_h
-#define Movie_h
+#ifndef MediaPlayer_h
+#define MediaPlayer_h
 
 #if ENABLE(VIDEO)
 
@@ -37,26 +37,26 @@ namespace WebCore {
 
 class GraphicsContext;
 class IntSize;
-class Movie;
-class MoviePrivate;
+class MediaPlayer;
+class MediaPlayerPrivate;
 class String;
 class Widget;
 
-class MovieClient
+class MediaPlayerClient
 {
 public:
-    virtual ~MovieClient() { }
-    virtual void movieNetworkStateChanged(Movie*) { }
-    virtual void movieReadyStateChanged(Movie*) { }
-    virtual void movieVolumeChanged(Movie*) { }
-    virtual void movieTimeChanged(Movie*) { }
-    virtual void movieCuePointReached(Movie*, float cueTime) { }
+    virtual ~MediaPlayerClient() { }
+    virtual void mediaPlayerNetworkStateChanged(MediaPlayer*) { }
+    virtual void mediaPlayerReadyStateChanged(MediaPlayer*) { }
+    virtual void mediaPlayerVolumeChanged(MediaPlayer*) { }
+    virtual void mediaPlayerTimeChanged(MediaPlayer*) { }
+    virtual void mediaPlayerCuePointReached(MediaPlayer*, float cueTime) { }
 };
 
-class Movie : Noncopyable {
+class MediaPlayer : Noncopyable {
 public:
-    Movie(MovieClient*);
-    virtual ~Movie();
+    MediaPlayer(MediaPlayerClient*);
+    virtual ~MediaPlayer();
     
     static void getSupportedTypes(HashSet<String>&);
     
@@ -124,10 +124,10 @@ public:
 
 private:
         
-    friend class MoviePrivate;
+    friend class MediaPlayerPrivate;
     
-    MovieClient* m_movieClient;
-    MoviePrivate* m_private;
+    MediaPlayerClient* m_mediaPlayerClient;
+    MediaPlayerPrivate* m_private;
     Widget* m_parentWidget;
     IntRect m_rect;
     bool m_visible;
similarity index 72%
rename from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.cpp
rename to WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp
index e230ac305c836b5a509e3b52cdad9098980295a6..5bddcbdf765b391766268e1f4d8e98f91f2f1ab7 100644 (file)
@@ -22,7 +22,7 @@
 
 #if ENABLE(VIDEO)
 
-#include "MoviePrivateGStreamer.h"
+#include "MediaPlayerPrivateGStreamer.h"
 
 #include "CString.h"
 #include "CString.h"
@@ -30,7 +30,7 @@
 #include "IntRect.h"
 #include "KURL.h"
 #include "MIMETypeRegistry.h"
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "NotImplemented.h"
 #include "ScrollView.h"
 #include "Widget.h"
@@ -49,7 +49,7 @@ using namespace std;
 
 namespace WebCore {
 
-gboolean moviePrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data)
+gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data)
 {
     if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_ERROR)
     {
@@ -59,7 +59,7 @@ gboolean moviePrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer da
         gst_message_parse_error(message, &err, &debug);
         if (err->code == 3) {
             LOG_VERBOSE(Media, "File not found");
-            MoviePrivate* mp = reinterpret_cast<MoviePrivate*>(data);
+            MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data);
             if (mp)
                 mp->loadingFailed();
         } else {
@@ -71,28 +71,28 @@ gboolean moviePrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer da
     return true;
 }
 
-gboolean moviePrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data)
+gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data)
 {
     if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_EOS)
     {
         LOG_VERBOSE(Media, "End of Stream");
-        MoviePrivate* mp = reinterpret_cast<MoviePrivate*>(data);
+        MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data);
         mp->didEnd();
     }
     return true;
 }
 
-gboolean moviePrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data)
+gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data)
 {
     if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_STATE_CHANGED)
     {
-        MoviePrivate* mp = reinterpret_cast<MoviePrivate*>(data);
+        MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data);
         mp->updateStates();
     }
     return true;
 }
 
-gboolean moviePrivateBufferingCallback(GstBus* bus, GstMessage* message, gpointer data)
+gboolean mediaPlayerPrivateBufferingCallback(GstBus* bus, GstMessage* message, gpointer data)
 {
     if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_BUFFERING)
     {
@@ -103,8 +103,8 @@ gboolean moviePrivateBufferingCallback(GstBus* bus, GstMessage* message, gpointe
     return true;
 }
 
-MoviePrivate::MoviePrivate(Movie* movie)
-    : m_movie(movie)
+MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
+    : m_player(player)
     , m_playBin(0)
     , m_videoSink(0)
     , m_source(0)
@@ -113,8 +113,8 @@ MoviePrivate::MoviePrivate(Movie* movie)
     , m_isEndReached(false)
     , m_volume(0.5f)
     , m_previousTimeCueTimerFired(0)
-    , m_networkState(Movie::Empty)
-    , m_readyState(Movie::DataUnavailable)
+    , m_networkState(MediaPlayer::Empty)
+    , m_readyState(MediaPlayer::DataUnavailable)
     , m_startedPlaying(false)
     , m_isStreaming(false)
 {
@@ -122,29 +122,29 @@ MoviePrivate::MoviePrivate(Movie* movie)
     gst_init(0, NULL);
 }
 
-MoviePrivate::~MoviePrivate()
+MediaPlayerPrivate::~MediaPlayerPrivate()
 {
     gst_element_set_state(m_playBin, GST_STATE_NULL);
     gst_object_unref(GST_OBJECT(m_playBin));
 }
 
-void MoviePrivate::load(String url)
+void MediaPlayerPrivate::load(String url)
 {
     LOG_VERBOSE(Media, "Load %s", url.utf8().data());
-    if (m_networkState != Movie::Loading) {
-        m_networkState = Movie::Loading;
-        m_movie->networkStateChanged();
+    if (m_networkState != MediaPlayer::Loading) {
+        m_networkState = MediaPlayer::Loading;
+        m_player->networkStateChanged();
     }
-    if (m_readyState != Movie::DataUnavailable) {
-        m_readyState = Movie::DataUnavailable;
-        m_movie->readyStateChanged();
+    if (m_readyState != MediaPlayer::DataUnavailable) {
+        m_readyState = MediaPlayer::DataUnavailable;
+        m_player->readyStateChanged();
     }
 
     createGSTPlayBin(url);
     pause();
 }
 
-void MoviePrivate::play()
+void MediaPlayerPrivate::play()
 {
     LOG_VERBOSE(Media, "Play");
     // When end reached, rewind for Test video-seek-past-end-playing
@@ -156,14 +156,14 @@ void MoviePrivate::play()
     m_startedPlaying = true;
 }
 
-void MoviePrivate::pause()
+void MediaPlayerPrivate::pause()
 {
     LOG_VERBOSE(Media, "Pause");
     gst_element_set_state(m_playBin, GST_STATE_PAUSED);
     m_startedPlaying = false;
 }
 
-float MoviePrivate::duration()
+float MediaPlayerPrivate::duration()
 {
     if (!m_playBin)
         return 0.0;
@@ -184,7 +184,7 @@ float MoviePrivate::duration()
     // FIXME: handle 3.14.9.5 properly
 }
 
-float MoviePrivate::currentTime() const
+float MediaPlayerPrivate::currentTime() const
 {
     if (!m_playBin)
         return 0;
@@ -211,7 +211,7 @@ float MoviePrivate::currentTime() const
     return ret;
 }
 
-void MoviePrivate::seek(float time)
+void MediaPlayerPrivate::seek(float time)
 {
     GstClockTime sec = (GstClockTime)(time * GST_SECOND);
 
@@ -231,7 +231,7 @@ void MoviePrivate::seek(float time)
         LOG_VERBOSE(Media, "Seek to %f failed", time);
 }
 
-void MoviePrivate::setEndTime(float time)
+void MediaPlayerPrivate::setEndTime(float time)
 {
     if (!m_playBin)
         return;
@@ -252,48 +252,48 @@ void MoviePrivate::setEndTime(float time)
     }
 }
 
-void MoviePrivate::addCuePoint(float time)
+void MediaPlayerPrivate::addCuePoint(float time)
 {
     notImplemented();
 }
 
-void MoviePrivate::removeCuePoint(float time)
+void MediaPlayerPrivate::removeCuePoint(float time)
 {
     notImplemented();
 }
 
-void MoviePrivate::clearCuePoints()
+void MediaPlayerPrivate::clearCuePoints()
 {
     notImplemented();
 }
 
-void MoviePrivate::startCuePointTimerIfNeeded()
+void MediaPlayerPrivate::startCuePointTimerIfNeeded()
 {
     notImplemented();
 }
 
-void MoviePrivate::cancelSeek()
+void MediaPlayerPrivate::cancelSeek()
 {
     notImplemented();
 }
 
-void MoviePrivate::cuePointTimerFired(Timer<MoviePrivate>*)
+void MediaPlayerPrivate::cuePointTimerFired(Timer<MediaPlayerPrivate>*)
 {
     notImplemented();
 }
 
-bool MoviePrivate::paused() const
+bool MediaPlayerPrivate::paused() const
 {
     return !m_startedPlaying;
 }
 
-bool MoviePrivate::seeking() const
+bool MediaPlayerPrivate::seeking() const
 {
     return false;;
 }
 
 // Returns the size of the video
-IntSize MoviePrivate::naturalSize()
+IntSize MediaPlayerPrivate::naturalSize()
 {
     int x = 0, y = 0;
     if (hasVideo()) {
@@ -305,7 +305,7 @@ IntSize MoviePrivate::naturalSize()
     return IntSize(x, y);
 }
 
-bool MoviePrivate::hasVideo()
+bool MediaPlayerPrivate::hasVideo()
 {
     gint currentVideo = -1;
     if (m_playBin)
@@ -313,14 +313,14 @@ bool MoviePrivate::hasVideo()
     return currentVideo > -1;
 }
 
-void MoviePrivate::setVolume(float volume)
+void MediaPlayerPrivate::setVolume(float volume)
 {
     m_volume = volume;
     LOG_VERBOSE(Media, "Volume to %f", volume);
     setMuted(false);
 }
 
-void MoviePrivate::setMuted(bool b)
+void MediaPlayerPrivate::setMuted(bool b)
 {
     if (!m_playBin) 
         return;
@@ -333,7 +333,7 @@ void MoviePrivate::setMuted(bool b)
     }
 }
 
-void MoviePrivate::setRate(float rate)
+void MediaPlayerPrivate::setRate(float rate)
 {
     if (rate == 0.0) {
         gst_element_set_state(m_playBin, GST_STATE_PAUSED);
@@ -352,23 +352,23 @@ void MoviePrivate::setRate(float rate)
         LOG_VERBOSE(Media, "Set Rate to %f failed", rate);
 }
 
-int MoviePrivate::dataRate() const
+int MediaPlayerPrivate::dataRate() const
 {
     notImplemented();
     return 1;
 }
 
-Movie::NetworkState MoviePrivate::networkState()
+MediaPlayer::NetworkState MediaPlayerPrivate::networkState()
 {
     return m_networkState;
 }
 
-Movie::ReadyState MoviePrivate::readyState()
+MediaPlayer::ReadyState MediaPlayerPrivate::readyState()
 {
     return m_readyState;
 }
 
-float MoviePrivate::maxTimeBuffered()
+float MediaPlayerPrivate::maxTimeBuffered()
 {
     notImplemented();
     LOG_VERBOSE(Media, "maxTimeBuffered");
@@ -376,7 +376,7 @@ float MoviePrivate::maxTimeBuffered()
     return m_isStreaming ? 0 : maxTimeLoaded();
 }
 
-float MoviePrivate::maxTimeSeekable()
+float MediaPlayerPrivate::maxTimeSeekable()
 {
     // TODO
     LOG_VERBOSE(Media, "maxTimeSeekable");
@@ -386,7 +386,7 @@ float MoviePrivate::maxTimeSeekable()
     return maxTimeLoaded();
 }
 
-float MoviePrivate::maxTimeLoaded()
+float MediaPlayerPrivate::maxTimeLoaded()
 {
     // TODO
     LOG_VERBOSE(Media, "maxTimeLoaded");
@@ -394,7 +394,7 @@ float MoviePrivate::maxTimeLoaded()
     return duration();
 }
 
-unsigned MoviePrivate::bytesLoaded()
+unsigned MediaPlayerPrivate::bytesLoaded()
 {
     notImplemented();
     LOG_VERBOSE(Media, "bytesLoaded");
@@ -407,14 +407,14 @@ unsigned MoviePrivate::bytesLoaded()
     return 1;//totalBytes() * maxTime / dur;
 }
 
-bool MoviePrivate::totalBytesKnown()
+bool MediaPlayerPrivate::totalBytesKnown()
 {
     notImplemented();
     LOG_VERBOSE(Media, "totalBytesKnown");
     return totalBytes() > 0;
 }
 
-unsigned MoviePrivate::totalBytes()
+unsigned MediaPlayerPrivate::totalBytes()
 {
     notImplemented();
     LOG_VERBOSE(Media, "totalBytes");
@@ -429,19 +429,19 @@ unsigned MoviePrivate::totalBytes()
     return 100;
 }
 
-void MoviePrivate::cancelLoad()
+void MediaPlayerPrivate::cancelLoad()
 {
     notImplemented();
 }
 
-void MoviePrivate::updateStates()
+void MediaPlayerPrivate::updateStates()
 {
     // There is no (known) way to get such level of information about
     // the state of GStreamer, therefore, when in PAUSED state,
     // we are sure we can display the first frame and go to play
 
-    Movie::NetworkState oldNetworkState = m_networkState;
-    Movie::ReadyState oldReadyState = m_readyState;
+    MediaPlayer::NetworkState oldNetworkState = m_networkState;
+    MediaPlayer::ReadyState oldReadyState = m_readyState;
     GstState state;
     GstState pending;
 
@@ -458,12 +458,12 @@ void MoviePrivate::updateStates()
             gst_element_state_get_name(pending));
 
         if (state == GST_STATE_READY) {
-            m_readyState = Movie::CanPlayThrough;
+            m_readyState = MediaPlayer::CanPlayThrough;
         } else if (state == GST_STATE_PAUSED) {
-            m_readyState = Movie::CanPlayThrough;
+            m_readyState = MediaPlayer::CanPlayThrough;
         }
-        if (m_networkState < Movie::Loaded)
-            m_networkState = Movie::Loaded;
+        if (m_networkState < MediaPlayer::Loaded)
+            m_networkState = MediaPlayer::Loaded;
 
         g_object_get(m_playBin, "source", &m_source, NULL);
         if (!m_source)
@@ -481,12 +481,12 @@ void MoviePrivate::updateStates()
             gst_element_state_get_name(state),
             gst_element_state_get_name(pending));
         if (state == GST_STATE_READY) {
-            m_readyState = Movie::CanPlay;
+            m_readyState = MediaPlayer::CanPlay;
         } else if (state == GST_STATE_PAUSED) {
-            m_readyState = Movie::CanPlay;
+            m_readyState = MediaPlayer::CanPlay;
         }
-        if (m_networkState < Movie::LoadedMetaData)
-            m_networkState = Movie::LoadedMetaData;
+        if (m_networkState < MediaPlayer::LoadedMetaData)
+            m_networkState = MediaPlayer::LoadedMetaData;
         break;
     default:
         LOG_VERBOSE(Media, "Else : %d", ret);
@@ -494,76 +494,76 @@ void MoviePrivate::updateStates()
     }
 
     if (seeking())
-        m_readyState = Movie::DataUnavailable;
+        m_readyState = MediaPlayer::DataUnavailable;
 
     if (m_networkState != oldNetworkState) {
         LOG_VERBOSE(Media, "Network State Changed from %u to %u",
             oldNetworkState, m_networkState);
-        m_movie->networkStateChanged();
+        m_player->networkStateChanged();
     }
     if (m_readyState != oldReadyState) {
         LOG_VERBOSE(Media, "Ready State Changed from %u to %u",
             oldReadyState, m_readyState);
-        m_movie->readyStateChanged();
+        m_player->readyStateChanged();
     }
 }
 
-void MoviePrivate::loadStateChanged()
+void MediaPlayerPrivate::loadStateChanged()
 {
     updateStates();
 }
 
-void MoviePrivate::rateChanged()
+void MediaPlayerPrivate::rateChanged()
 {
     updateStates();
 }
 
-void MoviePrivate::sizeChanged()
+void MediaPlayerPrivate::sizeChanged()
 {
     notImplemented();
 }
 
-void MoviePrivate::timeChanged()
+void MediaPlayerPrivate::timeChanged()
 {
     updateStates();
-    m_movie->timeChanged();
+    m_player->timeChanged();
 }
 
-void MoviePrivate::volumeChanged()
+void MediaPlayerPrivate::volumeChanged()
 {
-    m_movie->volumeChanged();
+    m_player->volumeChanged();
 }
 
-void MoviePrivate::didEnd()
+void MediaPlayerPrivate::didEnd()
 {
     m_isEndReached = true;
     pause();
     timeChanged();
 }
 
-void MoviePrivate::loadingFailed()
+void MediaPlayerPrivate::loadingFailed()
 {
-    if (m_networkState != Movie::LoadFailed) {
-        m_networkState = Movie::LoadFailed;
-        m_movie->networkStateChanged();
+    if (m_networkState != MediaPlayer::LoadFailed) {
+        m_networkState = MediaPlayer::LoadFailed;
+        m_player->networkStateChanged();
     }
-    if (m_readyState != Movie::DataUnavailable) {
-        m_readyState = Movie::DataUnavailable;
-        m_movie->readyStateChanged();
+    if (m_readyState != MediaPlayer::DataUnavailable) {
+        m_readyState = MediaPlayer::DataUnavailable;
+        m_player->readyStateChanged();
     }
 }
 
-void MoviePrivate::setRect(const IntRect& r)
+void MediaPlayerPrivate::setRect(const IntRect& r)
 {
     notImplemented();
 }
 
-void MoviePrivate::setVisible(bool b)
+void MediaPlayerPrivate::setVisible(bool b)
 {
     notImplemented();
 }
 
-void MoviePrivate::paint(GraphicsContext* p, const IntRect& r)
+void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r)
 {
     // FIXME: do the real thing
     if (p->paintingDisabled())
@@ -572,14 +572,14 @@ void MoviePrivate::paint(GraphicsContext* p, const IntRect& r)
     p->drawRect(r);
 }
 
-void MoviePrivate::getSupportedTypes(HashSet<String>& types)
+void MediaPlayerPrivate::getSupportedTypes(HashSet<String>& types)
 {
     // FIXME: do the real thing
     notImplemented();
     types.add(String("video/x-theora+ogg"));
 }
 
-void MoviePrivate::createGSTPlayBin(String url)
+void MediaPlayerPrivate::createGSTPlayBin(String url)
 {
     GstElement* audioSink;
     GstBus* bus;
@@ -590,10 +590,10 @@ void MoviePrivate::createGSTPlayBin(String url)
 
     gst_bus_add_signal_watch(bus);
 
-    g_signal_connect(bus, "message::error", G_CALLBACK(moviePrivateErrorCallback), this);
-    g_signal_connect(bus, "message::eos", G_CALLBACK(moviePrivateEOSCallback), this);
-    g_signal_connect(bus, "message::state-changed", G_CALLBACK(moviePrivateStateCallback), this);
-    g_signal_connect(bus, "message::buffering", G_CALLBACK(moviePrivateBufferingCallback), this);
+    g_signal_connect(bus, "message::error", G_CALLBACK(mediaPlayerPrivateErrorCallback), this);
+    g_signal_connect(bus, "message::eos", G_CALLBACK(mediaPlayerPrivateEOSCallback), this);
+    g_signal_connect(bus, "message::state-changed", G_CALLBACK(mediaPlayerPrivateStateCallback), this);
+    g_signal_connect(bus, "message::buffering", G_CALLBACK(mediaPlayerPrivateBufferingCallback), this);
 
     gst_object_unref(bus);
 
similarity index 72%
rename from WebCore/platform/graphics/gtk/MoviePrivateGStreamer.h
rename to WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h
index 76c39a6880346fa41720eda9f9001c91d0ffdfa4..1c961370cf81ee0c3396670d1a06c79ddf173ad9 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef MoviePrivateGStreamer_h
-#define MoviePrivateGStreamer_h
+#ifndef MediaPlayerPrivateGStreamer_h
+#define MediaPlayerPrivateGStreamer_h
 
 #if ENABLE(VIDEO)
 
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "Timer.h"
 #include "wtf/Noncopyable.h"
 
@@ -40,19 +40,19 @@ namespace WebCore {
     class IntRect;
     class String;
 
-    gboolean moviePrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data);
-    gboolean moviePrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data);
-    gboolean moviePrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data);
+    gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data);
+    gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data);
+    gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data);
 
-    class MoviePrivate : Noncopyable
+    class MediaPlayerPrivate : Noncopyable
     {
-    friend gboolean moviePrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data);
-    friend gboolean moviePrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data);
-    friend gboolean moviePrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data);
+    friend gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data);
+    friend gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data);
+    friend gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data);
 
     public:
-        MoviePrivate(Movie* m);
-        ~MoviePrivate();
+        MediaPlayerPrivate(MediaPlayer* m);
+        ~MediaPlayerPrivate();
 
         IntSize naturalSize();
         bool hasVideo();
@@ -81,8 +81,8 @@ namespace WebCore {
 
         int dataRate() const;
 
-        Movie::NetworkState networkState();
-        Movie::ReadyState readyState();
+        MediaPlayer::NetworkState networkState();
+        MediaPlayer::ReadyState readyState();
 
         float maxTimeBuffered();
         float maxTimeSeekable();
@@ -108,14 +108,14 @@ namespace WebCore {
 
         void updateStates();
         void cancelSeek();
-        void cuePointTimerFired(Timer<MoviePrivate>*);
+        void cuePointTimerFired(Timer<MediaPlayerPrivate>*);
         float maxTimeLoaded();
         void startCuePointTimerIfNeeded();
 
         void createGSTPlayBin(String url);
 
     private:
-        Movie* m_movie;
+        MediaPlayer* m_player;
         GstElement* m_playBin;
         GstElement* m_videoSink;
         GstElement* m_source;
@@ -124,8 +124,8 @@ namespace WebCore {
         bool m_isEndReached;
         double m_volume;
         float m_previousTimeCueTimerFired;
-        Movie::NetworkState m_networkState;
-        Movie::ReadyState m_readyState;
+        MediaPlayer::NetworkState m_networkState;
+        MediaPlayer::ReadyState m_readyState;
         bool m_startedPlaying;
         bool m_isStreaming;
     };
similarity index 84%
rename from WebCore/platform/graphics/mac/MoviePrivateQTKit.h
rename to WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
index a5621cf1494165d58b45d9f01f93b1993ac67f06..abfd784ed8ef28774cdb42aae0b6c99aa8b20ae1 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef MoviePrivateQTKit_h
-#define MoviePrivateQTKit_h
+#ifndef MediaPlayerPrivateQTKit_h
+#define MediaPlayerPrivateQTKit_h
 
 #if ENABLE(VIDEO)
 
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "Timer.h"
 #include "wtf/RetainPtr.h"
 #include "wtf/Noncopyable.h"
@@ -52,11 +52,11 @@ class IntSize;
 class IntRect;
 class String;
 
-class MoviePrivate : Noncopyable
+class MediaPlayerPrivate : Noncopyable
 {
 public:
-    MoviePrivate(Movie* m);
-    ~MoviePrivate();
+    MediaPlayerPrivate(MediaPlayer*);
+    ~MediaPlayerPrivate();
     
     IntSize naturalSize();
     bool hasVideo();
@@ -85,8 +85,8 @@ public:
     
     int dataRate() const;
     
-    Movie::NetworkState networkState();
-    Movie::ReadyState readyState();
+    MediaPlayer::NetworkState networkState();
+    MediaPlayer::ReadyState readyState();
     
     float maxTimeBuffered();
     float maxTimeSeekable();
@@ -116,23 +116,23 @@ private:
     void updateStates();
     void doSeek();
     void cancelSeek();
-    void seekTimerFired(Timer<MoviePrivate>*);
-    void cuePointTimerFired(Timer<MoviePrivate>*);
+    void seekTimerFired(Timer<MediaPlayerPrivate>*);
+    void cuePointTimerFired(Timer<MediaPlayerPrivate>*);
     float maxTimeLoaded();
     void startCuePointTimerIfNeeded();
     
 private:    
-    Movie* m_movie;
+    MediaPlayer* m_player;
     RetainPtr<QTMovie> m_qtMovie;
     RetainPtr<QTMovieView> m_qtMovieView;
     RetainPtr<WebCoreMovieObserver> m_objcObserver;
     float m_seekTo;
     float m_endTime;
-    Timer<MoviePrivate> m_seekTimer;
-    Timer<MoviePrivate> m_cuePointTimer;
+    Timer<MediaPlayerPrivate> m_seekTimer;
+    Timer<MediaPlayerPrivate> m_cuePointTimer;
     float m_previousTimeCueTimerFired;
-    Movie::NetworkState m_networkState;
-    Movie::ReadyState m_readyState;
+    MediaPlayer::NetworkState m_networkState;
+    MediaPlayer::ReadyState m_readyState;
     bool m_startedPlaying;
     bool m_isStreaming;
 };
similarity index 72%
rename from WebCore/platform/graphics/mac/MoviePrivateQTKit.mm
rename to WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index 09f1f32cdc4c7d1744f1e4b2d9d96848f4133f21..1780506aca9cff67d01b952d2f78e54ac31d30d0 100644 (file)
@@ -26,7 +26,7 @@
 #import "config.h"
 
 #if ENABLE(VIDEO)
-#import "MoviePrivateQTKit.h"
+#import "MediaPlayerPrivateQTKit.h"
 
 #import "BlockExceptions.h"
 #import "DeprecatedString.h"
@@ -35,7 +35,7 @@
 #import "KURL.h"
 #import <limits>
 #import "MIMETypeRegistry.h"
-#import "Movie.h"
+#import "MediaPlayer.h"
 #import <QTKit/QTKit.h>
 #import "ScrollView.h"
 #import "WebCoreSystemInterface.h"
 
 @interface WebCoreMovieObserver : NSObject
 {
-    WebCore::MoviePrivate* _callback;
+    WebCore::MediaPlayerPrivate* _callback;
     BOOL _delayCallbacks;
 }
--(id)initWithCallback:(WebCore::MoviePrivate *)c;
+-(id)initWithCallback:(WebCore::MediaPlayerPrivate *)c;
 -(void)disconnect;
 -(void)setDelayCallbacks:(BOOL)b;
 -(void)loadStateChanged:(NSNotification *)notification;
 
 namespace WebCore {
     
-MoviePrivate::MoviePrivate(Movie* movie)
-    : m_movie(movie)
+MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player)
+    : m_player(player)
     , m_qtMovie(nil)
     , m_qtMovieView(nil)
     , m_objcObserver(AdoptNS, [[WebCoreMovieObserver alloc] initWithCallback:this])
     , m_seekTo(-1)
     , m_endTime(std::numeric_limits<float>::infinity())
-    , m_seekTimer(this, &MoviePrivate::seekTimerFired)
-    , m_cuePointTimer(this, &MoviePrivate::cuePointTimerFired)
+    , m_seekTimer(this, &MediaPlayerPrivate::seekTimerFired)
+    , m_cuePointTimer(this, &MediaPlayerPrivate::cuePointTimerFired)
     , m_previousTimeCueTimerFired(0)
-    , m_networkState(Movie::Empty)
-    , m_readyState(Movie::DataUnavailable)
+    , m_networkState(MediaPlayer::Empty)
+    , m_readyState(MediaPlayer::DataUnavailable)
     , m_startedPlaying(false)
     , m_isStreaming(false)
 {
 }
 
 
-MoviePrivate::~MoviePrivate()
+MediaPlayerPrivate::~MediaPlayerPrivate()
 {
     if (m_qtMovieView)
         [m_qtMovieView.get() removeFromSuperview];
@@ -86,7 +86,7 @@ MoviePrivate::~MoviePrivate()
     [m_objcObserver.get() disconnect];
 }
 
-void MoviePrivate::createQTMovie(String url)
+void MediaPlayerPrivate::createQTMovie(String url)
 {
     [[NSNotificationCenter defaultCenter] removeObserver:m_objcObserver.get()];
     
@@ -101,8 +101,8 @@ void MoviePrivate::createQTMovie(String url)
     if (!m_qtMovie)
         return;
     
-    [m_qtMovie.get() setVolume: m_movie->volume()];
-    [m_qtMovie.get() setMuted: m_movie->muted()];
+    [m_qtMovie.get() setVolume: m_player->volume()];
+    [m_qtMovie.get() setMuted: m_player->muted()];
     
     [[NSNotificationCenter defaultCenter] addObserver:m_objcObserver.get()
                                              selector:@selector(loadStateChanged:) 
@@ -130,16 +130,16 @@ void MoviePrivate::createQTMovie(String url)
                                                object:m_qtMovie.get()];
 }
 
-void MoviePrivate::createQTMovieView()
+void MediaPlayerPrivate::createQTMovieView()
 {
     if (m_qtMovieView) {
         [m_qtMovieView.get() removeFromSuperview];
         m_qtMovieView = nil;
     }
-    if (!m_movie->m_parentWidget || !m_qtMovie)
+    if (!m_player->m_parentWidget || !m_qtMovie)
         return;
-    m_qtMovieView = [[[QTMovieView alloc] initWithFrame:m_movie->rect()] autorelease];
-    NSView* parentView = static_cast<ScrollView*>(m_movie->m_parentWidget)->getDocumentView();
+    m_qtMovieView = [[[QTMovieView alloc] initWithFrame:m_player->rect()] autorelease];
+    NSView* parentView = static_cast<ScrollView*>(m_player->m_parentWidget)->getDocumentView();
     [parentView addSubview:m_qtMovieView.get()];
     [m_qtMovieView.get() setMovie:m_qtMovie.get()];
     [m_qtMovieView.get() setControllerVisible:NO];
@@ -150,7 +150,7 @@ void MoviePrivate::createQTMovieView()
     wkQTMovieViewSetDrawSynchronously(m_qtMovieView.get(), YES);
 }
 
-QTTime MoviePrivate::createQTTime(float time)
+QTTime MediaPlayerPrivate::createQTTime(float time)
 {
     if (!m_qtMovie)
         return QTMakeTime(0, 600);
@@ -158,15 +158,15 @@ QTTime MoviePrivate::createQTTime(float time)
     return QTMakeTime((long long)(time * timeScale), timeScale);
 }
 
-void MoviePrivate::load(String url)
+void MediaPlayerPrivate::load(String url)
 {
-    if (m_networkState != Movie::Loading) {
-        m_networkState = Movie::Loading;
-        m_movie->networkStateChanged();
+    if (m_networkState != MediaPlayer::Loading) {
+        m_networkState = MediaPlayer::Loading;
+        m_player->networkStateChanged();
     }
-    if (m_readyState != Movie::DataUnavailable) {
-        m_readyState = Movie::DataUnavailable;
-        m_movie->readyStateChanged();
+    if (m_readyState != MediaPlayer::DataUnavailable) {
+        m_readyState = MediaPlayer::DataUnavailable;
+        m_player->readyStateChanged();
     }
     cancelSeek();
     m_cuePointTimer.stop();
@@ -174,25 +174,25 @@ void MoviePrivate::load(String url)
     [m_objcObserver.get() setDelayCallbacks:YES];
 
     createQTMovie(url);
-    if (m_movie->visible())
+    if (m_player->visible())
         createQTMovieView();
 
     [m_objcObserver.get() loadStateChanged:nil];
     [m_objcObserver.get() setDelayCallbacks:NO];
 }
 
-void MoviePrivate::play()
+void MediaPlayerPrivate::play()
 {
     if (!m_qtMovie)
         return;
     m_startedPlaying = true;
     [m_objcObserver.get() setDelayCallbacks:YES];
-    [m_qtMovie.get() setRate: m_movie->rate()];
+    [m_qtMovie.get() setRate: m_player->rate()];
     [m_objcObserver.get() setDelayCallbacks:NO];
     startCuePointTimerIfNeeded();
 }
 
-void MoviePrivate::pause()
+void MediaPlayerPrivate::pause()
 {
     if (!m_qtMovie)
         return;
@@ -203,7 +203,7 @@ void MoviePrivate::pause()
     m_cuePointTimer.stop();
 }
 
-float MoviePrivate::duration() const
+float MediaPlayerPrivate::duration() const
 {
     if (!m_qtMovie)
         return 0;
@@ -213,7 +213,7 @@ float MoviePrivate::duration() const
     return (float)time.timeValue / time.timeScale;
 }
 
-float MoviePrivate::currentTime() const
+float MediaPlayerPrivate::currentTime() const
 {
     if (!m_qtMovie)
         return 0;
@@ -223,7 +223,7 @@ float MoviePrivate::currentTime() const
     return current;
 }
 
-void MoviePrivate::seek(float time)
+void MediaPlayerPrivate::seek(float time)
 {
     cancelSeek();
     
@@ -240,7 +240,7 @@ void MoviePrivate::seek(float time)
         m_seekTimer.start(0, 0.5f);
 }
     
-void MoviePrivate::doSeek() 
+void MediaPlayerPrivate::doSeek() 
 {
     QTTime qttime = createQTTime(m_seekTo);
     // setCurrentTime generates several event callbacks, update afterwards
@@ -256,63 +256,63 @@ void MoviePrivate::doSeek()
     [m_objcObserver.get() setDelayCallbacks:NO];
 }
 
-void MoviePrivate::cancelSeek()
+void MediaPlayerPrivate::cancelSeek()
 {
     m_seekTo = -1;
     m_seekTimer.stop();
 }
 
-void MoviePrivate::seekTimerFired(Timer<MoviePrivate>*)
+void MediaPlayerPrivate::seekTimerFired(Timer<MediaPlayerPrivate>*)
 {        
     if (!m_qtMovie || !seeking() || currentTime() == m_seekTo) {
         cancelSeek();
         updateStates();
-        m_movie->timeChanged(); 
+        m_player->timeChanged(); 
         return;
     } 
     
     if (maxTimeLoaded() >= m_seekTo)
         doSeek();
     else {
-        Movie::NetworkState state = networkState();
-        if (state == Movie::Empty || state == Movie::Loaded) {
+        MediaPlayer::NetworkState state = networkState();
+        if (state == MediaPlayer::Empty || state == MediaPlayer::Loaded) {
             cancelSeek();
             updateStates();
-            m_movie->timeChanged();
+            m_player->timeChanged();
         }
     }
 }
 
-void MoviePrivate::setEndTime(float time)
+void MediaPlayerPrivate::setEndTime(float time)
 {
     m_endTime = time;
     startCuePointTimerIfNeeded();
 }
 
-void MoviePrivate::addCuePoint(float time)
+void MediaPlayerPrivate::addCuePoint(float time)
 {
     // FIXME: simulate with timer for now
     startCuePointTimerIfNeeded();
 }
 
-void MoviePrivate::removeCuePoint(float time)
+void MediaPlayerPrivate::removeCuePoint(float time)
 {
 }
 
-void MoviePrivate::clearCuePoints()
+void MediaPlayerPrivate::clearCuePoints()
 {
 }
 
-void MoviePrivate::startCuePointTimerIfNeeded()
+void MediaPlayerPrivate::startCuePointTimerIfNeeded()
 {
-    if ((m_endTime < duration() || !m_movie->m_cuePoints.isEmpty())
+    if ((m_endTime < duration() || !m_player->m_cuePoints.isEmpty())
         && m_startedPlaying && !m_cuePointTimer.isActive()) {
         m_previousTimeCueTimerFired = currentTime();
         m_cuePointTimer.startRepeating(0.020f);
     }
 }
 
-void MoviePrivate::cuePointTimerFired(Timer<MoviePrivate>*)
+void MediaPlayerPrivate::cuePointTimerFired(Timer<MediaPlayerPrivate>*)
 {
     float time = currentTime();
     float previousTime = m_previousTimeCueTimerFired;
@@ -323,29 +323,29 @@ void MoviePrivate::cuePointTimerFired(Timer<MoviePrivate>*)
         pause();
         didEnd();
     }
-    HashSet<float>::const_iterator end = m_movie->m_cuePoints.end();
-    for (HashSet<float>::const_iterator it = m_movie->m_cuePoints.begin(); it != end; ++it) {
+    HashSet<float>::const_iterator end = m_player->m_cuePoints.end();
+    for (HashSet<float>::const_iterator it = m_player->m_cuePoints.begin(); it != end; ++it) {
         float cueTime = *it;
         if (previousTime < cueTime && cueTime <= time)
-            m_movie->cuePointReached(cueTime);
+            m_player->cuePointReached(cueTime);
     }
 }
 
-bool MoviePrivate::paused() const
+bool MediaPlayerPrivate::paused() const
 {
     if (!m_qtMovie)
         return true;
     return [m_qtMovie.get() rate] == 0.0f;
 }
 
-bool MoviePrivate::seeking() const
+bool MediaPlayerPrivate::seeking() const
 {
     if (!m_qtMovie)
         return false;
     return m_seekTo >= 0;
 }
 
-IntSize MoviePrivate::naturalSize()
+IntSize MediaPlayerPrivate::naturalSize()
 {
     if (!m_qtMovie)
         return IntSize();
@@ -353,7 +353,7 @@ IntSize MoviePrivate::naturalSize()
     return IntSize(val);
 }
 
-bool MoviePrivate::hasVideo()
+bool MediaPlayerPrivate::hasVideo()
 {
     if (!m_qtMovie)
         return false;
@@ -361,21 +361,21 @@ bool MoviePrivate::hasVideo()
     return val;
 }
 
-void MoviePrivate::setVolume(float volume)
+void MediaPlayerPrivate::setVolume(float volume)
 {
     if (!m_qtMovie)
         return;
     [m_qtMovie.get() setVolume:volume];  
 }
 
-void MoviePrivate::setMuted(bool b)
+void MediaPlayerPrivate::setMuted(bool b)
 {
     if (!m_qtMovie)
         return;
     [m_qtMovie.get() setMuted:b];
 }
 
-void MoviePrivate::setRate(float rate)
+void MediaPlayerPrivate::setRate(float rate)
 {
     if (!m_qtMovie)
         return;
@@ -383,7 +383,7 @@ void MoviePrivate::setRate(float rate)
         [m_qtMovie.get() setRate:rate];
 }
 
-int MoviePrivate::dataRate() const
+int MediaPlayerPrivate::dataRate() const
 {
     if (!m_qtMovie)
         return 0;
@@ -391,36 +391,36 @@ int MoviePrivate::dataRate() const
 }
 
 
-Movie::NetworkState MoviePrivate::networkState()
+MediaPlayer::NetworkState MediaPlayerPrivate::networkState()
 {
     return m_networkState;
 }
 
-Movie::ReadyState MoviePrivate::readyState()
+MediaPlayer::ReadyState MediaPlayerPrivate::readyState()
 {
     return m_readyState;
 }
 
-float MoviePrivate::maxTimeBuffered()
+float MediaPlayerPrivate::maxTimeBuffered()
 {
     // rtsp streams are not buffered
     return m_isStreaming ? 0 : maxTimeLoaded();
 }
 
-float MoviePrivate::maxTimeSeekable()
+float MediaPlayerPrivate::maxTimeSeekable()
 {
     // infinite duration means live stream
     return isinf(duration()) ? 0 : maxTimeLoaded();
 }
 
-float MoviePrivate::maxTimeLoaded()
+float MediaPlayerPrivate::maxTimeLoaded()
 {
     if (!m_qtMovie)
         return 0;
     return wkQTMovieMaxTimeLoaded(m_qtMovie.get()); 
 }
 
-unsigned MoviePrivate::bytesLoaded()
+unsigned MediaPlayerPrivate::bytesLoaded()
 {
     if (!m_qtMovie)
         return 0;
@@ -431,22 +431,22 @@ unsigned MoviePrivate::bytesLoaded()
     return totalBytes() * maxTime / dur;
 }
 
-bool MoviePrivate::totalBytesKnown()
+bool MediaPlayerPrivate::totalBytesKnown()
 {
     return totalBytes() > 0;
 }
 
-unsigned MoviePrivate::totalBytes()
+unsigned MediaPlayerPrivate::totalBytes()
 {
     if (!m_qtMovie)
         return 0;
     return [[m_qtMovie.get() attributeForKey: QTMovieDataSizeAttribute] intValue];
 }
 
-void MoviePrivate::cancelLoad()
+void MediaPlayerPrivate::cancelLoad()
 {
     // FIXME better way to do this?
-    if (m_networkState < Movie::Loading || m_networkState == Movie::Loaded)
+    if (m_networkState < MediaPlayer::Loading || m_networkState == MediaPlayer::Loaded)
         return;
     
     if (m_qtMovieView) {
@@ -458,92 +458,92 @@ void MoviePrivate::cancelLoad()
     updateStates();
 }
 
-void MoviePrivate::updateStates()
+void MediaPlayerPrivate::updateStates()
 {
-    Movie::NetworkState oldNetworkState = m_networkState;
-    Movie::ReadyState oldReadyState = m_readyState;
+    MediaPlayer::NetworkState oldNetworkState = m_networkState;
+    MediaPlayer::ReadyState oldReadyState = m_readyState;
     
     long loadState = m_qtMovie ? [[m_qtMovie.get() attributeForKey:QTMovieLoadStateAttribute] longValue] : -1;
     // "Loaded" is reserved for fully buffered movies, never the case when rtsp streaming
     if (loadState >= 100000 && !m_isStreaming) {
         // 100000 is kMovieLoadStateComplete
-        if (m_networkState < Movie::Loaded)
-            m_networkState = Movie::Loaded;
-        m_readyState = Movie::CanPlayThrough;
+        if (m_networkState < MediaPlayer::Loaded)
+            m_networkState = MediaPlayer::Loaded;
+        m_readyState = MediaPlayer::CanPlayThrough;
     } else if (loadState >= 20000) {
         // 20000 is kMovieLoadStatePlaythroughOK
-        if (m_networkState < Movie::LoadedFirstFrame && !seeking())
-            m_networkState = Movie::LoadedFirstFrame;
-        m_readyState = ([m_qtMovie.get() rate] == 0.0f && m_startedPlaying) ? Movie::DataUnavailable : Movie::CanPlayThrough;
+        if (m_networkState < MediaPlayer::LoadedFirstFrame && !seeking())
+            m_networkState = MediaPlayer::LoadedFirstFrame;
+        m_readyState = ([m_qtMovie.get() rate] == 0.0f && m_startedPlaying) ? MediaPlayer::DataUnavailable : MediaPlayer::CanPlayThrough;
     } else if (loadState >= 10000) {
         // 10000 is kMovieLoadStatePlayable
-        if (m_networkState < Movie::LoadedFirstFrame && !seeking())
-            m_networkState = Movie::LoadedFirstFrame;
-        m_readyState = ([m_qtMovie.get() rate] == 0.0f && m_startedPlaying) ? Movie::DataUnavailable : Movie::CanPlay;
+        if (m_networkState < MediaPlayer::LoadedFirstFrame && !seeking())
+            m_networkState = MediaPlayer::LoadedFirstFrame;
+        m_readyState = ([m_qtMovie.get() rate] == 0.0f && m_startedPlaying) ? MediaPlayer::DataUnavailable : MediaPlayer::CanPlay;
     } else if (loadState >= 2000) {
         // 10000 is kMovieLoadStateLoaded
-        if (m_networkState < Movie::LoadedMetaData)
-            m_networkState = Movie::LoadedMetaData;
-        m_readyState = Movie::DataUnavailable;
+        if (m_networkState < MediaPlayer::LoadedMetaData)
+            m_networkState = MediaPlayer::LoadedMetaData;
+        m_readyState = MediaPlayer::DataUnavailable;
     } else if (loadState >= 0) {
-        if (m_networkState < Movie::Loading)
-            m_networkState = Movie::Loading;
-        m_readyState = Movie::DataUnavailable;        
+        if (m_networkState < MediaPlayer::Loading)
+            m_networkState = MediaPlayer::Loading;
+        m_readyState = MediaPlayer::DataUnavailable;        
     } else {
-        m_networkState = Movie::LoadFailed;
-        m_readyState = Movie::DataUnavailable; 
+        m_networkState = MediaPlayer::LoadFailed;
+        m_readyState = MediaPlayer::DataUnavailable; 
     }
 
     if (seeking())
-        m_readyState = Movie::DataUnavailable;
+        m_readyState = MediaPlayer::DataUnavailable;
     
     if (m_networkState != oldNetworkState)
-        m_movie->networkStateChanged();
+        m_player->networkStateChanged();
     if (m_readyState != oldReadyState)
-        m_movie->readyStateChanged();
+        m_player->readyStateChanged();
 }
 
-void MoviePrivate::loadStateChanged()
+void MediaPlayerPrivate::loadStateChanged()
 {
     updateStates();
 }
 
-void MoviePrivate::rateChanged()
+void MediaPlayerPrivate::rateChanged()
 {
     updateStates();
 }
 
-void MoviePrivate::sizeChanged()
+void MediaPlayerPrivate::sizeChanged()
 {
 }
 
-void MoviePrivate::timeChanged()
+void MediaPlayerPrivate::timeChanged()
 {
     m_previousTimeCueTimerFired = -1;
     updateStates();
-    m_movie->timeChanged();
+    m_player->timeChanged();
 }
 
-void MoviePrivate::volumeChanged()
+void MediaPlayerPrivate::volumeChanged()
 {
-    m_movie->volumeChanged();
+    m_player->volumeChanged();
 }
 
-void MoviePrivate::didEnd()
+void MediaPlayerPrivate::didEnd()
 {
     m_cuePointTimer.stop();
     m_startedPlaying = false;
     updateStates();
-    m_movie->timeChanged();
+    m_player->timeChanged();
 }
 
-void MoviePrivate::setRect(const IntRect& r) 
+void MediaPlayerPrivate::setRect(const IntRect& r) 
 { 
     if (m_qtMovieView)
         [m_qtMovieView.get() setFrame: r];
 }
 
-void MoviePrivate::setVisible(bool b)
+void MediaPlayerPrivate::setVisible(bool b)
 {
     if (b)
         createQTMovieView();
@@ -553,7 +553,7 @@ void MoviePrivate::setVisible(bool b)
     }
 }
 
-void MoviePrivate::paint(GraphicsContext* p, const IntRect& r)
+void MediaPlayerPrivate::paint(GraphicsContext* p, const IntRect& r)
 {
     if (p->paintingDisabled())
         return;
@@ -567,7 +567,7 @@ void MoviePrivate::paint(GraphicsContext* p, const IntRect& r)
     [m_objcObserver.get() setDelayCallbacks:NO];
 }
 
-void MoviePrivate::getSupportedTypes(HashSet<String>& types)
+void MediaPlayerPrivate::getSupportedTypes(HashSet<String>& types)
 {
     NSArray* fileTypes = [QTMovie movieFileTypes:(QTMovieFileTypeOptions)0];
     int count = [fileTypes count];
@@ -588,7 +588,7 @@ void MoviePrivate::getSupportedTypes(HashSet<String>& types)
 }
 
 @implementation WebCoreMovieObserver
--(id)initWithCallback:(WebCore::MoviePrivate *)c
+-(id)initWithCallback:(WebCore::MediaPlayerPrivate *)c
 {
     _callback = c;
     return [super init];
index 65f304d8a0dbecb494c566b883da02a19034a72d..7c085e236b09a745a3c936d69627942549abb9c1 100644 (file)
@@ -40,7 +40,7 @@
 #include "HTMLMediaElement.h"
 #include "HTMLNames.h"
 #include "MouseEvent.h"
-#include "Movie.h"
+#include "MediaPlayer.h"
 #include "RenderSlider.h"
 #include "SystemTime.h"
 
@@ -235,9 +235,9 @@ HTMLMediaElement* RenderMedia::mediaElement() const
     return static_cast<HTMLMediaElement*>(node()); 
 }
 
-Movie* RenderMedia::movie() const
+MediaPlayer* RenderMedia::player() const
 {
-    return mediaElement()->movie();
+    return mediaElement()->player();
 }
 
 void RenderMedia::layout()
index a52f04fe54e8cb14133a71391b4ee19558b777c5..febea8539092f90f1549e66ffc10198abb67e62d 100644 (file)
@@ -37,7 +37,7 @@ class HTMLInputElement;
 class HTMLMediaElement;
 class MediaControlPlayButtonElement;
 class MediaControlTimelineElement;
-class Movie;
+class MediaPlayer;
 
 class RenderMedia : public RenderReplaced {
 public:
@@ -55,12 +55,12 @@ public:
     virtual bool isMedia() const { return true; }
     
     HTMLMediaElement* mediaElement() const;
-    Movie* movie() const;
+    MediaPlayer* player() const;
 
     static String formatTime(float time);
 
     void updateFromElement();
-    void updateMovie();
+    void updatePlayer();
     void updateControls();
     
     void forwardEvent(Event*);
index 639bc3228af21e6140b82288aeaaca37ada4c1d1..029a950315cd229135c07f45b1c78ce485556547 100644 (file)
@@ -33,7 +33,7 @@
 #include "GraphicsContext.h"
 #include "HTMLNames.h"
 #include "HTMLVideoElement.h"
-#include "Movie.h"
+#include "MediaPlayer.h"
 
 using namespace std;
 
@@ -42,23 +42,23 @@ namespace WebCore {
 using namespace HTMLNames;
 
 RenderVideo::RenderVideo(HTMLMediaElement* video)
-    : RenderMedia(video, video->movie() ? video->movie()->naturalSize() : IntSize(300, 150))
+    : RenderMedia(video, video->player() ? video->player()->naturalSize() : IntSize(300, 150))
 {
 }
 
 RenderVideo::~RenderVideo()
 {
-    if (Movie* m = movie()) {
-        m->setVisible(false);
-        m->setParentWidget(0);
+    if (MediaPlayer* p = player()) {
+        p->setVisible(false);
+        p->setParentWidget(0);
     }
 }
     
 void RenderVideo::videoSizeChanged()
 {
-    if (!movie())
+    if (!player())
         return;
-    IntSize size = movie()->naturalSize();
+    IntSize size = player()->naturalSize();
     if (size != intrinsicSize()) {
         setIntrinsicSize(size);
         setPrefWidthsDirty(true);
@@ -68,8 +68,8 @@ void RenderVideo::videoSizeChanged()
 
 void RenderVideo::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
 {
-    if (Movie* video = movie()) {
-        updateMovie();
+    if (MediaPlayer* video = player()) {
+        updatePlayer();
         IntRect rect = contentBox();
         rect.move(tx, ty);
         video->paint(paintInfo.context, rect);
@@ -79,16 +79,16 @@ void RenderVideo::paintReplaced(PaintInfo& paintInfo, int tx, int ty)
 void RenderVideo::layout()
 {
     RenderMedia::layout();
-    updateMovie();
+    updatePlayer();
 }
     
 void RenderVideo::updateFromElement()
 {
     RenderMedia::updateFromElement();
-    updateMovie();
+    updatePlayer();
 }
 
-void RenderVideo::updateMovie()
+void RenderVideo::updatePlayer()
 {
     int x;
     int y;
@@ -101,10 +101,10 @@ void RenderVideo::updateMovie()
     
     IntRect newBounds(x, y, width, height);
     
-    if (Movie* m = movie()) {
-        m->setParentWidget(document()->view());
-        m->setRect(newBounds);
-        m->setVisible(true);
+    if (MediaPlayer* p = player()) {
+        p->setParentWidget(document()->view());
+        p->setRect(newBounds);
+        p->setVisible(true);
     }    
 }
 
index aa2d58ba88cf252210a35a01dd5c9d144c19a4fb..ac9b5eff96d0162cb78ada00f5ff8373b9a12d09 100644 (file)
@@ -61,7 +61,7 @@ private:
     bool isWidthSpecified() const;
     bool isHeightSpecified() const;
 
-    void updateMovie();
+    void updatePlayer();
 };
 
 } // namespace WebCore