gst_soup_http_src_set_location (GstSoupHTTPSrc * src, const gchar * uri,
GError ** error)
{
+ const char *alt_schemes[] = { "icy://", "icyx://" };
+ guint i;
+
if (src->location) {
g_free (src->location);
src->location = NULL;
}
+
+ if (uri == NULL)
+ return FALSE;
+
+ for (i = 0; i < G_N_ELEMENTS (alt_schemes); i++) {
+ if (g_str_has_prefix (uri, alt_schemes[i])) {
+ src->location =
+ g_strdup_printf ("http://%s", uri + strlen (alt_schemes[i]));
+ return TRUE;
+ }
+ }
+
src->location = g_strdup (uri);
return TRUE;
static const gchar *const *
gst_soup_http_src_uri_get_protocols (GType type)
{
- static const gchar *protocols[] = { "http", "https", NULL };
+ static const gchar *protocols[] = { "http", "https", "icy", "icyx", NULL };
return protocols;
}