Don't pass default GLib marshallers for signals
authorNiels De Graef <nielsdegraef@gmail.com>
Mon, 26 Aug 2019 05:34:30 +0000 (07:34 +0200)
committerNicolas Dufresne <nicolas@ndufresne.ca>
Mon, 9 Sep 2019 12:16:24 +0000 (12:16 +0000)
commit4812c4087fe3f205a3475e47d64bfbe1205ccae6
tree93bc27e197a4404beea37416237916cf7b952424
parenta4aa2256d1b3f537f63b5042d5d689d0574e160e
Don't pass default GLib marshallers for signals

By passing NULL to `g_signal_new` instead of a marshaller, GLib will
actually internally optimize the signal (if the marshaller is available
in GLib itself) by also setting the valist marshaller. This makes the
signal emission a bit more performant than the regular marshalling,
which still needs to box into `GValue` and call libffi in case of a
generic marshaller.

Note that for custom marshallers, one would use
`g_signal_set_va_marshaller()` with the valist marshaller instead.
21 files changed:
gst/gstbin.c
gst/gstbus.c
gst/gstchildproxy.c
gst/gstclock.c
gst/gstdeviceprovider.c
gst/gstelement.c
gst/gstobject.c
gst/gstpad.c
gst/gstpadtemplate.c
gst/gstregistry.c
gst/gststreamcollection.c
libs/gst/base/gstaggregator.c
libs/gst/base/gstdataqueue.c
libs/gst/base/gstindex.c
libs/gst/controller/gsttimedvaluecontrolsource.c
plugins/elements/gstfakesink.c
plugins/elements/gstfakesrc.c
plugins/elements/gstidentity.c
plugins/elements/gstmultiqueue.c
plugins/elements/gstqueue.c
plugins/elements/gsttypefindelement.c