+2005-12-07 Tim-Philipp Müller <tim at centricular dot net>
+
+ * gst/playback/gstplaybasebin.c: (gst_play_base_bin_get_property):
+ * gst/playback/gstplaybin.c: (gst_play_bin_get_property):
+ Work around refcount problem with g_value_set_object() that occur
+ if the core has been compiled against GLib-2.6 (g_value_set_object()
+ will only g_object_ref() the element, but the caller will
+ gst_object_unref() it and bad things will happen due to the way
+ GstObjects are refcounted in the GLib-2.6 case). Fixes problems with
+ totem for people on FC4 using Thomas's 0.10 RPMs.
+
2005-12-07 Edward Hervey <edward@fluendo.com>
Time to welcome ogm to 0.10 :)
#define GROUP_WAIT(pbb) g_cond_wait (pbb->group_cond, pbb->group_lock)
#define GROUP_SIGNAL(pbb) g_cond_signal (pbb->group_cond)
+#ifndef GST_HAVE_GLIB_2_8
+#define _gst_gvalue_set_gstobject(gvalue,obj) \
+ gst_object_ref (obj); \
+ g_value_set_object (gvalue, obj); \
+ g_object_unref (obj);
+#else
+#define _gst_gvalue_set_gstobject(gvalue,obj) \
+ g_value_set_object (gvalue, obj);
+#endif
+
/* props */
enum
{
(gpointer) gst_play_base_bin_get_streaminfo (play_base_bin));
break;
case ARG_SOURCE:
- g_value_set_object (value, play_base_bin->source);
+ _gst_gvalue_set_gstobject (value, play_base_bin->source);
break;
case ARG_VIDEO:
GROUP_LOCK (play_base_bin);
#define VOLUME_MAX_DOUBLE 4.0
+#ifndef GST_HAVE_GLIB_2_8
+#define _gst_gvalue_set_gstobject(gvalue,obj) \
+ gst_object_ref (obj); \
+ g_value_set_object (gvalue, obj); \
+ g_object_unref (obj);
+#else
+#define _gst_gvalue_set_gstobject(gvalue,obj) \
+ g_value_set_object (gvalue, obj);
+#endif
+
typedef struct _GstPlayBin GstPlayBin;
typedef struct _GstPlayBinClass GstPlayBinClass;
switch (prop_id) {
case ARG_VIDEO_SINK:
- g_value_set_object (value, play_bin->video_sink);
+ _gst_gvalue_set_gstobject (value, play_bin->video_sink);
break;
case ARG_AUDIO_SINK:
- g_value_set_object (value, play_bin->audio_sink);
+ _gst_gvalue_set_gstobject (value, play_bin->audio_sink);
break;
case ARG_VIS_PLUGIN:
- g_value_set_object (value, play_bin->visualisation);
+ _gst_gvalue_set_gstobject (value, play_bin->visualisation);
break;
case ARG_VOLUME:
g_value_set_double (value, play_bin->volume);