baseparse: Allow chaining of subclass event handlers

This allows the child class to chain its event handler with
GstBaseParse, so that subclasses don't have to duplicate all the default
event handling logic.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
This commit is contained in:
Arun Raghavan 2010-09-22 16:07:24 +05:30 committed by Tim-Philipp Müller
parent 8df3c8477a
commit 3448e83c73

View file

@ -361,7 +361,6 @@ gst_base_parse_class_init (GstBaseParseClass * klass)
/* Default handlers */
klass->check_valid_frame = gst_base_parse_check_frame;
klass->parse_frame = gst_base_parse_parse_frame;
klass->event = gst_base_parse_sink_eventfunc;
klass->src_event = gst_base_parse_src_eventfunc;
klass->is_seekable = gst_base_parse_is_seekable;
klass->convert = gst_base_parse_convert;
@ -548,6 +547,9 @@ gst_base_parse_sink_event (GstPad * pad, GstEvent * event)
if (bclass->event)
handled = bclass->event (parse, event);
if (!handled)
handled = gst_base_parse_sink_eventfunc (parse, event);
if (!handled)
ret = gst_pad_event_default (pad, event);
}