diff options
author | Andrei Popescu <andreip@google.com> | 2009-06-22 12:19:41 +0100 |
---|---|---|
committer | Andrei Popescu <andreip@google.com> | 2009-06-25 12:54:37 +0100 |
commit | 3c5348b2ac92d2472149fad08c81c09fa6f43824 (patch) | |
tree | 4bc9b56501c422c8414c456304146ad96c8557ca /WebCore/platform/graphics | |
parent | 25879119c8ebef1c84e7e567167ee7594c81c2db (diff) | |
download | external_webkit-3c5348b2ac92d2472149fad08c81c09fa6f43824.zip external_webkit-3c5348b2ac92d2472149fad08c81c09fa6f43824.tar.gz external_webkit-3c5348b2ac92d2472149fad08c81c09fa6f43824.tar.bz2 |
Implement fullscreen video. Currently only load() and play() are supported. The rest of the MediaPlayerPrivate functionality will be added in a later CL.
Diffstat (limited to 'WebCore/platform/graphics')
-rw-r--r-- | WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp | 164 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h | 11 |
2 files changed, 11 insertions, 164 deletions
diff --git a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp deleted file mode 100644 index 75bb578..0000000 --- a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2009, The Android Open Source Project - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" - -#if ENABLE(VIDEO) - -#include "MediaPlayerPrivateAndroid.h" - -namespace WebCore { - -void MediaPlayerPrivate::registerMediaEngine(MediaEngineRegistrar registrar) -{ - registrar(create, getSupportedTypes, supportsType); -} - -void MediaPlayerPrivate::load(const String& url) -{ -} - -void MediaPlayerPrivate::cancelLoad() -{ -} - -void MediaPlayerPrivate::play() -{ -} - -void MediaPlayerPrivate::pause() -{ -} - -IntSize MediaPlayerPrivate::naturalSize() const -{ - return IntSize(); -} - -bool MediaPlayerPrivate::hasVideo() const -{ - return false; -} - -void MediaPlayerPrivate::setVisible(bool) -{ -} - -float MediaPlayerPrivate::duration() const -{ - return 0; -} - -float MediaPlayerPrivate::currentTime() const -{ - return 0; -} - -void MediaPlayerPrivate::seek(float time) -{ -} - -bool MediaPlayerPrivate::seeking() const -{ - return false; -} - -void MediaPlayerPrivate::setEndTime(float time) -{ -} - -void MediaPlayerPrivate::setRate(float) -{ -} - -bool MediaPlayerPrivate::paused() const -{ - return false; -} - -void MediaPlayerPrivate::setVolume(float) -{ -} - -MediaPlayer::NetworkState MediaPlayerPrivate::networkState() const -{ - return MediaPlayer::Empty; -} - -MediaPlayer::ReadyState MediaPlayerPrivate::readyState() const -{ - return MediaPlayer::HaveNothing; -} - -float MediaPlayerPrivate::maxTimeSeekable() const -{ - return 0; -} - -float MediaPlayerPrivate::maxTimeBuffered() const -{ - return 0; -} - -int MediaPlayerPrivate::dataRate() const -{ - return 0; -} - -unsigned MediaPlayerPrivate::totalBytes() const -{ - return 0; -} - -unsigned MediaPlayerPrivate::bytesLoaded() const -{ - return 0; -} - -void MediaPlayerPrivate::setSize(const IntSize&) -{ -} - -void MediaPlayerPrivate::paint(GraphicsContext*, const IntRect&) -{ -} - -MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player) -{ - return new MediaPlayerPrivate(); -} - -void MediaPlayerPrivate::getSupportedTypes(HashSet<String>&) -{ -} - -MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String& type, const String& codecs) -{ - return MediaPlayer::IsNotSupported; -} - -} - -#endif // VIDEO diff --git a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h index 9324699..7dcb60d 100644 --- a/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h +++ b/WebCore/platform/graphics/android/MediaPlayerPrivateAndroid.h @@ -34,6 +34,8 @@ namespace WebCore { class MediaPlayerPrivate : public MediaPlayerPrivateInterface { public: + ~MediaPlayerPrivate(); + static void registerMediaEngine(MediaEngineRegistrar); virtual void load(const String& url); @@ -77,9 +79,18 @@ public: virtual void paint(GraphicsContext*, const IntRect&); private: + // Android-specific methods and fields. static MediaPlayerPrivateInterface* create(MediaPlayer* player); static void getSupportedTypes(HashSet<String>&); static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs); + + MediaPlayerPrivate(MediaPlayer *); + void createJavaPlayerIfNeeded(); + + MediaPlayer* m_player; + String m_url; + struct JavaGlue; + JavaGlue* m_glue; }; } // namespace WebCore |