mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +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>
|
||||
|
||||
* 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;
|
||||
GstBaseTransformClass *bclass;
|
||||
gboolean ret = TRUE;
|
||||
gboolean forward = TRUE;
|
||||
|
||||
trans = GST_BASE_TRANSFORM (gst_pad_get_parent (pad));
|
||||
bclass = GST_BASE_TRANSFORM_GET_CLASS (trans);
|
||||
|
||||
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
|
||||
* something different. */
|
||||
if (ret)
|
||||
if (forward)
|
||||
ret = gst_pad_push_event (trans->srcpad, event);
|
||||
|
||||
gst_object_unref (trans);
|
||||
|
|
|
@ -170,7 +170,8 @@ struct _GstBaseTransform {
|
|||
* @transform_ip: Required if the element operates in-place.
|
||||
* Transform the incoming buffer in-place.
|
||||
* @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.
|
||||
* Event handler on the source pad.
|
||||
* @passthrough_on_same_caps: If set to TRUE, passthrough mode will be
|
||||
|
|
Loading…
Reference in a new issue