[GStreamer] MediaPlayer's code is not easily reusable by other GStreamer-based players
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2013 18:15:30 +0000 (18:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Feb 2013 18:15:30 +0000 (18:15 +0000)
commit5c7fa2f71ddd1b564a83e4a7bd6d22570c74ac54
tree149fe09455bc52de4fee4534a48de69a0ce79ef3
parent1615520afd88fa571c08397b1dc0b98e020c1d57
[GStreamer] MediaPlayer's code is not easily reusable by other GStreamer-based players
https://bugs.webkit.org/show_bug.cgi?id=100261

.:

Patch by Jonathon Jongsma <jonathon.jongsma@collabora.com> on 2013-02-06
Reviewed by Philippe Normand

* configure.ac: removed farstream requirement for now since it's
not actually used yet and makes it more difficult to build and test

Source/WebCore:

Refactor the media player implementation so that more of the
internal functionality can be shared between the current media
backend and the mediastream player backend.  Common code is
broken out into a MediaPlayerPrivateGStreamerBase class, and
both MediaPlayerPrivateGStreamer and
StreamMediaPlayerPrivateGStreamer inherit from this base class.

Patch by Jonathon Jongsma <jonathon.jongsma@collabora.com> on 2013-02-06
Reviewed by Philippe Normand

No new tests since functionality is covered by existing media tests

* GNUmakefile.list.am:
* PlatformEfl.cmake:
* Target.pri:
* platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
(WebCore::FullscreenVideoControllerGStreamer::create):
(WebCore::FullscreenVideoControllerGStreamer::FullscreenVideoControllerGStreamer):
* platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h:
(WebCore):
(FullscreenVideoControllerGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):
(WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: Added.
(WebCore):
(WebCore::greatestCommonDivisor):
(WebCore::mediaPlayerPrivateVolumeChangedCallback):
(WebCore::mediaPlayerPrivateVolumeChangeTimeoutCallback):
(WebCore::mediaPlayerPrivateMuteChangedCallback):
(WebCore::mediaPlayerPrivateMuteChangeTimeoutCallback):
(WebCore::mediaPlayerPrivateRepaintCallback):
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::naturalSize):
(WebCore::MediaPlayerPrivateGStreamerBase::setVolume):
(WebCore::MediaPlayerPrivateGStreamerBase::volume):
(WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange):
(WebCore::MediaPlayerPrivateGStreamerBase::volumeChanged):
(WebCore::MediaPlayerPrivateGStreamerBase::networkState):
(WebCore::MediaPlayerPrivateGStreamerBase::readyState):
(WebCore::MediaPlayerPrivateGStreamerBase::sizeChanged):
(WebCore::MediaPlayerPrivateGStreamerBase::setMuted):
(WebCore::MediaPlayerPrivateGStreamerBase::muted):
(WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfMute):
(WebCore::MediaPlayerPrivateGStreamerBase::muteChanged):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
(WebCore::MediaPlayerPrivateGStreamerBase::setSize):
(WebCore::MediaPlayerPrivateGStreamerBase::paint):
(WebCore::MediaPlayerPrivateGStreamerBase::enterFullscreen):
(WebCore::MediaPlayerPrivateGStreamerBase::exitFullscreen):
(WebCore::MediaPlayerPrivateGStreamerBase::supportsFullscreen):
(WebCore::MediaPlayerPrivateGStreamerBase::platformMedia):
(WebCore::MediaPlayerPrivateGStreamerBase::movieLoadType):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
(WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
(WebCore::MediaPlayerPrivateGStreamerBase::decodedFrameCount):
(WebCore::MediaPlayerPrivateGStreamerBase::droppedFrameCount):
(WebCore::MediaPlayerPrivateGStreamerBase::audioDecodedByteCount):
(WebCore::MediaPlayerPrivateGStreamerBase::videoDecodedByteCount):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Added.
(WebCore):
(MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::supportsMuting):
(WebCore::MediaPlayerPrivateGStreamerBase::setVisible):
(WebCore::MediaPlayerPrivateGStreamerBase::hasSingleSecurityOrigin):
(WebCore::MediaPlayerPrivateGStreamerBase::maxTimeLoaded):
(WebCore::MediaPlayerPrivateGStreamerBase::canEnterFullscreen):
(WebCore::MediaPlayerPrivateGStreamerBase::mediaPlayer):
(WebCore::MediaPlayerPrivateGStreamerBase::audioSink):
* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
(WebCore::FullscreenVideoControllerGtk::FullscreenVideoControllerGtk):
* platform/graphics/gtk/FullscreenVideoControllerGtk.h:
(FullscreenVideoControllerGtk):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142005 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/PlatformEfl.cmake
Source/WebCore/Target.pri
Source/WebCore/platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h [new file with mode: 0644]
Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.cpp
Source/WebCore/platform/graphics/gtk/FullscreenVideoControllerGtk.h
configure.ac