From c0d024e29a2e1311b9c28ff531019930c77c1663 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 9 Dec 2004 12:57:29 +0000 Subject: [PATCH] Synchronize property names where not yet the case. Devices are now device=X, other versions are deprecated (but still... Original commit message from CVS: * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_class_init), (cdparanoia_set_property), (cdparanoia_get_property): * ext/dvdnav/dvdnavsrc.c: (dvdnavsrc_class_init), (dvdnavsrc_set_property), (dvdnavsrc_get_property): * ext/dvdread/dvdreadsrc.c: (dvdreadsrc_class_init), (dvdreadsrc_init), (dvdreadsrc_set_property), (dvdreadsrc_get_property): * sys/vcd/vcdsrc.c: (gst_vcdsrc_class_init), (gst_vcdsrc_set_property), (gst_vcdsrc_get_property): Synchronize property names where not yet the case. Devices are now device=X, other versions are deprecated (but still exist). Also use g_free() unconditionally. * gst/playback/gstplaybasebin.c: (gst_play_base_bin_class_init), (setup_source), (gst_play_base_bin_get_property): Expose source. --- ChangeLog | 18 ++++++++++++++++++ ext/cdparanoia/gstcdparanoia.c | 12 +++++++++--- gst/playback/gstplaybasebin.c | 14 ++++++++++++++ 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff83685..2ef9251 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2004-12-09 Ronald S. Bultje + + * ext/cdparanoia/gstcdparanoia.c: (cdparanoia_class_init), + (cdparanoia_set_property), (cdparanoia_get_property): + * ext/dvdnav/dvdnavsrc.c: (dvdnavsrc_class_init), + (dvdnavsrc_set_property), (dvdnavsrc_get_property): + * ext/dvdread/dvdreadsrc.c: (dvdreadsrc_class_init), + (dvdreadsrc_init), (dvdreadsrc_set_property), + (dvdreadsrc_get_property): + * sys/vcd/vcdsrc.c: (gst_vcdsrc_class_init), + (gst_vcdsrc_set_property), (gst_vcdsrc_get_property): + Synchronize property names where not yet the case. Devices are + now device=X, other versions are deprecated (but still exist). + Also use g_free() unconditionally. + * gst/playback/gstplaybasebin.c: (gst_play_base_bin_class_init), + (setup_source), (gst_play_base_bin_get_property): + Expose source. + 2004-12-09 Thomas Vander Stichele * configure.ac: move GCONF macro outside conditional for the am diff --git a/ext/cdparanoia/gstcdparanoia.c b/ext/cdparanoia/gstcdparanoia.c index f29760e..23ed90c 100644 --- a/ext/cdparanoia/gstcdparanoia.c +++ b/ext/cdparanoia/gstcdparanoia.c @@ -117,6 +117,7 @@ enum { ARG_0, ARG_LOCATION, + ARG_DEVICE, ARG_GENERIC_DEVICE, ARG_DEFAULT_SECTORS, ARG_SEARCH_OVERLAP, @@ -223,8 +224,12 @@ cdparanoia_class_init (CDParanoiaClass * klass) NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_LOCATION, - g_param_spec_string ("location", "location", "location", + g_param_spec_string ("location", "Location", + "CD device location (deprecated; use device)", NULL, G_PARAM_READWRITE)); + g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_DEVICE, + g_param_spec_string ("device", "Device", + "CD device location", NULL, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_GENERIC_DEVICE, g_param_spec_string ("generic_device", "Generic device", "Use specified generic scsi device", NULL, G_PARAM_READWRITE)); @@ -342,9 +347,9 @@ cdparanoia_set_property (GObject * object, guint prop_id, const GValue * value, src = CDPARANOIA (object); switch (prop_id) { + case ARG_DEVICE: case ARG_LOCATION: - if (src->device) - g_free (src->device); + g_free (src->device); /* clear the filename if we get a NULL (is that possible?) */ if (!g_ascii_strcasecmp (g_value_get_string (value), "")) src->device = NULL; @@ -407,6 +412,7 @@ cdparanoia_get_property (GObject * object, guint prop_id, GValue * value, src = CDPARANOIA (object); switch (prop_id) { + case ARG_DEVICE: case ARG_LOCATION: g_value_set_string (value, src->device); break; diff --git a/gst/playback/gstplaybasebin.c b/gst/playback/gstplaybasebin.c index 63522e6..f22f1b2 100644 --- a/gst/playback/gstplaybasebin.c +++ b/gst/playback/gstplaybasebin.c @@ -39,6 +39,7 @@ enum ARG_NSTREAMS, ARG_QUEUE_SIZE, ARG_STREAMINFO, + ARG_SOURCE }; /* signals */ @@ -135,6 +136,9 @@ gst_play_base_bin_class_init (GstPlayBaseBinClass * klass) g_object_class_install_property (gobject_klass, ARG_STREAMINFO, g_param_spec_pointer ("stream-info", "Stream info", "List of streaminfo", G_PARAM_READABLE)); + g_object_class_install_property (gobject_klass, ARG_SOURCE, + g_param_spec_object ("source", "Source", "Source element", + GST_TYPE_ELEMENT, G_PARAM_READABLE)); GST_DEBUG_CATEGORY_INIT (gst_play_base_bin_debug, "playbasebin", 0, "playbasebin"); @@ -907,6 +911,7 @@ setup_source (GstPlayBaseBin * play_base_bin, GError ** error) gst_bin_remove (GST_BIN (play_base_bin->thread), old_src); } gst_bin_add (GST_BIN (play_base_bin->thread), play_base_bin->source); + g_object_notify (G_OBJECT (play_base_bin), "source"); /* make sure the new element has the same state as the parent */ if (gst_bin_sync_children_state (GST_BIN (play_base_bin->thread)) == GST_STATE_FAILURE) { @@ -1122,6 +1127,15 @@ gst_play_base_bin_get_property (GObject * object, guint prop_id, GValue * value, g_value_set_pointer (value, (gpointer) gst_play_base_bin_get_streaminfo (play_base_bin)); break; + case ARG_SOURCE: + if (GST_IS_BIN (play_base_bin->source)) { + GstElement *kid; + + kid = gst_bin_get_by_name (GST_BIN (play_base_bin->source), "source"); + g_value_set_object (value, kid); + } else + g_value_set_object (value, play_base_bin->source); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; -- 2.7.4