summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-02-18 10:17:20 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-03-23 14:19:17 +0000
commitd5e5ced7b71835fc23c8ccc413cb2b70da419acf (patch)
treea0dff3bcd0c081746053706a6c8aafcc7d297f42 /ext
parentbae7151c4d99c40d13657c4275340aac26451cd8 (diff)
downloadgstreamer-plugins-bad-d5e5ced7b71835fc23c8ccc413cb2b70da419acf.tar.gz
mplex: allow per feature registration
Split plugin into features including dynamic types which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038>
Diffstat (limited to 'ext')
-rw-r--r--ext/mplex/gstmplex.cc10
-rw-r--r--ext/mplex/gstmplex.hh2
2 files changed, 11 insertions, 1 deletions
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index 5df12d6d0..94b06dead 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -115,9 +115,11 @@ static void gst_mplex_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static void gst_mplex_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
+static gboolean mplex_element_init (GstPlugin * plugin);
#define parent_class gst_mplex_parent_class
G_DEFINE_TYPE (GstMplex, gst_mplex, GST_TYPE_ELEMENT);
+GST_ELEMENT_REGISTER_DEFINE_CUSTOM (mplex, mplex_element_init);
static void
gst_mplex_class_init (GstMplexClass * klass)
@@ -802,7 +804,7 @@ gst_mplex_log_callback (log_level_t level, const char *message)
#endif
static gboolean
-plugin_init (GstPlugin * plugin)
+mplex_element_init (GstPlugin * plugin)
{
#ifndef GST_DISABLE_GST_DEBUG
old_handler = mjpeg_log_set_handler (gst_mplex_log_callback);
@@ -814,6 +816,12 @@ plugin_init (GstPlugin * plugin)
return gst_element_register (plugin, "mplex", GST_RANK_NONE, GST_TYPE_MPLEX);
}
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ return GST_ELEMENT_REGISTER (mplex, plugin);
+}
+
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
mplex,
diff --git a/ext/mplex/gstmplex.hh b/ext/mplex/gstmplex.hh
index 68a425776..6c8466413 100644
--- a/ext/mplex/gstmplex.hh
+++ b/ext/mplex/gstmplex.hh
@@ -117,6 +117,8 @@ typedef struct _GstMplexClass {
GType gst_mplex_get_type (void);
+GST_ELEMENT_REGISTER_DECLARE (mplex);
+
G_END_DECLS
#endif /* __GST_MPLEX_H__ */