diff options
author | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2007-06-22 15:30:00 +0000 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2007-06-22 15:30:00 +0000 |
commit | d6627ae8e08ddf3a645d0c961970edcfc4a2a3cd (patch) | |
tree | bc432985eb40b92ede7f05dfc5f9c0c5a8e2fa14 /gst/switch/gstswitch.h | |
parent | 8eb58da4b47dff93075738afccd452ecbdf9342f (diff) | |
download | gst-plugins-bad-d6627ae8e08ddf3a645d0c961970edcfc4a2a3cd.tar.gz gst-plugins-bad-d6627ae8e08ddf3a645d0c961970edcfc4a2a3cd.tar.bz2 gst-plugins-bad-d6627ae8e08ddf3a645d0c961970edcfc4a2a3cd.zip |
examples/switch/switcher.c (my_bus_callback, switch_timer, last_message_received, main): gst/switch/gstswitch.c (gst_...
Original commit message from CVS:
* examples/switch/switcher.c (my_bus_callback, switch_timer,
last_message_received, main):
* gst/switch/gstswitch.c (gst_switch_release_pad,
gst_switch_request_new_pad, gst_switch_chain, gst_switch_event,
gst_switch_set_property, gst_switch_get_property,
gst_switch_get_linked_pad, gst_switch_getcaps,
gst_switch_bufferalloc, gst_switch_dispose, gst_switch_init):
* gst/switch/gstswitch.h (switch_mutex, GST_SWITCH_LOCK,
GST_SWITCH_UNLOCK):
Add an extra lock to protect against certain variables instead of
using the object lock. Fix case where caps are different in the
sink pads causes deadlock. Update example to use different caps
on each sink pad.
Diffstat (limited to 'gst/switch/gstswitch.h')
-rw-r--r-- | gst/switch/gstswitch.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/switch/gstswitch.h b/gst/switch/gstswitch.h index e7a0ed86..c9ca0ec0 100644 --- a/gst/switch/gstswitch.h +++ b/gst/switch/gstswitch.h @@ -66,8 +66,12 @@ struct _GstSwitch { * new segment has been sent */ GHashTable *stored_buffers; + GMutex *switch_mutex; }; +#define GST_SWITCH_LOCK(obj) g_mutex_lock(obj->switch_mutex) +#define GST_SWITCH_UNLOCK(obj) g_mutex_unlock(obj->switch_mutex) + struct _GstSwitchClass { GstElementClass parent_class; }; |