gst/gstobject.h (GST_CLASS_LOCK, GST_CLASS_TRYLOCK) (GST_CLASS_UNLOCK, GST_CLASS_GET_LOCK, GstObjectClass)

Original commit message from CVS:
2005-06-23  Andy Wingo  <wingo@pobox.com>

* gst/gstobject.h (GST_CLASS_LOCK, GST_CLASS_TRYLOCK)
(GST_CLASS_UNLOCK, GST_CLASS_GET_LOCK, GstObjectClass)
* gst/gstobject.c (gst_object_class_init): Make the class lock
recursive. Wim won't let me drop deep_notify. Decodebin works
again, whoopdy doo.
This commit is contained in:
Andy Wingo 2005-06-23 15:04:48 +00:00
parent 57bfdb30e4
commit cc2d216e88
3 changed files with 12 additions and 5 deletions

View file

@ -1,5 +1,11 @@
2005-06-23 Andy Wingo <wingo@pobox.com> 2005-06-23 Andy Wingo <wingo@pobox.com>
* gst/gstobject.h (GST_CLASS_LOCK, GST_CLASS_TRYLOCK)
(GST_CLASS_UNLOCK, GST_CLASS_GET_LOCK, GstObjectClass)
* gst/gstobject.c (gst_object_class_init): Make the class lock
recursive. Wim won't let me drop deep_notify. Decodebin works
again, whoopdy doo.
* gst/gstghostpad.c (on_int_notify): Catches notify::caps on the * gst/gstghostpad.c (on_int_notify): Catches notify::caps on the
internal pad, and hacks accordingly. Doesn't do it on the target internal pad, and hacks accordingly. Doesn't do it on the target
pad because we change its caps. Probably catches all cases of pad because we change its caps. Probably catches all cases of

View file

@ -187,7 +187,8 @@ gst_object_class_init (GstObjectClass * klass)
G_TYPE_PARAM); G_TYPE_PARAM);
klass->path_string_separator = "/"; klass->path_string_separator = "/";
klass->lock = g_mutex_new (); klass->lock = g_new0 (GStaticRecMutex, 1);
g_static_rec_mutex_init (klass->lock);
klass->signal_object = g_object_new (gst_signal_object_get_type (), NULL); klass->signal_object = g_object_new (gst_signal_object_get_type (), NULL);

View file

@ -98,9 +98,9 @@ struct _GstObject {
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
#define GST_CLASS_LOCK(obj) (g_mutex_lock(GST_OBJECT_CLASS_CAST(obj)->lock)) #define GST_CLASS_LOCK(obj) (g_static_rec_mutex_lock(GST_OBJECT_CLASS_CAST(obj)->lock))
#define GST_CLASS_TRYLOCK(obj) (g_mutex_trylock(GST_OBJECT_CLASS_CAST(obj)->lock)) #define GST_CLASS_TRYLOCK(obj) (g_static_rec_mutex_trylock(GST_OBJECT_CLASS_CAST(obj)->lock))
#define GST_CLASS_UNLOCK(obj) (g_mutex_unlock(GST_OBJECT_CLASS_CAST(obj)->lock)) #define GST_CLASS_UNLOCK(obj) (g_static_rec_mutex_unlock(GST_OBJECT_CLASS_CAST(obj)->lock))
#define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock) #define GST_CLASS_GET_LOCK(obj) (GST_OBJECT_CLASS_CAST(obj)->lock)
/* signal_object is used to signal to the whole class */ /* signal_object is used to signal to the whole class */
@ -110,7 +110,7 @@ struct _GstObjectClass {
gchar *path_string_separator; gchar *path_string_separator;
GObject *signal_object; GObject *signal_object;
GMutex *lock; GStaticRecMutex *lock;
/* signals */ /* signals */
void (*parent_set) (GstObject *object, GstObject *parent); void (*parent_set) (GstObject *object, GstObject *parent);