[totem] backend: Remove rtspsrc proxy work-arounds



commit 806500028e254faa78a829807b187602edecea3a
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 2 14:26:49 2013 +0100

    backend: Remove rtspsrc proxy work-arounds
    
    And use the proxy-id/proxy-pw properties added to rtspsrc
    in gst-plugins-good 1.1.x instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=395429

 src/backend/bacon-video-widget.c |   57 +-------------------------------------
 1 files changed, 1 insertions(+), 56 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 3345fcf..657706b 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2244,55 +2244,6 @@ finish:
 }
 
 static void
-bvw_set_rtsp_proxy_on_element (BaconVideoWidget * bvw, GstElement * element)
-{
-  GSettings *settings;
-  char *url, *host = NULL, *user_id, *user_pw;
-  char *enc_id, *enc_pw;
-  int port;
-
-  settings = g_settings_new ("org.gnome.system.proxy.http");
-
-  host = g_settings_get_string (settings, "host");
-  if (*host == '\0')
-    goto finish;
-  port = g_settings_get_int (settings, "port");
-  if (port == 0)
-    goto finish;
-
-  url = g_strdup_printf ("http://%s:%d";, host, port);
-  g_object_set (element, "proxy", url, NULL);
-  g_free (url);
-
-  if (g_settings_get_boolean (settings, "use-authentication") == FALSE)
-    {
-      url = g_strdup_printf ("http://%s:%d";, host, port);
-      g_object_set (element, "proxy", url, NULL);
-      g_free (url);
-      goto finish;
-    }
-
-  user_id = g_settings_get_string (settings, "authentication-user");
-  enc_id = g_uri_escape_string (user_id, NULL, TRUE);
-  g_free (user_id);
-  user_pw = g_settings_get_string (settings, "authentication-password");
-  enc_pw = g_uri_escape_string (user_pw, NULL, TRUE);
-  g_free (user_pw);
-
-  url = g_strdup_printf ("http://%s:%s %s:%u",
-			 enc_id, enc_pw, host, port);
-  g_object_set (element, "proxy", url, NULL);
-  g_free (url);
-
-  g_free (enc_id);
-  g_free (enc_pw);
-
-finish:
-  g_free (host);
-  g_object_unref (settings);
-}
-
-static void
 bvw_set_proxy_on_element (BaconVideoWidget * bvw, GstElement * element)
 {
   GSettings *settings;
@@ -2320,13 +2271,7 @@ bvw_set_proxy_on_element (BaconVideoWidget * bvw, GstElement * element)
       return;
   }
 
-  /* The RTSP source lacks separate properties for auth ID and password:
-   * https://bugzilla.gnome.org/show_bug.cgi?id=395427#c5 */
-  if (g_object_class_find_property (G_OBJECT_GET_CLASS (element), "proxy-id") == NULL ||
-      g_object_class_find_property (G_OBJECT_GET_CLASS (element), "proxy-pw") == NULL)
-    bvw_set_rtsp_proxy_on_element (bvw, element);
-  else
-    bvw_set_http_proxy_on_element (bvw, element);
+  bvw_set_http_proxy_on_element (bvw, element);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]