2010-12-07 Philippe Normand <pnormand@igalia.com>
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2010 20:47:00 +0000 (20:47 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Dec 2010 20:47:00 +0000 (20:47 +0000)
commit51ded26b668350727ddd5e142de177b968196c6e
tree36424b12dc245865ba891ee0c1495fd9e037ceec
parent16e3e82a74e2ba56928ec3842f976b025e3d37fc
2010-12-07  Philippe Normand  <pnormand@igalia.com>

        Reviewed by Gustavo Noronha Silva.

        [GStreamer] ::buffered() should return multiple ranges in some cases
        https://bugs.webkit.org/show_bug.cgi?id=45101

        Improved the ::buffered() method thanks to the new buffering query
        support that landed in GStreamer 0.10.31. The method now
        queries the media buffered-ranges on the pipeline and queue2
        handles it if it's buffering the media to disk.

        The webkitwebsrc element also gained BYTES duration query
        support. This is needed in the rare cases where uridecodebin
        configures its queue before the HTTP server returns the media
        Content-Length.

        Test: http/tests/media/video-buffered.html

        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
        (WebCore::MediaPlayerPrivateGStreamer::buffered):
        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
        (webkit_web_src_init):
        (webKitWebSrcQuery): Make webkitwebsrc handle the duration queries
        if it's aware of the media content-length.
        * platform/gtk/RenderThemeGtk.cpp:
        (WebCore::RenderThemeGtk::paintMediaSliderTrack): Fix position of
        the second and next buffered ranges.

LayoutTests:

        Reviewed by Gustavo Noronha Silva.

        [GStreamer] ::buffered() should return multiple ranges in some cases
        https://bugs.webkit.org/show_bug.cgi?id=45101

        New test for video.buffered attribute. The test is skipped for
        ports not returning multiple timeranges for video.buffered.

        * http/tests/media/video-buffered-expected.txt: Added.
        * http/tests/media/video-buffered.html: Added.
        * http/tests/resources/counting-captioned.mov: Added.
        * http/tests/media/video-throttled-load.cgi: added Range
        requests/responses support.
        * platform/chromium/test_expectations.txt:
        * platform/mac-leopard/Skipped:
        * platform/mac-snowleopard/Skipped:
        * platform/mac-tiger/Skipped:
        * platform/mac-wk2/Skipped:
        * platform/mac/Skipped:
        * platform/qt-mac/Skipped:
        * platform/qt-win/Skipped:
        * platform/qt-wk2/Skipped:
        * platform/qt/Skipped:
        * platform/win-wk2/Skipped:
        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/media/resources/counting-captioned.mov [new file with mode: 0644]
LayoutTests/http/tests/media/video-buffered-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/media/video-buffered.html [new file with mode: 0644]
LayoutTests/http/tests/media/video-throttled-load.cgi
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac-leopard/Skipped
LayoutTests/platform/mac-snowleopard/Skipped
LayoutTests/platform/mac-tiger/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/mac/Skipped
LayoutTests/platform/qt-mac/Skipped
LayoutTests/platform/qt-win/Skipped
LayoutTests/platform/qt-wk2/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win-wk2/Skipped
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
WebCore/platform/gtk/RenderThemeGtk.cpp