From f4f2cadeb59e96c61410cc5e16a255a75ef6b79b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 25 Jun 2005 17:44:39 +0000 Subject: [PATCH] gst/elements/gsttee.c: Core takes STREAM_LOCK for us now. Original commit message from CVS: * gst/elements/gsttee.c: (gst_tee_chain), (gst_tee_loop), (gst_tee_sink_activate): Core takes STREAM_LOCK for us now. --- ChangeLog | 6 ++++++ gst/elements/gsttee.c | 22 +++++++--------------- plugins/elements/gsttee.c | 22 +++++++--------------- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75fe57a9b2..4dc79047c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-25 Wim Taymans + + * gst/elements/gsttee.c: (gst_tee_chain), (gst_tee_loop), + (gst_tee_sink_activate): + Core takes STREAM_LOCK for us now. + 2005-06-25 Wim Taymans * gst/gstelement.c: (gst_element_get_state_func), diff --git a/gst/elements/gsttee.c b/gst/elements/gsttee.c index 9806606633..2b70a77032 100644 --- a/gst/elements/gsttee.c +++ b/gst/elements/gsttee.c @@ -306,21 +306,15 @@ gst_tee_handle_buffer (GstTee * tee, GstBuffer * buffer) return g_value_get_enum (&ret); } -#define WITH_STREAM_LOCK(pad, expr) G_STMT_START {\ - GST_STREAM_LOCK (pad); \ - expr; \ - GST_STREAM_UNLOCK (pad); \ -}G_STMT_END - static GstFlowReturn gst_tee_chain (GstPad * pad, GstBuffer * buffer) { GstFlowReturn res; GstTee *tee; - tee = GST_TEE (gst_pad_get_parent (pad)); + tee = GST_TEE (GST_PAD_PARENT (pad)); - WITH_STREAM_LOCK (pad, res = gst_tee_handle_buffer (tee, buffer)); + res = gst_tee_handle_buffer (tee, buffer); return res; } @@ -334,9 +328,7 @@ gst_tee_loop (GstPad * pad) GstFlowReturn res; GstTee *tee; - GST_STREAM_LOCK (pad); - - tee = GST_TEE (gst_pad_get_parent (pad)); + tee = GST_TEE (GST_PAD_PARENT (pad)); res = gst_pad_pull_range (pad, tee->offset, DEFAULT_SIZE, &buffer); if (res != GST_FLOW_OK) @@ -346,13 +338,13 @@ gst_tee_loop (GstPad * pad) if (res != GST_FLOW_OK) goto pause_task; - GST_STREAM_UNLOCK (pad); return; pause_task: - gst_pad_pause_task (pad); - GST_STREAM_UNLOCK (pad); - return; + { + gst_pad_pause_task (pad); + return; + } } static gboolean diff --git a/plugins/elements/gsttee.c b/plugins/elements/gsttee.c index 9806606633..2b70a77032 100644 --- a/plugins/elements/gsttee.c +++ b/plugins/elements/gsttee.c @@ -306,21 +306,15 @@ gst_tee_handle_buffer (GstTee * tee, GstBuffer * buffer) return g_value_get_enum (&ret); } -#define WITH_STREAM_LOCK(pad, expr) G_STMT_START {\ - GST_STREAM_LOCK (pad); \ - expr; \ - GST_STREAM_UNLOCK (pad); \ -}G_STMT_END - static GstFlowReturn gst_tee_chain (GstPad * pad, GstBuffer * buffer) { GstFlowReturn res; GstTee *tee; - tee = GST_TEE (gst_pad_get_parent (pad)); + tee = GST_TEE (GST_PAD_PARENT (pad)); - WITH_STREAM_LOCK (pad, res = gst_tee_handle_buffer (tee, buffer)); + res = gst_tee_handle_buffer (tee, buffer); return res; } @@ -334,9 +328,7 @@ gst_tee_loop (GstPad * pad) GstFlowReturn res; GstTee *tee; - GST_STREAM_LOCK (pad); - - tee = GST_TEE (gst_pad_get_parent (pad)); + tee = GST_TEE (GST_PAD_PARENT (pad)); res = gst_pad_pull_range (pad, tee->offset, DEFAULT_SIZE, &buffer); if (res != GST_FLOW_OK) @@ -346,13 +338,13 @@ gst_tee_loop (GstPad * pad) if (res != GST_FLOW_OK) goto pause_task; - GST_STREAM_UNLOCK (pad); return; pause_task: - gst_pad_pause_task (pad); - GST_STREAM_UNLOCK (pad); - return; + { + gst_pad_pause_task (pad); + return; + } } static gboolean