summaryrefslogtreecommitdiffstats
path: root/ext/gio/gstgiosrc.c
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-09-29 07:01:55 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-09-29 07:01:55 +0000
commit68a1d6cfd59d02d70f08bbb4a78a1de5ab4b2c22 (patch)
tree08cd1cf59e250e404727cef924f7c4a381c31c03 /ext/gio/gstgiosrc.c
parent453fef95a1527997e6e360d134ed7087a4773876 (diff)
downloadgst-plugins-bad-68a1d6cfd59d02d70f08bbb4a78a1de5ab4b2c22.tar.gz
gst-plugins-bad-68a1d6cfd59d02d70f08bbb4a78a1de5ab4b2c22.tar.bz2
gst-plugins-bad-68a1d6cfd59d02d70f08bbb4a78a1de5ab4b2c22.zip
ext/gio/: Some minor cleanup and allow setting the location only when the element is not playing or paused.
Original commit message from CVS: * ext/gio/gstgiosink.c: (gst_gio_sink_base_init), (gst_gio_sink_set_property), (gst_gio_sink_render): * ext/gio/gstgiosrc.c: (gst_gio_src_base_init), (gst_gio_src_set_property): Some minor cleanup and allow setting the location only when the element is not playing or paused.
Diffstat (limited to 'ext/gio/gstgiosrc.c')
-rw-r--r--ext/gio/gstgiosrc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/gio/gstgiosrc.c b/ext/gio/gstgiosrc.c
index 6f41e449..15e0b9d2 100644
--- a/ext/gio/gstgiosrc.c
+++ b/ext/gio/gstgiosrc.c
@@ -49,8 +49,7 @@ enum
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("ANY")
- );
+ GST_STATIC_CAPS_ANY);
GST_BOILERPLATE_FULL (GstGioSrc, gst_gio_src, GstBaseSrc, GST_TYPE_BASE_SRC,
gst_gio_uri_handler_do_init);
@@ -76,7 +75,7 @@ gst_gio_src_base_init (gpointer gclass)
static GstElementDetails element_details = {
"GIO source",
"Source/File",
- "Read from any GVFS-supported location",
+ "Read from any GIO-supported location",
"Ren\xc3\xa9 Stadler <mail@renestadler.de>"
};
GstElementClass *element_class = GST_ELEMENT_CLASS (gclass);
@@ -147,6 +146,10 @@ gst_gio_src_set_property (GObject * object, guint prop_id,
switch (prop_id) {
case ARG_LOCATION:
+ if (GST_STATE (src) == GST_STATE_PLAYING ||
+ GST_STATE (src) == GST_STATE_PAUSED)
+ break;
+
g_free (src->location);
src->location = g_strdup (g_value_get_string (value));
break;