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),
(gst_element_set_state):
* gst/gstelement.h:
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;
}
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)
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
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;
}
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)
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