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
329fe7f377
commit
2978216db1
@ -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…
x
Reference in New Issue
Block a user