mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
libs/gst/base/gstbasetransform.c: Work around the brokenness of the event vmethod in basetransform. Prefer to return ...
Original commit message from CVS: * libs/gst/base/gstbasetransform.c: (gst_base_transform_sink_event): Work around the brokenness of the event vmethod in basetransform. Prefer to return TRUE when the subclass returned FALSE (meaning don't forward the event). * libs/gst/base/gstbasetransform.h: Clarify the docs.
This commit is contained in:
parent
3d4e515e77
commit
58cc3d675b
3 changed files with 16 additions and 3 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2007-06-15 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* libs/gst/base/gstbasetransform.c:
|
||||||
|
(gst_base_transform_sink_event):
|
||||||
|
Work around the brokenness of the event vmethod in basetransform. Prefer
|
||||||
|
to return TRUE when the subclass returned FALSE (meaning don't forward
|
||||||
|
the event).
|
||||||
|
|
||||||
|
* libs/gst/base/gstbasetransform.h:
|
||||||
|
Clarify the docs.
|
||||||
|
|
||||||
2007-06-15 Wim Taymans <wim@fluendo.com>
|
2007-06-15 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstpad.c: (gst_pad_push_event), (gst_pad_send_event):
|
* gst/gstpad.c: (gst_pad_push_event), (gst_pad_send_event):
|
||||||
|
|
|
@ -1222,16 +1222,17 @@ gst_base_transform_sink_event (GstPad * pad, GstEvent * event)
|
||||||
GstBaseTransform *trans;
|
GstBaseTransform *trans;
|
||||||
GstBaseTransformClass *bclass;
|
GstBaseTransformClass *bclass;
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
gboolean forward = TRUE;
|
||||||
|
|
||||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
||||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||||
|
|
||||||
if (bclass->event)
|
if (bclass->event)
|
||||||
ret = bclass->event (trans, event);
|
forward = bclass->event (trans, event);
|
||||||
|
|
||||||
/* FIXME, do this in the default event handler so the subclass can do
|
/* FIXME, do this in the default event handler so the subclass can do
|
||||||
* something different. */
|
* something different. */
|
||||||
if (ret)
|
if (forward)
|
||||||
ret = gst_pad_push_event (trans->srcpad, event);
|
ret = gst_pad_push_event (trans->srcpad, event);
|
||||||
|
|
||||||
gst_object_unref (trans);
|
gst_object_unref (trans);
|
||||||
|
|
|
@ -170,7 +170,8 @@ struct _GstBaseTransform {
|
||||||
* @transform_ip: Required if the element operates in-place.
|
* @transform_ip: Required if the element operates in-place.
|
||||||
* Transform the incoming buffer in-place.
|
* Transform the incoming buffer in-place.
|
||||||
* @event: Optional.
|
* @event: Optional.
|
||||||
* Event handler on the sink pad.
|
* Event handler on the sink pad. This function should return
|
||||||
|
* TRUE if the base class should forward the event.
|
||||||
* @src_event: Optional.
|
* @src_event: Optional.
|
||||||
* Event handler on the source pad.
|
* Event handler on the source pad.
|
||||||
* @passthrough_on_same_caps: If set to TRUE, passthrough mode will be
|
* @passthrough_on_same_caps: If set to TRUE, passthrough mode will be
|
||||||
|
|
Loading…
Reference in a new issue