linklist
-%type padlist pads assignments
%left '{' '}' '(' ')'
@@ -566,12 +552,11 @@ element: IDENTIFIER { $$ = gst_element_factory_make ($1, NULL);
$$ = $1;
}
;
-
assignments: /* NOP */ { $$ = NULL; }
| assignments ASSIGNMENT { $$ = g_slist_prepend ($1, $2); }
;
-bin: '{' assignments chain '}' { GST_BIN_MAKE ($$, "thread", $3, $2); }
- | '(' assignments chain ')' { GST_BIN_MAKE ($$, "bin", $3, $2); }
+bin: '{' assignments chain '}' { GST_BIN_MAKE ($$, "thread", $3, $2); }
+ | '(' assignments chain ')' { GST_BIN_MAKE ($$, "bin", $3, $2); }
| BINREF assignments chain ')' { GST_BIN_MAKE ($$, $1, $3, $2);
gst_parse_strfree ($1);
}
@@ -670,21 +655,6 @@ chain: element { $$ = gst_parse_chain_new ();
gst_parse_chain_free ($2);
$$ = $1;
}
- | link chain { if ($2->front) {
- if (!$2->front->src_name) {
- ERROR (GST_PARSE_ERROR_LINK, "link without source element");
- gst_parse_free_link ($2->front);
- } else {
- ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
- }
- }
- if (!$1->sink_name) {
- $1->sink = $2->first;
- }
- $2->front = $1;
- $$ = $2;
- }
-
| chain linklist { GSList *walk;
if ($1->back) {
$2 = g_slist_prepend ($2, $1->back);
@@ -716,8 +686,60 @@ chain: element { $$ = gst_parse_chain_new ();
$$ = $1;
}
| chain error { $$ = $1; }
+ | link chain { if ($2->front) {
+ if (!$2->front->src_name) {
+ ERROR (GST_PARSE_ERROR_LINK, "link without source element");
+ gst_parse_free_link ($2->front);
+ } else {
+ ((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
+ }
+ }
+ if (!$1->sink_name) {
+ $1->sink = $2->first;
+ }
+ $2->front = $1;
+ $$ = $2;
+ }
+ | PARSE_URL chain { $$ = $2;
+ if ($$->front) {
+ GstElement *element =
+ gst_element_make_from_uri (GST_URI_SRC, $1, NULL);
+ if (!element) {
+ ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+ "No source element for URI \"%s\"", $1);
+ } else {
+ $$->front->src = element;
+ ((graph_t *) graph)->links = g_slist_prepend (
+ ((graph_t *) graph)->links, $$->front);
+ $$->front = NULL;
+ $$->elements = g_slist_prepend ($$->elements, element);
+ }
+ } else {
+ ERROR (GST_PARSE_ERROR_LINK,
+ "No element to link URI \"%s\" to", $1);
+ }
+ g_free ($1);
+ }
+ | link PARSE_URL { GstElement *element =
+ gst_element_make_from_uri (GST_URI_SINK, $2, NULL);
+ if (!element) {
+ ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+ "No sink element for URI \"%s\"", $2);
+ YYERROR;
+ } else if ($1->sink_name || $1->sink_pads) {
+ ERROR (GST_PARSE_ERROR_LINK,
+ "could not link sink element for URI \"%s\"", $2);
+ YYERROR;
+ } else {
+ $$ = gst_parse_chain_new ();
+ $$->first = $$->last = element;
+ $$->front = $1;
+ $$->front->sink = element;
+ $$->elements = g_slist_prepend (NULL, element);
+ }
+ g_free ($2);
+ }
;
-
graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, "Empty pipeline not allowed");
$$ = (graph_t *) graph;
}
@@ -785,7 +807,7 @@ _gst_parse_launch (const gchar *str, GError **error)
dstr = g_strdup (str);
_gst_parse_yy_scan_string (dstr);
-#ifdef GST_DEBUG_ENABLED
+#ifndef GST_DISABLE_GST_DEBUG
yydebug = 1;
#endif
diff --git a/gst/parse/parse.l b/gst/parse/parse.l
index 021d13b738..95fb0c5ff8 100644
--- a/gst/parse/parse.l
+++ b/gst/parse/parse.l
@@ -7,6 +7,7 @@
#include "types.h"
#include "../gstinfo.h"
+#include "../gsturi.h"
#include "grammar.tab.h"
#ifdef G_HAVE_ISO_VARARGS
@@ -29,6 +30,9 @@ _string {_char}+|("\""([^\"]|"\\\"")*"\"")|("'"([^']|"\\\"")*"'")
_comma [[:space:]]*","[[:space:]]*
_assign [[:space:]]*"="[[:space:]]*
+_protocol [[:alpha:]][[:alnum:]+-\.]*
+_url {_protocol}"://"{_string}|["."{_identifier}]?"/"{_string}
+
/* we must do this here, because nearly everything matches a {_string} */
_assignment {_identifier}{_assign}{_string}
@@ -106,6 +110,17 @@ _link ("!"[[:space:]]*{_caps}([[:space:]]*";"[[:space:]]*{_caps})*[[:space:]]*"!
BEGIN (INITIAL);
return LINK;
}
+{_url} {
+ PRINT ("URL: %s\n", yytext);
+ if (gst_uri_is_valid (yytext)) {
+ lvalp->s = g_strdup (yytext);
+ } else {
+ lvalp->s = gst_uri_construct ("file", yytext);
+ }
+ gst_parse_unescape (lvalp->s);
+ BEGIN (INITIAL);
+ return PARSE_URL;
+}
{_operator} { PRINT ("OPERATOR: [%s]\n", yytext); return *yytext; }
diff --git a/gst/parse/types.h b/gst/parse/types.h
index ffc76436ab..3fa3588de3 100644
--- a/gst/parse/types.h
+++ b/gst/parse/types.h
@@ -66,4 +66,23 @@ void __gst_parse_chain_free (chain_t *data);
# define gst_parse_chain_free g_free
#endif /* __GST_PARSE_TRACE */
+static inline void
+gst_parse_unescape (gchar *str)
+{
+ gchar *walk;
+
+ g_return_if_fail (str != NULL);
+
+ walk = str;
+
+ while (*walk) {
+ if (*walk == '\\')
+ walk++;
+ *str = *walk;
+ str++;
+ walk++;
+ }
+ *str = '\0';
+}
+
#endif /* __GST_PARSE_TYPES_H__ */
diff --git a/gst/registries/gstxmlregistry.c b/gst/registries/gstxmlregistry.c
index 76f2679e74..dcf10b3d2a 100644
--- a/gst/registries/gstxmlregistry.c
+++ b/gst/registries/gstxmlregistry.c
@@ -680,6 +680,26 @@ gst_xml_registry_parse_plugin (GMarkupParseContext *context, const gchar *tag, c
return TRUE;
}
+static void
+add_to_char_array (gchar ***array, gchar *value)
+{
+ gchar **new;
+ gchar **old = *array;
+ gint i = 0;
+
+ /* expensive, but cycles are cheap... */
+ if (old)
+ while (old[i]) i++;
+ new = g_new0 (gchar *, i + 2);
+ new[i] = value;
+ while (i > 0) {
+ i--;
+ new[i] = old[i];
+ }
+ g_free (old);
+ *array = new;
+}
+
static gboolean
gst_xml_registry_parse_element_factory (GMarkupParseContext *context, const gchar *tag, const gchar *text,
gsize text_len, GstXMLRegistry *registry, GError **error)
@@ -715,6 +735,14 @@ gst_xml_registry_parse_element_factory (GMarkupParseContext *context, const gcha
if (ret == text + text_len) {
gst_plugin_feature_set_rank (GST_PLUGIN_FEATURE (factory), rank);
}
+ } else if (!strcmp (tag, "uri_type")) {
+ if (strncasecmp (text, "sink", 4) == 0) {
+ factory->uri_type = GST_URI_SINK;
+ } else if (strncasecmp (text, "source", 5) == 0) {
+ factory->uri_type = GST_URI_SRC;
+ }
+ } else if (!strcmp (tag, "uri_protocol")) {
+ add_to_char_array (&factory->uri_protocols, g_strndup (text, text_len));
}
else if (!strcmp(tag, "interface")) {
gchar *tmp = g_strndup (text, text_len);
@@ -747,21 +775,7 @@ gst_xml_registry_parse_type_find_factory (GMarkupParseContext *context, const gc
factory->caps = g_strndup (text, text_len);
}*/
else if (!strcmp(tag, "extension")) {
- gchar **new;
- gchar **old = factory->extensions;
- gint i = 0;
-
- /* expensive, but cycles are cheap... */
- if (old)
- while (old[i]) i++;
- new = g_new0 (gchar *, i + 2);
- new[i] = g_strndup (text, text_len);
- while (i > 0) {
- i--;
- new[i] = old[i];
- }
- g_free (old);
- factory->extensions = new;
+ add_to_char_array (&factory->extensions, g_strndup (text, text_len));
}
return TRUE;
@@ -812,30 +826,6 @@ gst_xml_registry_parse_index_factory (GMarkupParseContext *context, const gchar
return TRUE;
}
-static gboolean
-gst_xml_registry_parse_uri_handler (GMarkupParseContext *context, const gchar *tag, const gchar *text,
- gsize text_len, GstXMLRegistry *registry, GError **error)
-{
- GstURIHandler *handler = GST_URI_HANDLER (registry->current_feature);
-
- if (!strcmp (tag, "name")) {
- registry->current_feature->name = g_strndup (text, text_len);
- }
- else if (!strcmp (tag, "uri")) {
- handler->uri = g_strndup (text, text_len);
- }
- else if (!strcmp (tag, "longdesc")) {
- handler->longdesc = g_strndup (text, text_len);
- }
- else if (!strcmp (tag, "element")) {
- handler->element = g_strndup (text, text_len);
- }
- else if (!strcmp (tag, "property")) {
- handler->property = g_strndup (text, text_len);
- }
- return TRUE;
-}
-
static gboolean
gst_xml_registry_parse_padtemplate (GMarkupParseContext *context, const gchar *tag, const gchar *text,
gsize text_len, GstXMLRegistry *registry, GError **error)
@@ -953,9 +943,6 @@ gst_xml_registry_start_element (GMarkupParseContext *context,
else if (GST_IS_INDEX_FACTORY (feature)) {
xmlregistry->parser = gst_xml_registry_parse_index_factory;
}
- else if (GST_IS_URI_HANDLER (feature)) {
- xmlregistry->parser = gst_xml_registry_parse_uri_handler;
- }
else {
g_warning ("unkown feature type");
}
@@ -1495,6 +1482,18 @@ gst_xml_registry_save_feature (GstXMLRegistry *xmlregistry, GstPluginFeature *fe
PUT_ESCAPED ("interface", (gchar *) walk->data);
walk = g_list_next (walk);
}
+
+ if (GST_URI_TYPE_IS_VALID (factory->uri_type)) {
+ gchar **protocol;
+
+ PUT_ESCAPED ("uri_type", factory->uri_type == GST_URI_SINK ? "sink" : "source");
+ g_assert (factory->uri_protocols);
+ protocol = factory->uri_protocols;
+ while (*protocol) {
+ PUT_ESCAPED ("uri_protocol", *protocol);
+ protocol++;
+ }
+ }
}
else if (GST_IS_TYPE_FIND_FACTORY (feature)) {
GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (feature);
@@ -1521,18 +1520,9 @@ gst_xml_registry_save_feature (GstXMLRegistry *xmlregistry, GstPluginFeature *fe
else if (GST_IS_INDEX_FACTORY (feature)) {
PUT_ESCAPED ("longdesc", GST_INDEX_FACTORY (feature)->longdesc);
}
- else if (GST_IS_URI_HANDLER (feature)) {
- GstURIHandler *handler = GST_URI_HANDLER (feature);
-
- PUT_ESCAPED ("uri", handler->uri);
- PUT_ESCAPED ("longdesc", handler->longdesc);
- PUT_ESCAPED ("element", handler->element);
- PUT_ESCAPED ("property", handler->property);
- }
return TRUE;
}
-
static gboolean
gst_xml_registry_save_plugin (GstXMLRegistry *xmlregistry, GstPlugin *plugin)
{
diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c
index 4f23d8b362..1e82e518e2 100644
--- a/plugins/elements/gstfakesink.c
+++ b/plugins/elements/gstfakesink.c
@@ -173,7 +173,7 @@ gst_fakesink_class_init (GstFakeSinkClass *klass)
gst_fakesink_signals[SIGNAL_HANDOFF] =
g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstFakeSinkClass, handoff), NULL, NULL,
- gst_marshal_VOID__POINTER_OBJECT, G_TYPE_NONE, 1,
+ gst_marshal_VOID__POINTER_OBJECT, G_TYPE_NONE, 2,
GST_TYPE_BUFFER, GST_TYPE_PAD);
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_fakesink_set_property);
diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c
index 5c4c81c84f..fef5d7e8f7 100644
--- a/plugins/elements/gstfilesink.c
+++ b/plugins/elements/gstfilesink.c
@@ -69,6 +69,7 @@ GST_PAD_FORMATS_FUNCTION (gst_filesink_get_formats,
static void gst_filesink_base_init (gpointer g_class);
static void gst_filesink_class_init (GstFileSinkClass *klass);
static void gst_filesink_init (GstFileSink *filesink);
+static void gst_filesink_dispose (GObject *object);
static void gst_filesink_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
@@ -83,6 +84,8 @@ static gboolean gst_filesink_pad_query (GstPad *pad, GstQueryType type,
GstFormat *format, gint64 *value);
static void gst_filesink_chain (GstPad *pad,GstData *_data);
+static void gst_filesink_uri_handler_init (gpointer g_iface, gpointer iface_data);
+
static GstElementStateReturn gst_filesink_change_state (GstElement *element);
static GstElementClass *parent_class = NULL;
@@ -105,7 +108,14 @@ gst_filesink_get_type (void)
0,
(GInstanceInitFunc)gst_filesink_init,
};
+ static const GInterfaceInfo urihandler_info = {
+ gst_filesink_uri_handler_init,
+ NULL,
+ NULL
+ };
filesink_type = g_type_register_static (GST_TYPE_ELEMENT, "GstFileSink", &filesink_info, 0);
+
+ g_type_add_interface_static (filesink_type, GST_TYPE_URI_HANDLER, &urihandler_info);
GST_DEBUG_CATEGORY_INIT (gst_filesink_debug, "filesink", 0, "filesink element");
}
@@ -138,8 +148,8 @@ gst_filesink_class_init (GstFileSinkClass *klass)
gobject_class->set_property = gst_filesink_set_property;
gobject_class->get_property = gst_filesink_get_property;
+ gobject_class->dispose = gst_filesink_dispose;
}
-
static void
gst_filesink_init (GstFileSink *filesink)
{
@@ -158,7 +168,38 @@ gst_filesink_init (GstFileSink *filesink)
filesink->filename = NULL;
filesink->file = NULL;
}
+static void
+gst_filesink_dispose (GObject *object)
+{
+ GstFileSink *sink = GST_FILESINK (object);
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+
+ g_free (sink->uri);
+ sink->uri = NULL;
+ g_free (sink->filename);
+ sink->filename = NULL;
+}
+static gboolean
+gst_filesink_set_location (GstFileSink *sink, const gchar *location)
+{
+ /* the element must be stopped or paused in order to do this */
+ if (GST_STATE (sink) > GST_STATE_PAUSED)
+ return FALSE;
+ if (GST_STATE (sink) == GST_STATE_PAUSED &&
+ GST_FLAG_IS_SET (sink, GST_FILESINK_OPEN))
+ return FALSE;
+
+ g_free (sink->filename);
+ g_free (sink->uri);
+ sink->filename = g_strdup (location);
+ sink->uri = gst_uri_construct ("file", location);
+
+ if (GST_STATE (sink) == GST_STATE_PAUSED)
+ gst_filesink_open_file (sink);
+
+ return TRUE;
+}
static void
gst_filesink_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
@@ -169,16 +210,7 @@ gst_filesink_set_property (GObject *object, guint prop_id, const GValue *value,
switch (prop_id) {
case ARG_LOCATION:
- /* the element must be stopped or paused in order to do this */
- g_return_if_fail (GST_STATE (sink) <= GST_STATE_PAUSED);
- if (GST_STATE (sink) == GST_STATE_PAUSED)
- g_return_if_fail (!GST_FLAG_IS_SET (sink, GST_FILESINK_OPEN));
-
- if (sink->filename)
- g_free (sink->filename);
- sink->filename = g_strdup (g_value_get_string (value));
- if (GST_STATE (sink) == GST_STATE_PAUSED)
- gst_filesink_open_file (sink);
+ gst_filesink_set_location (sink, g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -435,3 +467,54 @@ gst_filesink_change_state (GstElement *element)
return GST_STATE_SUCCESS;
}
+
+/*** GSTURIHANDLER INTERFACE *************************************************/
+
+static guint
+gst_filesink_uri_get_type (void)
+{
+ return GST_URI_SINK;
+}
+static gchar **
+gst_filesink_uri_get_protocols(void)
+{
+ static gchar *protocols[] = {"file", NULL};
+ return protocols;
+}
+static const gchar *
+gst_filesink_uri_get_uri (GstURIHandler *handler)
+{
+ GstFileSink *sink = GST_FILESINK (handler);
+
+ return sink->uri;
+}
+static gboolean
+gst_filesink_uri_set_uri (GstURIHandler *handler, const gchar *uri)
+{
+ gchar *protocol, *location;
+ gboolean ret;
+ GstFileSink *sink = GST_FILESINK (handler);
+
+ protocol = gst_uri_get_protocol (uri);
+ if (strcmp (protocol, "file") != 0) {
+ g_free (protocol);
+ return FALSE;
+ }
+ g_free (protocol);
+ location = gst_uri_get_location (uri);
+ ret = gst_filesink_set_location (sink, location);
+ g_free (location);
+
+ return ret;
+}
+
+static void
+gst_filesink_uri_handler_init (gpointer g_iface, gpointer iface_data)
+{
+ GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
+
+ iface->get_type = gst_filesink_uri_get_type;
+ iface->get_protocols = gst_filesink_uri_get_protocols;
+ iface->get_uri = gst_filesink_uri_get_uri;
+ iface->set_uri = gst_filesink_uri_set_uri;
+}
diff --git a/plugins/elements/gstfilesink.h b/plugins/elements/gstfilesink.h
index b72551bfe0..bd85a1d012 100644
--- a/plugins/elements/gstfilesink.h
+++ b/plugins/elements/gstfilesink.h
@@ -53,6 +53,7 @@ struct _GstFileSink {
GstElement element;
gchar *filename;
+ gchar *uri;
FILE *file;
guint64 data_written;
diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c
index 275d730a7b..e1d4bff973 100644
--- a/plugins/elements/gstfilesrc.c
+++ b/plugins/elements/gstfilesrc.c
@@ -136,6 +136,8 @@ static gboolean gst_filesrc_srcpad_query (GstPad *pad, GstQueryType type,
static GstElementStateReturn gst_filesrc_change_state (GstElement *element);
+static void gst_filesrc_uri_handler_init (gpointer g_iface, gpointer iface_data);
+
static GstElementClass *parent_class = NULL;
/*static guint gst_filesrc_signals[LAST_SIGNAL] = { 0 };*/
@@ -157,8 +159,15 @@ gst_filesrc_get_type(void)
0,
(GInstanceInitFunc)gst_filesrc_init,
};
+ static const GInterfaceInfo urihandler_info = {
+ gst_filesrc_uri_handler_init,
+ NULL,
+ NULL
+ };
filesrc_type = g_type_register_static (GST_TYPE_ELEMENT, "GstFileSrc", &filesrc_info, 0);
-
+
+ g_type_add_interface_static (filesrc_type, GST_TYPE_URI_HANDLER, &urihandler_info);
+
GST_DEBUG_CATEGORY_INIT (gst_filesrc_debug, "filesrc", 0, "filesrc element");
}
return filesrc_type;
@@ -263,8 +272,32 @@ gst_filesrc_dispose (GObject *object)
g_mutex_free (src->map_regions_lock);
if (src->filename)
g_free (src->filename);
+ if (src->uri)
+ g_free (src->uri);
}
+static gboolean
+gst_filesrc_set_location (GstFileSrc *src, const gchar *location)
+{
+ /* the element must be stopped in order to do this */
+ if (GST_STATE (src) == GST_STATE_PLAYING)
+ return FALSE;
+
+ if (src->filename) g_free (src->filename);
+ if (src->uri) g_free (src->uri);
+ /* clear the filename if we get a NULL (is that possible?) */
+ if (location == NULL) {
+ src->filename = NULL;
+ src->uri = NULL;
+ } else {
+ src->filename = g_strdup (location);
+ src->uri = gst_uri_construct ("file", src->filename);
+ }
+ g_object_notify (G_OBJECT (src), "location");
+ gst_uri_handler_new_uri (GST_URI_HANDLER (src), src->uri);
+
+ return TRUE;
+}
static void
gst_filesrc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
@@ -278,19 +311,7 @@ gst_filesrc_set_property (GObject *object, guint prop_id, const GValue *value, G
switch (prop_id) {
case ARG_LOCATION:
- /* the element must be stopped in order to do this */
- g_return_if_fail (GST_STATE (src) < GST_STATE_PLAYING);
-
- if (src->filename) g_free (src->filename);
- /* clear the filename if we get a NULL (is that possible?) */
- if (g_value_get_string (value) == NULL) {
- gst_element_set_state (GST_ELEMENT (object), GST_STATE_NULL);
- src->filename = NULL;
- /* otherwise set the new filename */
- } else {
- src->filename = g_strdup (g_value_get_string (value));
- }
- g_object_notify (G_OBJECT (src), "location");
+ gst_filesrc_set_location (src, g_value_get_string (value));
break;
case ARG_BLOCKSIZE:
src->block_size = g_value_get_ulong (value);
@@ -918,3 +939,55 @@ error:
gst_event_unref (event);
return FALSE;
}
+
+/*** GSTURIHANDLER INTERFACE *************************************************/
+
+static guint
+gst_filesrc_uri_get_type (void)
+{
+ return GST_URI_SRC;
+}
+static gchar **
+gst_filesrc_uri_get_protocols(void)
+{
+ static gchar *protocols[] = {"file", NULL};
+ return protocols;
+}
+static const gchar *
+gst_filesrc_uri_get_uri (GstURIHandler *handler)
+{
+ GstFileSrc *src = GST_FILESRC (handler);
+
+ return src->uri;
+}
+static gboolean
+gst_filesrc_uri_set_uri (GstURIHandler *handler, const gchar *uri)
+{
+ gchar *protocol, *location;
+ gboolean ret;
+ GstFileSrc *src = GST_FILESRC (handler);
+
+ protocol = gst_uri_get_protocol (uri);
+ if (strcmp (protocol, "file") != 0) {
+ g_free (protocol);
+ return FALSE;
+ }
+ g_free (protocol);
+ location = gst_uri_get_location (uri);
+ ret = gst_filesrc_set_location (src, location);
+ g_free (location);
+
+ return ret;
+}
+
+static void
+gst_filesrc_uri_handler_init (gpointer g_iface, gpointer iface_data)
+{
+ GstURIHandlerInterface *iface = (GstURIHandlerInterface *) g_iface;
+
+ iface->get_type = gst_filesrc_uri_get_type;
+ iface->get_protocols = gst_filesrc_uri_get_protocols;
+ iface->get_uri = gst_filesrc_uri_get_uri;
+ iface->set_uri = gst_filesrc_uri_set_uri;
+}
+
diff --git a/plugins/elements/gstfilesrc.h b/plugins/elements/gstfilesrc.h
index 23b6ddeef5..1f584be387 100644
--- a/plugins/elements/gstfilesrc.h
+++ b/plugins/elements/gstfilesrc.h
@@ -58,6 +58,7 @@ struct _GstFileSrc {
guint pagesize; /* system page size*/
gchar *filename; /* filename */
+ gchar *uri; /* caching the URI */
gint fd; /* open file descriptor*/
off_t filelen; /* what's the file length?*/
diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
index 366ea8aa0a..3192922564 100644
--- a/tools/gst-inspect.c
+++ b/tools/gst-inspect.c
@@ -874,16 +874,6 @@ print_element_list (void)
g_print ("%s: %s: %s\n", plugin->desc.name,
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
}
-#ifndef GST_DISABLE_URI
- else if (GST_IS_URI_HANDLER (feature)) {
- GstURIHandler *handler;
-
- handler = GST_URI_HANDLER (feature);
- g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n",
- plugin->desc.name, GST_PLUGIN_FEATURE_NAME (handler), handler->uri,
- handler->longdesc, handler->element, handler->property);
- }
-#endif
else {
g_print ("%s: %s (%s)\n", plugin->desc.name,
GST_PLUGIN_FEATURE_NAME (feature),
diff --git a/tools/gst-xmlinspect.c b/tools/gst-xmlinspect.c
index 89d1c0393d..3467e58029 100644
--- a/tools/gst-xmlinspect.c
+++ b/tools/gst-xmlinspect.c
@@ -867,16 +867,6 @@ print_element_list (void)
g_print ("%s: %s: %s\n", plugin->desc.name,
GST_PLUGIN_FEATURE_NAME (factory), factory->longdesc);
}
-#ifndef GST_DISABLE_URI
- else if (GST_IS_URI_HANDLER (feature)) {
- GstURIHandler *handler;
-
- handler = GST_URI_HANDLER (feature);
- g_print ("%s: %s: \"%s\" (%s) element \"%s\" property \"%s\"\n",
- plugin->desc.name, GST_PLUGIN_FEATURE_NAME (handler), handler->uri,
- handler->longdesc, handler->element, handler->property);
- }
-#endif
else {
g_print ("%s: %s (%s)\n", plugin->desc.name,
GST_PLUGIN_FEATURE_NAME (feature),