summaryrefslogtreecommitdiff
path: root/gst/rtp
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-02-25 15:22:15 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-04-11 16:16:55 +0000
commit891be511057dbcdf1f38740e55cbd376c4b25894 (patch)
treeb077e8cd0b584ebe2a10950ef2398ab3f60b48b4 /gst/rtp
parent7f60138ef68e2a1fef8ccd4ff3710dfccd243314 (diff)
downloadgstreamer-plugins-bad-891be511057dbcdf1f38740e55cbd376c4b25894.tar.gz
gst-plugins: 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/2110>
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/gstrtpsink.c2
-rw-r--r--gst/rtp/gstrtpsink.h1
-rw-r--r--gst/rtp/gstrtpsrc.c2
-rw-r--r--gst/rtp/gstrtpsrc.h1
-rw-r--r--gst/rtp/plugin.c8
5 files changed, 8 insertions, 6 deletions
diff --git a/gst/rtp/gstrtpsink.c b/gst/rtp/gstrtpsink.c
index 364b6884c..c94c6dadf 100644
--- a/gst/rtp/gstrtpsink.c
+++ b/gst/rtp/gstrtpsink.c
@@ -81,6 +81,8 @@ static void gst_rtp_sink_uri_handler_init (gpointer g_iface,
G_DEFINE_TYPE_WITH_CODE (GstRtpSink, gst_rtp_sink, GST_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtp_sink_uri_handler_init);
GST_DEBUG_CATEGORY_INIT (gst_rtp_sink_debug, "rtpsink", 0, "RTP Sink"));
+GST_ELEMENT_REGISTER_DEFINE (rtpsink, "rtpsink", GST_RANK_PRIMARY + 1,
+ GST_TYPE_RTP_SINK);
#define GST_RTP_SINK_GET_LOCK(obj) (&((GstRtpSink*)(obj))->lock)
#define GST_RTP_SINK_LOCK(obj) (g_mutex_lock (GST_RTP_SINK_GET_LOCK(obj)))
diff --git a/gst/rtp/gstrtpsink.h b/gst/rtp/gstrtpsink.h
index 1af5e0b97..bc1f6dc65 100644
--- a/gst/rtp/gstrtpsink.h
+++ b/gst/rtp/gstrtpsink.h
@@ -66,6 +66,7 @@ struct _GstRtpSinkClass
};
GType gst_rtp_sink_get_type (void);
+GST_ELEMENT_REGISTER_DECLARE (rtpsink);
G_END_DECLS
#endif /* __GST_RTP_SINK_H__ */
diff --git a/gst/rtp/gstrtpsrc.c b/gst/rtp/gstrtpsrc.c
index 6dda142b0..8ff6f2172 100644
--- a/gst/rtp/gstrtpsrc.c
+++ b/gst/rtp/gstrtpsrc.c
@@ -91,6 +91,8 @@ static void gst_rtp_src_uri_handler_init (gpointer g_iface,
G_DEFINE_TYPE_WITH_CODE (GstRtpSrc, gst_rtp_src, GST_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_rtp_src_uri_handler_init);
GST_DEBUG_CATEGORY_INIT (gst_rtp_src_debug, "rtpsrc", 0, "RTP Source"));
+GST_ELEMENT_REGISTER_DEFINE (rtpsrc, "rtpsrc", GST_RANK_PRIMARY + 1,
+ GST_TYPE_RTP_SRC);
#define GST_RTP_SRC_GET_LOCK(obj) (&((GstRtpSrc*)(obj))->lock)
#define GST_RTP_SRC_LOCK(obj) (g_mutex_lock (GST_RTP_SRC_GET_LOCK(obj)))
diff --git a/gst/rtp/gstrtpsrc.h b/gst/rtp/gstrtpsrc.h
index ad773d9f4..616fdb1f8 100644
--- a/gst/rtp/gstrtpsrc.h
+++ b/gst/rtp/gstrtpsrc.h
@@ -72,6 +72,7 @@ struct _GstRtpSrcClass
};
GType gst_rtp_src_get_type (void);
+GST_ELEMENT_REGISTER_DECLARE (rtpsrc);
G_END_DECLS
#endif /* __GST_RTP_SRC_H__ */
diff --git a/gst/rtp/plugin.c b/gst/rtp/plugin.c
index 8c1d71f8b..5b8d46798 100644
--- a/gst/rtp/plugin.c
+++ b/gst/rtp/plugin.c
@@ -9,14 +9,10 @@
static gboolean
plugin_init (GstPlugin * plugin)
{
-
gboolean ret = FALSE;
- ret |= gst_element_register (plugin, "rtpsrc",
- GST_RANK_PRIMARY + 1, GST_TYPE_RTP_SRC);
-
- ret |= gst_element_register (plugin, "rtpsink",
- GST_RANK_PRIMARY + 1, GST_TYPE_RTP_SINK);
+ ret |= GST_ELEMENT_REGISTER (rtpsrc, plugin);
+ ret |= GST_ELEMENT_REGISTER (rtpsink, plugin);
return ret;
}