Synchronize property names where not yet the case. Devices are now device=X, other...
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Thu, 9 Dec 2004 12:57:29 +0000 (12:57 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Thu, 9 Dec 2004 12:57:29 +0000 (12:57 +0000)
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
ext/cdparanoia/gstcdparanoia.c
gst/playback/gstplaybasebin.c

index ff83685dc3ac14f265be9bbe3f4d36469d3b1f4e..2ef92519abd5ee6b60630687aa4a8c2898255944 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2004-12-09  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
+
+       * 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  <thomas at apestaart dot org>
 
        * configure.ac: move GCONF macro outside conditional for the am
index f29760e669e4841119997a53635b8356ebee35c6..23ed90c39c71dfa7339fa50ffa101f8abbb0175f 100644 (file)
@@ -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;
index 63522e6ac8737b822804e516f03d09048167cfe1..f22f1b287e3587fd776c10fd9f11b29693994323 100644 (file)
@@ -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;