Changeset 28389 in webkit


Ignore:
Timestamp:
Dec 4, 2007 8:50:38 AM (16 years ago)
Author:
alp@webkit.org
Message:

2007-12-04 Pierre-Luc Beaudoin <pierre-luc.beaudoin@collabora.co.uk>

Reviewed by Alp Toker.

http://bugs.webkit.org/show_bug.cgi?id=16145
[gtk] Implement media support in GTK backend

This implements the media tags of HTML5 on the GTK+ port based on the
Mac port. Media tests pass although some tests required a small modifications:
As per the HTML5 spec, the loading of the clip should start only after
all script are done. But in the case of the tests, the loading starts
before some callbacks get registered. This has been discussed with
Antti Koivisto, and the tests should be updated.

There is only one known issue: one time in 10 tries, loading a buffered
clip will never end buffering. The buffering will stall at 97% for no
apparent reasons. Reloading the page usually works around the problem.
On the GStreamer side, some codecs don't return correct values, therefore
they make the tests fail. For instance H.264 will make the video-end
test fail. This should be fixed in GStreamer 0.10.15.

This version displays video in a pop up window. A place holder is drawn
on the page where the video should appear.

By default, it is turned off in WebCore.pro until GStreamer/X
detection issues are sorted out.

  • WebCore.pro: Disable video for now
  • platform/Logging.cpp: (WebCore::):
  • platform/Logging.h: Added a logging level for Media stuff
  • platform/graphics/Movie.cpp:
  • platform/graphics/gtk/MoviePrivateGStreamer.cpp: Added. (WebCore::moviePrivateErrorCallback): (WebCore::moviePrivateEOSCallback): (WebCore::moviePrivateStateCallback): (WebCore::moviePrivateBufferingCallback): (WebCore::moviePrivateWindowIDCallback): (WebCore::MoviePrivate::MoviePrivate): (WebCore::MoviePrivate::~MoviePrivate): (WebCore::MoviePrivate::load): (WebCore::MoviePrivate::play): (WebCore::MoviePrivate::pause): (WebCore::MoviePrivate::duration): (WebCore::MoviePrivate::currentTime): (WebCore::MoviePrivate::seek): (WebCore::MoviePrivate::setEndTime): (WebCore::MoviePrivate::addCuePoint): (WebCore::MoviePrivate::removeCuePoint): (WebCore::MoviePrivate::clearCuePoints): (WebCore::MoviePrivate::startCuePointTimerIfNeeded): (WebCore::MoviePrivate::cancelSeek): (WebCore::MoviePrivate::cuePointTimerFired): (WebCore::MoviePrivate::paused): (WebCore::MoviePrivate::seeking): (WebCore::MoviePrivate::naturalSize): (WebCore::MoviePrivate::hasVideo): (WebCore::MoviePrivate::setVolume): (WebCore::MoviePrivate::setMuted): (WebCore::MoviePrivate::setRate): (WebCore::MoviePrivate::dataRate): (WebCore::MoviePrivate::networkState): (WebCore::MoviePrivate::readyState): (WebCore::MoviePrivate::maxTimeBuffered): (WebCore::MoviePrivate::maxTimeSeekable): (WebCore::MoviePrivate::maxTimeLoaded): (WebCore::MoviePrivate::bytesLoaded): (WebCore::MoviePrivate::totalBytesKnown): (WebCore::MoviePrivate::totalBytes): (WebCore::MoviePrivate::cancelLoad): (WebCore::MoviePrivate::updateStates): (WebCore::MoviePrivate::loadStateChanged): (WebCore::MoviePrivate::rateChanged): (WebCore::MoviePrivate::sizeChanged): (WebCore::MoviePrivate::timeChanged): (WebCore::MoviePrivate::volumeChanged): (WebCore::MoviePrivate::didEnd): (WebCore::MoviePrivate::loadingFailed): (WebCore::MoviePrivate::setRect): (WebCore::MoviePrivate::setVisible): (WebCore::MoviePrivate::paint): (WebCore::MoviePrivate::getSupportedTypes): (WebCore::MoviePrivate::createGSTPlayBin):
  • platform/graphics/gtk/MoviePrivateGStreamer.h: Added.
