{
GstFragment *fragment = GST_FRAGMENT (gobject);
+ g_free (fragment->uri);
+ g_free (fragment->redirect_uri);
g_free (fragment->name);
g_mutex_clear (&fragment->priv->lock);
{
GObject parent;
+ gchar * uri; /* URI of the fragment */
+ gchar * redirect_uri; /* Redirect target if any */
+ gboolean redirect_permanent; /* If the redirect is permanent */
+
gchar * name; /* Name of the fragment */
gboolean completed; /* Whether the fragment is complete or not */
guint64 download_start_time; /* Epoch time when the download started */
/* set the element state to NULL */
GST_OBJECT_UNLOCK (downloader);
- if (download == NULL)
+ if (download == NULL) {
gst_element_set_state (urisrc, GST_STATE_NULL);
- else
+ } else {
+ GstQuery *query;
+
+ /* Download successfull, let's query the URI */
+ query = gst_query_new_uri ();
+ if (gst_element_query (urisrc, query)) {
+ gst_query_parse_uri (query, &download->uri);
+ gst_query_parse_uri_redirection (query, &download->redirect_uri);
+ gst_query_parse_uri_redirection_permanent (query,
+ &download->redirect_permanent);
+ }
+ gst_query_unref (query);
gst_element_set_state (urisrc, GST_STATE_READY);
+ }
GST_OBJECT_LOCK (downloader);
gst_element_set_bus (urisrc, NULL);