mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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:
parent
8df3c8477a
commit
3448e83c73
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue