Skip to content
  • commit-queue@webkit.org's avatar
    [GStreamer] Seeking fails on media content provided by servers not supporting Range requests · 72ba7372
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=85994
    
    Patch by Andres Gomez <agomez@igalia.com> on 2013-11-25
    Reviewed by Philippe Normand.
    
    Source/WebCore:
    
    Based on the patch written by Andre Moreira Magalhaes.
    
    When the GStreamer web source was doing a "Range" request we were
    expecting to receive a 206 status reply with the "Content-Range"
    header and just the requested data. Supporting "Range" requests is
    not mandatory so, for the servers not supporting it they will be
    replying with a 200 status and the whole content of the media
    element. Now, we are properly handling these replies too.
    
    Test: http/tests/media/media-seeking-no-ranges-server.html
    
    * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
    (StreamingClient::handleResponseReceived): Do not fail when
    receiving 200 as response for HTTP range requests.
    (StreamingClient::handleDataReceived): Manually seek on stream
    when receiving the full data after a seek.
    
    LayoutTests:
    
    Added test to check that seeking media files on http servers not
    supporting "Range" requests doesn't trigger an error.
    
    * http/tests/media/media-seeking-no-ranges-server-expected.txt: Added.
    * http/tests/media/media-seeking-no-ranges-server.html: Added.
    * http/tests/media/resources/load-video.php: Added support for new
    "ranges" paramenter.
    * http/tests/media/resources/serve-video.php: Added support for
    new "ranges" paramenter. When "ranges" is "no" we always answer
    the HTTP status "200 OK" and send the whole file.
    * platform/mac/TestExpectations: New test skipped in Mac port as
    media playback download control is passed to AVFoundation that
    doesn't like fancy PHP URLs like the one used in the test and, in
    addition, they won't care about HTTP servers not supporting
    "Range" requests.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    72ba7372