mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
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.
This commit is contained in:
parent
2169b1a5d8
commit
f4f2cadeb5
3 changed files with 20 additions and 30 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-06-25 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* 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 <wim@fluendo.com>
|
||||
|
||||
* gst/gstelement.c: (gst_element_get_state_func),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue