url->abspath, url->query ? "?" : "", url->query ? url->query : "");
/* connect to the host/port */
- connection = g_socket_client_connect_to_uri (conn->client,
- uri, 0, conn->cancellable, &error);
+ if (conn->proxy_host) {
+ connection = g_socket_client_connect_to_host (conn->client,
+ conn->proxy_host, conn->proxy_port, conn->cancellable, &error);
+ } else {
+ connection = g_socket_client_connect_to_uri (conn->client,
+ uri, 0, conn->cancellable, &error);
+ }
if (connection == NULL)
goto connect_failed;
uri = gst_rtsp_url_get_request_uri (url);
}
- connection = g_socket_client_connect_to_uri (conn->client,
- uri, url_port, conn->cancellable, &error);
+ if (conn->proxy_host) {
+ connection = g_socket_client_connect_to_host (conn->client,
+ conn->proxy_host, conn->proxy_port, conn->cancellable, &error);
+ } else {
+ connection = g_socket_client_connect_to_uri (conn->client,
+ uri, url_port, conn->cancellable, &error);
+ }
if (connection == NULL)
goto connect_failed;