mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
signalprocessor: register function pointers just once
Avoid re-registering those for each wrapped ladpsa/lv2 element.
This commit is contained in:
parent
9304f959a4
commit
31423b4638
1 changed files with 13 additions and 10 deletions
|
@ -209,6 +209,13 @@ gst_signal_processor_class_init (GstSignalProcessorClass * klass)
|
||||||
|
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_change_state);
|
GST_DEBUG_FUNCPTR (gst_signal_processor_change_state);
|
||||||
|
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR (gst_signal_processor_setcaps);
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR (gst_signal_processor_sink_event);
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR (gst_signal_processor_chain);
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR (gst_signal_processor_sink_activate_push);
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR (gst_signal_processor_getrange);
|
||||||
|
GST_DEBUG_REGISTER_FUNCPTR (gst_signal_processor_src_activate_pull);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -225,25 +232,21 @@ gst_signal_processor_add_pad_from_template (GstSignalProcessor * self,
|
||||||
GST_SIGNAL_PROCESSOR_PAD (pad)->channels =
|
GST_SIGNAL_PROCESSOR_PAD (pad)->channels =
|
||||||
GST_SIGNAL_PROCESSOR_PAD_TEMPLATE (templ)->channels;
|
GST_SIGNAL_PROCESSOR_PAD_TEMPLATE (templ)->channels;
|
||||||
|
|
||||||
gst_pad_set_setcaps_function (pad,
|
gst_pad_set_setcaps_function (pad, gst_signal_processor_setcaps);
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_setcaps));
|
|
||||||
|
|
||||||
if (templ->direction == GST_PAD_SINK) {
|
if (templ->direction == GST_PAD_SINK) {
|
||||||
GST_DEBUG_OBJECT (pad, "added new sink pad");
|
GST_DEBUG_OBJECT (pad, "added new sink pad");
|
||||||
|
|
||||||
gst_pad_set_event_function (pad,
|
gst_pad_set_event_function (pad, gst_signal_processor_sink_event);
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_event));
|
gst_pad_set_chain_function (pad, gst_signal_processor_chain);
|
||||||
gst_pad_set_chain_function (pad,
|
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_chain));
|
|
||||||
gst_pad_set_activatepush_function (pad,
|
gst_pad_set_activatepush_function (pad,
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_sink_activate_push));
|
gst_signal_processor_sink_activate_push);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (pad, "added new src pad");
|
GST_DEBUG_OBJECT (pad, "added new src pad");
|
||||||
|
|
||||||
gst_pad_set_getrange_function (pad,
|
gst_pad_set_getrange_function (pad, gst_signal_processor_getrange);
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_getrange));
|
|
||||||
gst_pad_set_activatepull_function (pad,
|
gst_pad_set_activatepull_function (pad,
|
||||||
GST_DEBUG_FUNCPTR (gst_signal_processor_src_activate_pull));
|
gst_signal_processor_src_activate_pull);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_element_add_pad (GST_ELEMENT (self), pad);
|
gst_element_add_pad (GST_ELEMENT (self), pad);
|
||||||
|
|
Loading…
Reference in a new issue