summaryrefslogtreecommitdiff
path: root/ext/dtls
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2019-08-27 07:59:27 +0200
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2019-11-06 14:27:46 +0000
commitd8f61515d84cfd05729f8064598f44bef2a82e69 (patch)
treecd058fe158bdd16cc1600d74cb7e81be8ab74dbf /ext/dtls
parente6847b6d294cbccc7411b5261d13392fab9402ea (diff)
downloadgstreamer-plugins-bad-d8f61515d84cfd05729f8064598f44bef2a82e69.tar.gz
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.
Diffstat (limited to 'ext/dtls')
-rw-r--r--ext/dtls/gstdtlsconnection.c13
-rw-r--r--ext/dtls/gstdtlsdec.c3
-rw-r--r--ext/dtls/gstdtlsenc.c3
-rw-r--r--ext/dtls/gstdtlssrtpenc.c3
4 files changed, 8 insertions, 14 deletions
diff --git a/ext/dtls/gstdtlsconnection.c b/ext/dtls/gstdtlsconnection.c
index 244ec997c..577a69e5b 100644
--- a/ext/dtls/gstdtlsconnection.c
+++ b/ext/dtls/gstdtlsconnection.c
@@ -134,20 +134,17 @@ gst_dtls_connection_class_init (GstDtlsConnectionClass * klass)
signals[SIGNAL_ON_DECODER_KEY] =
g_signal_new ("on-decoder-key", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_NONE, 3,
- G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT);
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT);
signals[SIGNAL_ON_ENCODER_KEY] =
g_signal_new ("on-encoder-key", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_NONE, 3,
- G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT);
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT);
signals[SIGNAL_ON_PEER_CERTIFICATE] =
g_signal_new ("on-peer-certificate", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_BOOLEAN, 1, G_TYPE_STRING);
properties[PROP_AGENT] =
g_param_spec_object ("agent",
diff --git a/ext/dtls/gstdtlsdec.c b/ext/dtls/gstdtlsdec.c
index 6360e2426..0d4ffe782 100644
--- a/ext/dtls/gstdtlsdec.c
+++ b/ext/dtls/gstdtlsdec.c
@@ -128,8 +128,7 @@ gst_dtls_dec_class_init (GstDtlsDecClass * klass)
signals[SIGNAL_ON_KEY_RECEIVED] =
g_signal_new ("on-key-received", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_NONE, 0);
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
properties[PROP_CONNECTION_ID] =
g_param_spec_string ("connection-id",
diff --git a/ext/dtls/gstdtlsenc.c b/ext/dtls/gstdtlsenc.c
index 5b3bb26af..f992af0ab 100644
--- a/ext/dtls/gstdtlsenc.c
+++ b/ext/dtls/gstdtlsenc.c
@@ -122,8 +122,7 @@ gst_dtls_enc_class_init (GstDtlsEncClass * klass)
signals[SIGNAL_ON_KEY_RECEIVED] =
g_signal_new ("on-key-received", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_NONE, 0);
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
properties[PROP_CONNECTION_ID] =
g_param_spec_string ("connection-id",
diff --git a/ext/dtls/gstdtlssrtpenc.c b/ext/dtls/gstdtlssrtpenc.c
index 237aec516..5a2db432d 100644
--- a/ext/dtls/gstdtlssrtpenc.c
+++ b/ext/dtls/gstdtlssrtpenc.c
@@ -126,8 +126,7 @@ gst_dtls_srtp_enc_class_init (GstDtlsSrtpEncClass * klass)
signals[SIGNAL_ON_KEY_SET] =
g_signal_new ("on-key-set", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, 0, NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_NONE, 0);
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
properties[PROP_IS_CLIENT] =
g_param_spec_boolean ("is-client",