Title: [188961] trunk/Source/WebCore
Revision
188961
Author
ph...@webkit.org
Date
2015-08-26 02:51:11 -0700 (Wed, 26 Aug 2015)

Log Message

[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: trunk/Source/WebCore/ChangeLog (188960 => 188961)


--- trunk/Source/WebCore/ChangeLog	2015-08-26 09:26:14 UTC (rev 188960)
+++ trunk/Source/WebCore/ChangeLog	2015-08-26 09:51:11 UTC (rev 188961)
@@ -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-26  Enrica Casucci  <enr...@apple.com>
 
         Add some new emoji with modifiers and new sequence.

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp (188960 => 188961)


--- trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2015-08-26 09:26:14 UTC (rev 188960)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2015-08-26 09:51:11 UTC (rev 188961)
@@ -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