From: Sebastian Dröge Date: Thu, 21 Jun 2012 10:12:11 +0000 (+0100) Subject: appsrc: Actually store any URI that is set and return this when asked for the URI X-Git-Tag: 1.19.3~511^2~6300 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df63268e5a73866a6daa5d27f3056ee2e5d4af09;p=platform%2Fupstream%2Fgstreamer.git appsrc: Actually store any URI that is set and return this when asked for the URI --- diff --git a/gst-libs/gst/app/gstappsrc.c b/gst-libs/gst/app/gstappsrc.c index 9da35fc..640c7a0 100644 --- a/gst-libs/gst/app/gstappsrc.c +++ b/gst-libs/gst/app/gstappsrc.c @@ -116,6 +116,7 @@ struct _GstAppSrcPrivate guint64 max_bytes; GstFormat format; gboolean block; + gchar *uri; gboolean flushing; gboolean started; @@ -551,6 +552,8 @@ gst_app_src_finalize (GObject * obj) g_cond_free (priv->cond); g_queue_free (priv->queue); + g_free (priv->uri); + G_OBJECT_CLASS (parent_class)->finalize (obj); } @@ -1649,14 +1652,20 @@ gst_app_src_uri_get_protocols (GType type) static gchar * gst_app_src_uri_get_uri (GstURIHandler * handler) { - return g_strdup ("appsrc"); + GstAppSrc *appsrc = GST_APP_SRC (handler); + + return appsrc->priv->uri ? g_strdup (appsrc->priv->uri) : NULL; } static gboolean gst_app_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, GError ** error) { - /* GstURIHandler checks the protocol for us */ + GstAppSrc *appsrc = GST_APP_SRC (handler); + + g_free (appsrc->priv->uri); + appsrc->priv->uri = uri ? g_strdup (uri) : NULL; + return TRUE; }