diff options
author | Stéphane Cerveau <scerveau@collabora.com> | 2021-02-25 15:22:15 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-04-11 16:16:55 +0000 |
commit | 891be511057dbcdf1f38740e55cbd376c4b25894 (patch) | |
tree | b077e8cd0b584ebe2a10950ef2398ab3f60b48b4 /gst/segmentclip | |
parent | 7f60138ef68e2a1fef8ccd4ff3710dfccd243314 (diff) | |
download | gstreamer-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/segmentclip')
-rw-r--r-- | gst/segmentclip/gstaudiosegmentclip.c | 2 | ||||
-rw-r--r-- | gst/segmentclip/gstaudiosegmentclip.h | 1 | ||||
-rw-r--r-- | gst/segmentclip/gstvideosegmentclip.c | 2 | ||||
-rw-r--r-- | gst/segmentclip/gstvideosegmentclip.h | 1 | ||||
-rw-r--r-- | gst/segmentclip/plugin.c | 11 |
5 files changed, 11 insertions, 6 deletions
diff --git a/gst/segmentclip/gstaudiosegmentclip.c b/gst/segmentclip/gstaudiosegmentclip.c index 434424a45..4c4ca72cb 100644 --- a/gst/segmentclip/gstaudiosegmentclip.c +++ b/gst/segmentclip/gstaudiosegmentclip.c @@ -45,6 +45,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_audio_segment_clip_debug); G_DEFINE_TYPE (GstAudioSegmentClip, gst_audio_segment_clip, GST_TYPE_SEGMENT_CLIP); +GST_ELEMENT_REGISTER_DEFINE (audiosegmentclip, "audiosegmentclip", + GST_RANK_NONE, GST_TYPE_AUDIO_SEGMENT_CLIP); static void gst_audio_segment_clip_class_init (GstAudioSegmentClipClass * klass) diff --git a/gst/segmentclip/gstaudiosegmentclip.h b/gst/segmentclip/gstaudiosegmentclip.h index 234172e0c..ccaa9d7b3 100644 --- a/gst/segmentclip/gstaudiosegmentclip.h +++ b/gst/segmentclip/gstaudiosegmentclip.h @@ -55,6 +55,7 @@ struct _GstAudioSegmentClipClass }; GType gst_audio_segment_clip_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (audiosegmentclip); G_END_DECLS diff --git a/gst/segmentclip/gstvideosegmentclip.c b/gst/segmentclip/gstvideosegmentclip.c index 34ba58b59..70576340a 100644 --- a/gst/segmentclip/gstvideosegmentclip.c +++ b/gst/segmentclip/gstvideosegmentclip.c @@ -45,6 +45,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_video_segment_clip_debug); G_DEFINE_TYPE (GstVideoSegmentClip, gst_video_segment_clip, GST_TYPE_SEGMENT_CLIP); +GST_ELEMENT_REGISTER_DEFINE (videosegmentclip, "videosegmentclip", + GST_RANK_NONE, GST_TYPE_VIDEO_SEGMENT_CLIP); static void gst_video_segment_clip_class_init (GstVideoSegmentClipClass * klass) diff --git a/gst/segmentclip/gstvideosegmentclip.h b/gst/segmentclip/gstvideosegmentclip.h index f49f2a442..6f321f114 100644 --- a/gst/segmentclip/gstvideosegmentclip.h +++ b/gst/segmentclip/gstvideosegmentclip.h @@ -54,6 +54,7 @@ struct _GstVideoSegmentClipClass }; GType gst_video_segment_clip_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (videosegmentclip); G_END_DECLS diff --git a/gst/segmentclip/plugin.c b/gst/segmentclip/plugin.c index 9f4cbb9c0..358ec5581 100644 --- a/gst/segmentclip/plugin.c +++ b/gst/segmentclip/plugin.c @@ -27,13 +27,12 @@ static gboolean plugin_init (GstPlugin * plugin) { - if (!gst_element_register (plugin, "audiosegmentclip", GST_RANK_NONE, - GST_TYPE_AUDIO_SEGMENT_CLIP) || - !gst_element_register (plugin, "videosegmentclip", GST_RANK_NONE, - GST_TYPE_VIDEO_SEGMENT_CLIP)) - return FALSE; + gboolean ret = FALSE; - return TRUE; + ret |= GST_ELEMENT_REGISTER (audiosegmentclip, plugin); + ret |= GST_ELEMENT_REGISTER (videosegmentclip, plugin); + + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, |