Location:
trunk/WebCore
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r28387 r28389  
     12007-12-04  Pierre-Luc Beaudoin  <pierre-luc.beaudoin@collabora.co.uk>
     2
     3        Reviewed by Alp Toker.
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=16145
     6        [gtk] Implement media support in GTK backend
     7
     8        This implements the media tags of HTML5 on the GTK+ port based on the
     9        Mac port. Media tests pass although some tests required a small modifications:
     10        As per the HTML5 spec, the loading of the clip should start only after
     11        all script are done.  But in the case of the tests, the loading starts
     12        before some callbacks get registered.  This has been discussed with
     13        Antti Koivisto, and the tests should be updated.
     14
     15        There is only one known issue: one time in 10 tries, loading a buffered
     16        clip will never end buffering.  The buffering will stall at 97% for no
     17        apparent reasons.  Reloading the page usually works around the problem.
     18        On the GStreamer side, some codecs don't return correct values, therefore
     19        they make the tests fail.  For instance H.264 will make the video-end
     20        test fail.  This should be fixed in GStreamer 0.10.15.
     21
     22        This version displays video in a pop up window.  A place holder is drawn
     23        on the page where the video should appear.
     24
     25        By default, it is turned off in WebCore.pro until GStreamer/X
     26        detection issues are sorted out.
     27
     28        * WebCore.pro:
     29        Disable video for now
     30        * platform/Logging.cpp:
     31        (WebCore::):
     32        * platform/Logging.h:
     33        Added a logging level for Media stuff
     34        * platform/graphics/Movie.cpp:
     35        * platform/graphics/gtk/MoviePrivateGStreamer.cpp: Added.
     36        (WebCore::moviePrivateErrorCallback):
     37        (WebCore::moviePrivateEOSCallback):
     38        (WebCore::moviePrivateStateCallback):
     39        (WebCore::moviePrivateBufferingCallback):
     40        (WebCore::moviePrivateWindowIDCallback):
     41        (WebCore::MoviePrivate::MoviePrivate):
     42        (WebCore::MoviePrivate::~MoviePrivate):
     43        (WebCore::MoviePrivate::load):
     44        (WebCore::MoviePrivate::play):
     45        (WebCore::MoviePrivate::pause):
     46        (WebCore::MoviePrivate::duration):
     47        (WebCore::MoviePrivate::currentTime):
     48        (WebCore::MoviePrivate::seek):
     49        (WebCore::MoviePrivate::setEndTime):
     50        (WebCore::MoviePrivate::addCuePoint):
     51        (WebCore::MoviePrivate::removeCuePoint):
     52        (WebCore::MoviePrivate::clearCuePoints):
     53        (WebCore::MoviePrivate::startCuePointTimerIfNeeded):
     54        (WebCore::MoviePrivate::cancelSeek):
     55        (WebCore::MoviePrivate::cuePointTimerFired):
     56        (WebCore::MoviePrivate::paused):
     57        (WebCore::MoviePrivate::seeking):
     58        (WebCore::MoviePrivate::naturalSize):
     59        (WebCore::MoviePrivate::hasVideo):
     60        (WebCore::MoviePrivate::setVolume):
     61        (WebCore::MoviePrivate::setMuted):
     62        (WebCore::MoviePrivate::setRate):
     63        (WebCore::MoviePrivate::dataRate):
     64        (WebCore::MoviePrivate::networkState):
     65        (WebCore::MoviePrivate::readyState):
     66        (WebCore::MoviePrivate::maxTimeBuffered):
     67        (WebCore::MoviePrivate::maxTimeSeekable):
     68        (WebCore::MoviePrivate::maxTimeLoaded):
     69        (WebCore::MoviePrivate::bytesLoaded):
     70        (WebCore::MoviePrivate::totalBytesKnown):
     71        (WebCore::MoviePrivate::totalBytes):
     72        (WebCore::MoviePrivate::cancelLoad):
     73        (WebCore::MoviePrivate::updateStates):
     74        (WebCore::MoviePrivate::loadStateChanged):
     75        (WebCore::MoviePrivate::rateChanged):
     76        (WebCore::MoviePrivate::sizeChanged):
     77        (WebCore::MoviePrivate::timeChanged):
     78        (WebCore::MoviePrivate::volumeChanged):
     79        (WebCore::MoviePrivate::didEnd):
     80        (WebCore::MoviePrivate::loadingFailed):
     81        (WebCore::MoviePrivate::setRect):
     82        (WebCore::MoviePrivate::setVisible):
     83        (WebCore::MoviePrivate::paint):
     84        (WebCore::MoviePrivate::getSupportedTypes):
     85        (WebCore::MoviePrivate::createGSTPlayBin):
     86        * platform/graphics/gtk/MoviePrivateGStreamer.h: Added.
     87
    1882007-12-04  Holger Hans Peter Freyther <holger.freyther@trolltech.com>
    289
  • trunk/WebCore/WebCore.pro

    r28349 r28389  
    7575qt-port: !contains(DEFINES, ENABLE_SVG=.): DEFINES += ENABLE_SVG=1
    7676gtk-port:DEFINES += ENABLE_SVG=1
     77DEFINES += ENABLE_VIDEO=0
    7778
    7879DEFINES += WTF_CHANGES=1
     
    10811082}
    10821083
     1084contains(DEFINES, ENABLE_VIDEO=1) {
     1085    FEATURE_DEFINES_JAVASCRIPT += ENABLE_VIDEO=1
     1086
     1087    IDL_BINDINGS += \
     1088        html/HTMLAudioElement.idl \
     1089        html/HTMLMediaElement.idl \
     1090        html/HTMLSourceElement.idl \
     1091        html/HTMLVideoElement.idl \
     1092        html/MediaError.idl \
     1093        html/TimeRanges.idl \
     1094        html/VoidCallback.idl
     1095
     1096    SOURCES += \
     1097        html/HTMLAudioElement.cpp \
     1098        html/HTMLMediaElement.cpp \
     1099        html/HTMLSourceElement.cpp \
     1100        html/HTMLVideoElement.cpp \
     1101        html/TimeRanges.cpp \
     1102        platform/graphics/Movie.cpp \
     1103        rendering/RenderVideo.cpp \
     1104        rendering/RenderMedia.cpp \
     1105        bindings/js/JSHTMLAudioElementConstructor.cpp
     1106
     1107    gtk-port {
     1108        SOURCES += \
     1109            platform/graphics/gtk/MoviePrivateGStreamer.cpp
     1110
     1111        PKGCONFIG += gstreamer-0.10 gstreamer-plugins-base-0.10 gnome-vfs-2.0
     1112        LIBS += -lgstinterfaces-0.10 -lgstbase-0.10 -lgstvideo-0.10
     1113    }
     1114}
     1115
    10831116contains(DEFINES, ENABLE_XPATH=1) {
    10841117    FEATURE_DEFINES_JAVASCRIPT += ENABLE_XPATH=1
  • trunk/WebCore/platform/Logging.cpp

    r26787 r28389  
    5555WTFLogChannel LogStorageAPI =        { 0x00800000, "WebCoreLogLevel", WTFLogChannelOff };
    5656
     57WTFLogChannel LogMedia =             { 0x01000000, "WebCoreLogLevel", WTFLogChannelOff };
     58
    5759}
  • trunk/WebCore/platform/Logging.h

    r26787 r28389  
    5353    extern WTFLogChannel LogThreading;
    5454    extern WTFLogChannel LogStorageAPI;
     55    extern WTFLogChannel LogMedia;
    5556
    5657    void InitializeLoggingChannelsIfNecessary();
  • trunk/WebCore/platform/graphics/Movie.cpp

    r27866 r28389  
    3434#if PLATFORM(MAC)
    3535#include "MoviePrivateQTKit.h"
     36#elif PLATFORM(GTK)
     37#include "MoviePrivateGStreamer.h"
    3638#endif
    3739
Note: See TracChangeset for help on using the changeset viewer.