Changeset 142251 in webkit


Ignore:
Timestamp:
Feb 8, 2013 3:15:27 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r141695 and r141697.
http://trac.webkit.org/changeset/141695
http://trac.webkit.org/changeset/141697
https://bugs.webkit.org/show_bug.cgi?id=109279

broke on-disk buffering for http(s) media (Requested by philn
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-08

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::load):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:

(MediaPlayerPrivateGStreamer):

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(webKitWebSrcGetProtocols):
(webKitWebSrcSetUri):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142250 r142251  
     12013-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r141695 and r141697.
     4        http://trac.webkit.org/changeset/141695
     5        http://trac.webkit.org/changeset/141697
     6        https://bugs.webkit.org/show_bug.cgi?id=109279
     7
     8        broke on-disk buffering for http(s) media (Requested by philn
     9        on #webkit).
     10
     11        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     12        (WebCore::MediaPlayerPrivateGStreamer::load):
     13        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     14        (MediaPlayerPrivateGStreamer):
     15        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
     16        (webKitWebSrcGetProtocols):
     17        (webKitWebSrcSetUri):
     18
    1192013-02-08  Dan Carney  <dcarney@google.com>
    220
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r142005 r142251  
    219219}
    220220
    221 KURL MediaPlayerPrivateGStreamer::convertPlaybinURL(const gchar* uri)
    222 {
    223     KURL url(KURL(), uri);
    224 
    225     ASSERT(url.protocol().substring(0, 7) == "webkit+");
    226     url.setProtocol(url.protocol().substring(7));
    227     return url;
    228 }
    229 
    230 void MediaPlayerPrivateGStreamer::setPlaybinURL(KURL& url)
    231 {
     221void MediaPlayerPrivateGStreamer::load(const String& url)
     222{
     223    if (!initializeGStreamerAndRegisterWebKitElements())
     224        return;
     225
     226    KURL kurl(KURL(), url);
     227    String cleanUrl(url);
     228
    232229    // Clean out everything after file:// url path.
    233     if (url.isLocalFile()) {
    234         url.setQuery(String());
    235         url.removeFragmentIdentifier();
    236     }
    237 
    238     m_url = url;
    239 
    240     if (url.protocolIsInHTTPFamily())
    241         url.setProtocol("webkit+" + url.protocol());
    242 
    243     LOG_MEDIA_MESSAGE("Load %s", url.string().utf8().data());
    244     g_object_set(m_playBin.get(), "uri", url.string().utf8().data(), NULL);
    245 }
    246 
    247 void MediaPlayerPrivateGStreamer::load(const String& url)
    248 {
    249     if (!initializeGStreamerAndRegisterWebKitElements())
    250         return;
     230    if (kurl.isLocalFile())
     231        cleanUrl = cleanUrl.substring(0, kurl.pathEnd());
    251232
    252233    if (!m_playBin) {
     
    257238    ASSERT(m_playBin);
    258239
    259     KURL kurl(KURL(), url);
    260     setPlaybinURL(kurl);
     240    m_url = KURL(KURL(), cleanUrl);
     241    g_object_set(m_playBin.get(), "uri", cleanUrl.utf8().data(), NULL);
     242
     243    LOG_MEDIA_MESSAGE("Load %s", cleanUrl.utf8().data());
    261244
    262245    if (m_preload == MediaPlayer::None) {
     
    12021185        // append the value of new-location to it.
    12031186
     1187        gchar* currentLocation = 0;
     1188        g_object_get(m_playBin.get(), "uri", &currentLocation, NULL);
     1189
     1190        KURL currentUrl(KURL(), currentLocation);
     1191        g_free(currentLocation);
     1192
    12041193        KURL newUrl;
     1194
    12051195        if (gst_uri_is_valid(newLocation))
    12061196            newUrl = KURL(KURL(), newLocation);
    12071197        else
    1208             newUrl = KURL(KURL(), m_url.baseAsString() + newLocation);
    1209 
    1210         RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
     1198            newUrl = KURL(KURL(), currentUrl.baseAsString() + newLocation);
     1199
     1200        RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(currentUrl);
    12111201        if (securityOrigin->canRequest(newUrl)) {
    12121202            LOG_MEDIA_MESSAGE("New media url: %s", newUrl.string().utf8().data());
     
    12261216            if (state <= GST_STATE_READY) {
    12271217                // Set the new uri and start playing.
    1228                 setPlaybinURL(newUrl);
     1218                g_object_set(m_playBin.get(), "uri", newUrl.string().utf8().data(), NULL);
    12291219                gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    12301220                return true;
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r142005 r142251  
    9090            GstElement* audioSink() const;
    9191
    92             static KURL convertPlaybinURL(const gchar* uri);
    93 
    9492        private:
    9593            MediaPlayerPrivateGStreamer(MediaPlayer*);
     
    9997            static void getSupportedTypes(HashSet<String>&);
    10098            static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&);
    101 
    102             void setPlaybinURL(KURL&);
    10399
    104100            static bool isAvailable();
  • trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

    r141821 r142251  
    2828#include "GStreamerVersioning.h"
    2929#include "MediaPlayer.h"
    30 #include "MediaPlayerPrivateGStreamer.h"
    3130#include "NetworkingContext.h"
    3231#include "NotImplemented.h"
     
    579578const gchar* const* webKitWebSrcGetProtocols(GType)
    580579{
    581     static const char* const protocols[] = {"webkit+http", "webkit+https", 0 };
     580    static const char* protocols[] = {"http", "https", 0 };
    582581    return protocols;
    583582}
     
    604603        return TRUE;
    605604
    606     KURL url = WebCore::MediaPlayerPrivateGStreamer::convertPlaybinURL(uri);
     605    KURL url(KURL(), uri);
    607606
    608607    if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
     
    623622static gchar** webKitWebSrcGetProtocols(void)
    624623{
    625     static gchar* protocols[] = {(gchar*) "webkit+http", (gchar*) "webkit+https", 0 };
     624    static gchar* protocols[] = {(gchar*) "http", (gchar*) "https", 0 };
    626625    return protocols;
    627626}
     
    648647        return TRUE;
    649648
    650     KURL url = WebCore::MediaPlayerPrivateGStreamer::convertPlaybinURL(uri);
     649    KURL url(KURL(), uri);
    651650
    652651    if (!url.isValid() || !url.protocolIsInHTTPFamily()) {
Note: See TracChangeset for help on using the changeset viewer.