dtls: hotfix: allow per feature registration

Use of GST_ELEMENT_REGISTER in plugin.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2123>
This commit is contained in:
Stéphane Cerveau 2021-03-30 11:27:11 +02:00 committed by GStreamer Marge Bot
parent 10d245f06c
commit 26d88d4ed9

View file

@ -27,29 +27,22 @@
#include "config.h" #include "config.h"
#endif #endif
#include "gstdtlsdec.h"
#include "gstdtlsenc.h"
#include "gstdtlssrtpenc.h"
#include "gstdtlssrtpdec.h"
#include "gstdtlssrtpdemux.h"
#include <gst/gst.h> #include <gst/gst.h>
#include "gstdtlselements.h"
static gboolean static gboolean
plugin_init (GstPlugin * plugin) 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, ret |= GST_ELEMENT_REGISTER (dtlsenc, plugin);
GST_TYPE_DTLS_ENC) ret |= GST_ELEMENT_REGISTER (dtlsdec, plugin);
&& gst_element_register (plugin, "dtlsdec", GST_RANK_NONE, ret |= GST_ELEMENT_REGISTER (dtlssrtpdec, plugin);
GST_TYPE_DTLS_DEC) ret |= GST_ELEMENT_REGISTER (dtlssrtpenc, plugin);
&& gst_element_register (plugin, "dtlssrtpdec", GST_RANK_NONE, ret |= GST_ELEMENT_REGISTER (dtlssrtpdemux, plugin);
GST_TYPE_DTLS_SRTP_DEC)
&& gst_element_register (plugin, "dtlssrtpenc", GST_RANK_NONE, return ret;
GST_TYPE_DTLS_SRTP_ENC)
&& gst_element_register (plugin, "dtlssrtpdemux", GST_RANK_NONE,
GST_TYPE_DTLS_SRTP_DEMUX);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,