From 26d88d4ed9105fed786d279b1c0bd4140515245f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 30 Mar 2021 11:27:11 +0200 Subject: [PATCH] dtls: hotfix: allow per feature registration Use of GST_ELEMENT_REGISTER in plugin.c Part-of: --- ext/dtls/plugin.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/ext/dtls/plugin.c b/ext/dtls/plugin.c index 78a998060d..679744965c 100644 --- a/ext/dtls/plugin.c +++ b/ext/dtls/plugin.c @@ -27,29 +27,22 @@ #include "config.h" #endif -#include "gstdtlsdec.h" -#include "gstdtlsenc.h" -#include "gstdtlssrtpenc.h" -#include "gstdtlssrtpdec.h" -#include "gstdtlssrtpdemux.h" - #include +#include "gstdtlselements.h" + static gboolean plugin_init (GstPlugin * plugin) { - gst_type_mark_as_plugin_api (GST_DTLS_TYPE_CONNECTION_STATE, 0); + gboolean ret = FALSE; - return gst_element_register (plugin, "dtlsenc", GST_RANK_NONE, - GST_TYPE_DTLS_ENC) - && gst_element_register (plugin, "dtlsdec", GST_RANK_NONE, - GST_TYPE_DTLS_DEC) - && gst_element_register (plugin, "dtlssrtpdec", GST_RANK_NONE, - GST_TYPE_DTLS_SRTP_DEC) - && gst_element_register (plugin, "dtlssrtpenc", GST_RANK_NONE, - GST_TYPE_DTLS_SRTP_ENC) - && gst_element_register (plugin, "dtlssrtpdemux", GST_RANK_NONE, - GST_TYPE_DTLS_SRTP_DEMUX); + ret |= GST_ELEMENT_REGISTER (dtlsenc, plugin); + ret |= GST_ELEMENT_REGISTER (dtlsdec, plugin); + ret |= GST_ELEMENT_REGISTER (dtlssrtpdec, plugin); + ret |= GST_ELEMENT_REGISTER (dtlssrtpenc, plugin); + ret |= GST_ELEMENT_REGISTER (dtlssrtpdemux, plugin); + + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,