From d8f61515d84cfd05729f8064598f44bef2a82e69 Mon Sep 17 00:00:00 2001 From: Niels De Graef Date: Tue, 27 Aug 2019 07:59:27 +0200 Subject: 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. --- gst/camerabin2/gstcamerabin2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gst/camerabin2') diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c index 83210f4bb..5dbf2d850 100644 --- a/gst/camerabin2/gstcamerabin2.c +++ b/gst/camerabin2/gstcamerabin2.c @@ -833,7 +833,7 @@ gst_camera_bin_class_init (GstCameraBin2Class * klass) G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstCameraBin2Class, start_capture), - NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + NULL, NULL, NULL, G_TYPE_NONE, 0); /** * GstCameraBin2::capture-stop: @@ -844,7 +844,7 @@ gst_camera_bin_class_init (GstCameraBin2Class * klass) G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GstCameraBin2Class, stop_capture), - NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + NULL, NULL, NULL, G_TYPE_NONE, 0); } static void -- cgit v1.2.1