mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +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>
|
2005-06-25 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstelement.c: (gst_element_get_state_func),
|
* 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);
|
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
|
static GstFlowReturn
|
||||||
gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstTee *tee;
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -334,9 +328,7 @@ gst_tee_loop (GstPad * pad)
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstTee *tee;
|
GstTee *tee;
|
||||||
|
|
||||||
GST_STREAM_LOCK (pad);
|
tee = GST_TEE (GST_PAD_PARENT (pad));
|
||||||
|
|
||||||
tee = GST_TEE (gst_pad_get_parent (pad));
|
|
||||||
|
|
||||||
res = gst_pad_pull_range (pad, tee->offset, DEFAULT_SIZE, &buffer);
|
res = gst_pad_pull_range (pad, tee->offset, DEFAULT_SIZE, &buffer);
|
||||||
if (res != GST_FLOW_OK)
|
if (res != GST_FLOW_OK)
|
||||||
|
@ -346,13 +338,13 @@ gst_tee_loop (GstPad * pad)
|
||||||
if (res != GST_FLOW_OK)
|
if (res != GST_FLOW_OK)
|
||||||
goto pause_task;
|
goto pause_task;
|
||||||
|
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pause_task:
|
pause_task:
|
||||||
gst_pad_pause_task (pad);
|
{
|
||||||
GST_STREAM_UNLOCK (pad);
|
gst_pad_pause_task (pad);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
|
@ -306,21 +306,15 @@ gst_tee_handle_buffer (GstTee * tee, GstBuffer * buffer)
|
||||||
return g_value_get_enum (&ret);
|
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
|
static GstFlowReturn
|
||||||
gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
gst_tee_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
{
|
{
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstTee *tee;
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -334,9 +328,7 @@ gst_tee_loop (GstPad * pad)
|
||||||
GstFlowReturn res;
|
GstFlowReturn res;
|
||||||
GstTee *tee;
|
GstTee *tee;
|
||||||
|
|
||||||
GST_STREAM_LOCK (pad);
|
tee = GST_TEE (GST_PAD_PARENT (pad));
|
||||||
|
|
||||||
tee = GST_TEE (gst_pad_get_parent (pad));
|
|
||||||
|
|
||||||
res = gst_pad_pull_range (pad, tee->offset, DEFAULT_SIZE, &buffer);
|
res = gst_pad_pull_range (pad, tee->offset, DEFAULT_SIZE, &buffer);
|
||||||
if (res != GST_FLOW_OK)
|
if (res != GST_FLOW_OK)
|
||||||
|
@ -346,13 +338,13 @@ gst_tee_loop (GstPad * pad)
|
||||||
if (res != GST_FLOW_OK)
|
if (res != GST_FLOW_OK)
|
||||||
goto pause_task;
|
goto pause_task;
|
||||||
|
|
||||||
GST_STREAM_UNLOCK (pad);
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pause_task:
|
pause_task:
|
||||||
gst_pad_pause_task (pad);
|
{
|
||||||
GST_STREAM_UNLOCK (pad);
|
gst_pad_pause_task (pad);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
Loading…
Reference in a new issue