[totem] Export downloaded filename as a property
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem] Export downloaded filename as a property
- Date: Mon, 23 Nov 2009 14:04:59 +0000 (UTC)
commit 91b9cebdc00b0ca71c120e7cb9a80ad359fe74ed
Author: Bastien Nocera <hadess hadess net>
Date: Mon Nov 23 14:04:25 2009 +0000
Export downloaded filename as a property
This should allow for the front-end to know which
file to copy.
src/backend/bacon-video-widget-gst-0.10.c | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index da2b4ad..0b10d22 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -129,7 +129,8 @@ enum
PROP_SHOW_CURSOR,
PROP_SHOW_VISUALS,
PROP_USER_AGENT,
- PROP_VOLUME
+ PROP_VOLUME,
+ PROP_DOWNLOAD_FILENAME
};
static const gchar *video_props_str[4] = {
@@ -1105,6 +1106,17 @@ bacon_video_widget_class_init (BaconVideoWidgetClass * klass)
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ /**
+ * BaconVideoWidget:download-filename:
+ *
+ * The filename of the fully downloaded stream when using
+ * download buffering.
+ **/
+ g_object_class_install_property (object_class, PROP_DOWNLOAD_FILENAME,
+ g_param_spec_string ("download-filename", NULL, NULL,
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
/* Signals */
/**
* BaconVideoWidget::error:
@@ -2418,8 +2430,8 @@ bvw_query_buffering_timeout (BaconVideoWidget *bvw)
bvw->priv->fill_id = 0;
gst_query_unref (query);
- //FIXME
- g_message ("tell front-end about cache filename: %s", bvw->priv->download_filename);
+ /* Tell the front-end about the downloaded file */
+ g_object_notify (G_OBJECT (bvw), "download-filename");
return FALSE;
}
@@ -2723,6 +2735,9 @@ bacon_video_widget_get_property (GObject * object, guint property_id,
case PROP_VOLUME:
g_value_set_double (value, bvw->priv->volume);
break;
+ case PROP_DOWNLOAD_FILENAME:
+ g_value_set_string (value, bvw->priv->download_filename);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]