Changeset 56615 in webkit


Ignore:
Timestamp:
Mar 26, 2010 1:58:45 AM (14 years ago)
Author:
Philippe Normand
Message:

2010-03-08 Philippe Normand <pnormand@igalia.com>

Reviewed by Gustavo Noronha.

[GStreamer] soften dependency on libsoup in the http src element
https://bugs.webkit.org/show_bug.cgi?id=35864

Replaced SoupURI calls with KURL and pause/resume internal soup
messages only if the element is compiled for a port depending on
libsoup.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: (webkit_web_src_init): (webKitWebSrcSetUri): (webKitWebSrcNeedDataMainCb): (webKitWebSrcEnoughDataMainCb):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56613 r56615  
     12010-03-08  Philippe Normand  <pnormand@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GStreamer] soften dependency on libsoup in the http src element
     6        https://bugs.webkit.org/show_bug.cgi?id=35864
     7
     8        Replaced SoupURI calls with KURL and pause/resume internal soup
     9        messages only if the element is compiled for a port depending on
     10        libsoup.
     11
     12        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
     13        (webkit_web_src_init):
     14        (webKitWebSrcSetUri):
     15        (webKitWebSrcNeedDataMainCb):
     16        (webKitWebSrcEnoughDataMainCb):
     17
    1182010-03-25  Ilya Tikhonovsky  <loislo@chromium.org>
    219
  • trunk/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

    r56055 r56615  
    256256    // likely that libsoup already provides new data before
    257257    // the queue is really empty.
     258    // This might need tweaking for ports not using libsoup.
    258259    if (priv->haveAppSrc27)
    259260        g_object_set(priv->appsrc, "min-percent", 20, NULL);
     
    506507        return TRUE;
    507508
    508     SoupURI* soupUri = soup_uri_new(uri);
    509 
    510     if (!soupUri || !SOUP_URI_VALID_FOR_HTTP(soupUri)) {
     509    KURL url(KURL(), uri);
     510
     511    if (!url.isValid() || !url.protocolInHTTPFamily()) {
    511512        GST_ERROR_OBJECT(src, "Invalid URI '%s'", uri);
    512         soup_uri_free(soupUri);
    513513        return FALSE;
    514514    }
    515515
    516     priv->uri = soup_uri_to_string(soupUri, FALSE);
    517     soup_uri_free(soupUri);
    518 
     516    priv->uri = g_strdup(url.string().utf8().data());
    519517    return TRUE;
    520518}
     
    536534    WebKitWebSrcPrivate* priv = src->priv;
    537535
     536#if USE(NETWORK_SOUP)
    538537    ResourceHandleInternal* d = priv->resourceHandle->getInternal();
    539538    if (d->m_msg)
    540539        soup_session_unpause_message(ResourceHandle::defaultSession(), d->m_msg);
     540#endif
     541    // Ports not using libsoup need to call the unpause/schedule API of their
     542    // underlying network implementation here.
    541543
    542544    priv->paused = FALSE;
     
    561563    WebKitWebSrcPrivate* priv = src->priv;
    562564
     565#if USE(NETWORK_SOUP)
    563566    ResourceHandleInternal* d = priv->resourceHandle->getInternal();
    564567    soup_session_pause_message(ResourceHandle::defaultSession(), d->m_msg);
    565    
     568#endif
     569    // Ports not using libsoup need to call the pause/unschedule API of their
     570    // underlying network implementation here.
     571
    566572    priv->paused = TRUE;
    567573    priv->enoughDataID = 0;
Note: See TracChangeset for help on using the changeset viewer.