[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

eric at webkit.org eric at webkit.org
Fri Feb 26 22:22:00 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 746ec3fa65a54e3af56b95ff423686b585b1f225
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 17 03:37:58 2010 +0000

    2010-02-16  Bryan Yeung  <bryeung at chromium.org>
    
            Reviewed by Nikolas Zimmermann.
    
            Remove the bounds on stroke width and miter for the skia platform.
            https://bugs.webkit.org/show_bug.cgi?id=34954
    
            Test: svg/custom/stroke-width-large.svg
    
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (PlatformContextSkia::setupPaintForStroking):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index dbd8133..22ee287 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1488,6 +1488,31 @@
         * websockets/WebSocketHandshake.cpp:
         (WebCore::WebSocketHandshake::clientHandshakeMessage): use cookieRequestHeaderFieldValue() instead of cookies() to include HttpOnly cookies.
 
+2010-02-16  Sebastian Dröge  <sebastian.droege at collabora.co.uk>
+
+        Reviewed by Gustavo Noronha Silva.
+
+        Notify about size changes in the WebKit GStreamer source.
+        
+        https://bugs.webkit.org/show_bug.cgi?id=34881
+
+        * platform/graphics/gtk/WebKitWebSourceGStreamer.cpp:
+        (webkit_web_src_init):
+        (StreamingClient::didReceiveResponse):
+        * platform/graphics/gtk/WebKitWebSourceGStreamer.h:
+        This makes sure that other GStreamer elements know about the
+        size and on-disk buffering actually works.
+        Only notify about size changes if gst-plugins-base before
+        0.10.27 is used, because from that version onwards this is
+        automatically handled.
+        
+        If appsrc 0.10.27 or later is used, set the min-percent property
+        to 20% to allow more time to pass between the need-data signal
+        and starvation of the pipeline.
+        
+        Also reset the size when stopping the source and send EOS
+        on seeking failures. 
+
 2010-02-11  Ariya Hidayat  <ariya.hidayat at gmail.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp
index 390c0ec..74a7852 100644
--- a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp
+++ b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.cpp
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2009 Sebastian Dröge <sebastian.droege at collabora.co.uk>
+ *  Copyright (C) 2009, 2010 Sebastian Dröge <sebastian.droege at collabora.co.uk>
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -79,6 +79,10 @@ struct _WebKitWebSrcPrivate {
     gchar* iradioGenre;
     gchar* iradioUrl;
     gchar* iradioTitle;
+
+    // TRUE if appsrc's version is >= 0.10.27, see
+    // https://bugzilla.gnome.org/show_bug.cgi?id=609423
+    gboolean haveAppSrc27;
 };
 
 enum {
@@ -109,7 +113,7 @@ static void webKitWebSrcNeedDataCb(GstAppSrc* appsrc, guint length, gpointer use
 static void webKitWebSrcEnoughDataCb(GstAppSrc* appsrc, gpointer userData);
 static gboolean webKitWebSrcSeekDataCb(GstAppSrc* appsrc, guint64 offset, gpointer userData);
 
-static void webKitWebSrcStop(WebKitWebSrc* src, bool resetRequestedOffset);
+static void webKitWebSrcStop(WebKitWebSrc* src, bool seeking);
 
 static GstAppSrcCallbacks appsrcCallbacks = {
     webKitWebSrcNeedDataCb,
@@ -222,6 +226,9 @@ static void webkit_web_src_init(WebKitWebSrc* src,
         return;
     }
 
+    GstElementFactory* factory = GST_ELEMENT_FACTORY(GST_ELEMENT_GET_CLASS(priv->appsrc)->elementfactory);
+    priv->haveAppSrc27 = gst_plugin_feature_check_version(GST_PLUGIN_FEATURE(factory), 0, 10, 27);
+
     gst_bin_add(GST_BIN(src), GST_ELEMENT(priv->appsrc));
 
     targetpad = gst_element_get_static_pad(GST_ELEMENT(priv->appsrc), "src");
@@ -238,7 +245,20 @@ static void webkit_web_src_init(WebKitWebSrc* src,
     // GStreamer to handle.
     gst_app_src_set_max_bytes(priv->appsrc, 512 * 1024);
 
-    webKitWebSrcStop(src, true);
+    // Emit the need-data signal if the queue contains less
+    // than 20% of data. Without this the need-data signal
+    // is emitted when the queue is empty, we then dispatch
+    // the soup message unpausing to the main loop and from
+    // there unpause the soup message. This already takes
+    // quite some time and libsoup even needs some more time
+    // to actually provide data again. If we do all this
+    // already if the queue is 20% empty, it's much more
+    // likely that libsoup already provides new data before
+    // the queue is really empty.
+    if (priv->haveAppSrc27)
+        g_object_set(priv->appsrc, "min-percent", 20, NULL);
+
+    webKitWebSrcStop(src, false);
 }
 
 static void webKitWebSrcFinalize(GObject* object)
@@ -296,7 +316,7 @@ static void webKitWebSrcGetProperty(GObject* object, guint propID, GValue* value
 }
 
 
-static void webKitWebSrcStop(WebKitWebSrc* src, bool resetRequestedOffset)
+static void webKitWebSrcStop(WebKitWebSrc* src, bool seeking)
 {
     WebKitWebSrcPrivate* priv = src->priv;
 
@@ -335,15 +355,19 @@ static void webKitWebSrcStop(WebKitWebSrc* src, bool resetRequestedOffset)
     g_free(priv->iradioTitle);
     priv->iradioTitle = 0;
 
-    if (priv->appsrc)
+    if (priv->appsrc) {
         gst_app_src_set_caps(priv->appsrc, 0);
+        if (!seeking)
+            gst_app_src_set_size(priv->appsrc, -1);
+    }
 
     priv->offset = 0;
-    priv->size = 0;
     priv->seekable = FALSE;
 
-    if (resetRequestedOffset)
+    if (!seeking) {
+        priv->size = 0;
         priv->requestedOffset = 0;
+    }
 
     GST_DEBUG_OBJECT(src, "Stopped request");
 }
@@ -434,7 +458,7 @@ static GstStateChangeReturn webKitWebSrcChangeState(GstElement* element, GstStat
         break;
     case GST_STATE_CHANGE_PAUSED_TO_READY:
         GST_DEBUG_OBJECT(src, "PAUSED->READY");
-        webKitWebSrcStop(src, true);
+        webKitWebSrcStop(src, false);
         break;
     default:
         break;
@@ -558,7 +582,7 @@ static void webKitWebSrcEnoughDataCb(GstAppSrc* appsrc, gpointer userData)
 
 static gboolean webKitWebSrcSeekMainCb(WebKitWebSrc* src)
 {
-    webKitWebSrcStop(src, false);
+    webKitWebSrcStop(src, true);
     webKitWebSrcStart(src);
 
     return FALSE;
@@ -617,7 +641,8 @@ void StreamingClient::didReceiveResponse(ResourceHandle*, const ResourceResponse
     // If we seeked we need 206 == PARTIAL_CONTENT
     if (priv->requestedOffset && response.httpStatusCode() != 206) {
         GST_ELEMENT_ERROR(m_src, RESOURCE, READ, (0), (0));
-        webKitWebSrcStop(m_src, true);
+        gst_app_src_end_of_stream(priv->appsrc);
+        webKitWebSrcStop(m_src, false);
         return;
     }
 
@@ -625,6 +650,12 @@ void StreamingClient::didReceiveResponse(ResourceHandle*, const ResourceResponse
     if (length > 0) {
         length += priv->requestedOffset;
         gst_app_src_set_size(priv->appsrc, length);
+        if (!priv->haveAppSrc27) {
+            gst_segment_set_duration(&GST_BASE_SRC(priv->appsrc)->segment, GST_FORMAT_BYTES, length);
+            gst_element_post_message(GST_ELEMENT(priv->appsrc),
+                                     gst_message_new_duration(GST_OBJECT(priv->appsrc),
+                                                              GST_FORMAT_BYTES, length));
+        }
     }
 
     priv->size = length >= 0 ? length : 0;
diff --git a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h
index 045e7d7..ae19640 100644
--- a/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h
+++ b/WebCore/platform/graphics/gtk/WebKitWebSourceGStreamer.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2009 Sebastian Dröge <sebastian.droege at collabora.co.uk>
+ *  Copyright (C) 2009,2010 Sebastian Dröge <sebastian.droege at collabora.co.uk>
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list