Changeset 148079 in webkit


Ignore:
Timestamp:
Apr 9, 2013 11:59:28 PM (11 years ago)
Author:
Philippe Normand
Message:

[GStreamer] playbin uri getter is invalid
https://bugs.webkit.org/show_bug.cgi?id=113884

Reviewed by Martin Robinson.

Source/WebCore:

When loading a new media location use the url stored as a member
variable instead of the one stored as a playbin property. The uri
property semantic changed in playbin since 0.10.36+. One should
now use current-uri but to avoid ifdefs depending on GStreamer
version we simply use the url already known as member variable.

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

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

LayoutTests:

New test for Quicktime reference movie redirect
support.

  • http/tests/media/resources/redirect-to-counting-captioned.mov: Added.
  • http/tests/media/video-redirect-expected.txt: Added.
  • http/tests/media/video-redirect.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148076 r148079  
     12013-04-09  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] playbin uri getter is invalid
     4        https://bugs.webkit.org/show_bug.cgi?id=113884
     5
     6        Reviewed by Martin Robinson.
     7
     8        New test for Quicktime reference movie redirect
     9        support.
     10
     11        * http/tests/media/resources/redirect-to-counting-captioned.mov: Added.
     12        * http/tests/media/video-redirect-expected.txt: Added.
     13        * http/tests/media/video-redirect.html: Added.
     14
    1152013-04-09  Geoffrey Garen  <ggaren@apple.com>
    216
  • trunk/Source/WebCore/ChangeLog

    r148076 r148079  
     12013-04-09  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] playbin uri getter is invalid
     4        https://bugs.webkit.org/show_bug.cgi?id=113884
     5
     6        Reviewed by Martin Robinson.
     7
     8        When loading a new media location use the url stored as a member
     9        variable instead of the one stored as a playbin property. The uri
     10        property semantic changed in playbin since 0.10.36+. One should
     11        now use current-uri but to avoid ifdefs depending on GStreamer
     12        version we simply use the url already known as member variable.
     13
     14        Test: http/tests/media/video-redirect.html
     15
     16        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     17
    1182013-04-09  Geoffrey Garen  <ggaren@apple.com>
    219
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r147787 r148079  
    12881288        // though. We need to take the base of the current url and
    12891289        // append the value of new-location to it.
    1290 
    1291         gchar* currentLocation = 0;
    1292         g_object_get(m_playBin.get(), "uri", &currentLocation, NULL);
    1293 
    1294         KURL currentUrl(KURL(), currentLocation);
    1295         g_free(currentLocation);
    1296 
    1297         KURL newUrl;
    1298 
    1299         if (gst_uri_is_valid(newLocation))
    1300             newUrl = KURL(KURL(), newLocation);
    1301         else
    1302             newUrl = KURL(KURL(), currentUrl.baseAsString() + newLocation);
    1303 
    1304         RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(currentUrl);
     1290        KURL baseUrl = gst_uri_is_valid(newLocation) ? KURL() : m_url;
     1291        KURL newUrl = KURL(baseUrl, newLocation);
     1292
     1293        RefPtr<SecurityOrigin> securityOrigin = SecurityOrigin::create(m_url);
    13051294        if (securityOrigin->canRequest(newUrl)) {
    13061295            LOG_MEDIA_MESSAGE("New media url: %s", newUrl.string().utf8().data());
     
    13211310                // Set the new uri and start playing.
    13221311                g_object_set(m_playBin.get(), "uri", newUrl.string().utf8().data(), NULL);
     1312                m_url = newUrl;
    13231313                gst_element_set_state(m_playBin.get(), GST_STATE_PLAYING);
    13241314                return true;
    13251315            }
    1326         }
     1316        } else
     1317            LOG_MEDIA_MESSAGE("Not allowed to load new media location: %s", newUrl.string().utf8().data());
    13271318    }
    13281319    m_mediaLocationCurrentIndex--;
Note: See TracChangeset for help on using the changeset viewer.