Title: [189705] releases/WebKitGTK/webkit-2.10/Source/WebCore
Revision
189705
Author
carlo...@webkit.org
Date
2015-09-14 03:08:25 -0700 (Mon, 14 Sep 2015)

Log Message

Merge r188961 - [GStreamer] "method" property for the webkitwebsrc element
https://bugs.webkit.org/show_bug.cgi?id=148433

Reviewed by Carlos Garcia Campos.

This new property is sometimes used by the GStreamer uridownloader
when time synchronization is required for DASH. The same property
was added to the souphttpsrc element.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcSetProperty):
(webKitWebSrcGetProperty):
(webKitWebSrcStart):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (189704 => 189705)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2015-09-14 10:04:20 UTC (rev 189704)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2015-09-14 10:08:25 UTC (rev 189705)
@@ -1,3 +1,19 @@
+2015-08-25  Philippe Normand  <pnorm...@igalia.com>
+
+        [GStreamer] "method" property for the webkitwebsrc element
+        https://bugs.webkit.org/show_bug.cgi?id=148433
+
+        Reviewed by Carlos Garcia Campos.
+
+        This new property is sometimes used by the GStreamer uridownloader
+        when time synchronization is required for DASH. The same property
+        was added to the souphttpsrc element.
+
+        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+        (webKitWebSrcSetProperty):
+        (webKitWebSrcGetProperty):
+        (webKitWebSrcStart):
+
 2015-08-25  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Fix crash due to search field disappearing when showing results menu

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (189704 => 189705)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2015-09-14 10:04:20 UTC (rev 189704)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2015-09-14 10:08:25 UTC (rev 189705)
@@ -113,6 +113,7 @@
     bool keepAlive;
     GUniquePtr<GstStructure> extraHeaders;
     bool compress;
+    GUniquePtr<gchar> httpMethod;
 
     WebCore::MediaPlayer* player;
 
@@ -152,7 +153,8 @@
     PROP_LOCATION,
     PROP_KEEP_ALIVE,
     PROP_EXTRA_HEADERS,
-    PROP_COMPRESS
+    PROP_COMPRESS,
+    PROP_METHOD
 };
 
 static GstStaticPadTemplate srcTemplate = GST_STATIC_PAD_TEMPLATE("src",
@@ -262,6 +264,10 @@
         g_param_spec_boolean("compress", "Compress", "Allow compressed content encodings",
             FALSE, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
 
+    g_object_class_install_property(oklass, PROP_METHOD,
+        g_param_spec_string("method", "method", "The HTTP method to use (default: GET)",
+            nullptr, static_cast<GParamFlags>(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
     eklass->change_state = webKitWebSrcChangeState;
 
     g_type_class_add_private(klass, sizeof(WebKitWebSrcPrivate));
@@ -358,6 +364,9 @@
     case PROP_COMPRESS:
         src->priv->compress = g_value_get_boolean(value);
         break;
+    case PROP_METHOD:
+        src->priv->httpMethod.reset(g_value_dup_string(value));
+        break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propID, pspec);
         break;
@@ -395,6 +404,9 @@
     case PROP_COMPRESS:
         g_value_set_boolean(value, priv->compress);
         break;
+    case PROP_METHOD:
+        g_value_set_string(value, priv->httpMethod.get());
+        break;
     default:
         G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propID, pspec);
         break;
@@ -542,6 +554,7 @@
 
     ASSERT(!priv->client);
 
+    GST_DEBUG_OBJECT(src, "Fetching %s", priv->uri);
     URL url = "" priv->uri);
 
     ResourceRequest request(url);
@@ -553,6 +566,9 @@
     if (priv->player)
         request.setHTTPReferrer(priv->player->referrer());
 
+    if (priv->httpMethod.get())
+        request.setHTTPMethod(priv->httpMethod.get());
+
 #if USE(SOUP)
     // By default, HTTP Accept-Encoding is disabled here as we don't
     // want the received response to be encoded in any way as we need
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to