interleave: 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-good/-/merge_requests/876>
This commit is contained in:
Stéphane Cerveau 2021-02-16 09:57:27 +01:00
parent 26d37fb491
commit 713453d145
4 changed files with 19 additions and 10 deletions

View file

@ -64,6 +64,7 @@
#include <gst/gst.h>
#include <string.h>
#include "gstinterleaveelements.h"
#include "deinterleave.h"
GST_DEBUG_CATEGORY_STATIC (gst_deinterleave_debug);
@ -116,6 +117,8 @@ deinterleave_24 (guint8 * out, guint8 * in, guint stride, guint nframes)
#define gst_deinterleave_parent_class parent_class
G_DEFINE_TYPE (GstDeinterleave, gst_deinterleave, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE (deinterleave, "deinterleave",
GST_RANK_NONE, gst_deinterleave_get_type ());
enum
{

View file

@ -20,12 +20,15 @@
*/
#ifndef __GST_PLUGIN_INTERLEAVE_H__
#define __GST_PLUGIN_INTERLEAVE_H__
#ifndef __GST_INTERLEAVE_ELEMENTS_H__
#define __GST_INTERLEAVE_ELEMENTS_H__
#include <gst/gst.h>
#include "interleave.h"
#include "deinterleave.h"
#endif /* __GST_PLUGIN_INTERLEAVE_H__ */
GST_ELEMENT_REGISTER_DECLARE (interleave);
GST_ELEMENT_REGISTER_DECLARE (deinterleave);
#endif /* __GST_INTERLEAVE_ELEMENTS_H__ */

View file

@ -70,6 +70,7 @@
#include <gst/gst.h>
#include <string.h>
#include "gstinterleaveelements.h"
#include "interleave.h"
#include <gst/audio/audio.h>
@ -192,6 +193,8 @@ gst_interleave_pad_class_init (GstPadClass * klass)
#define gst_interleave_parent_class parent_class
G_DEFINE_TYPE (GstInterleave, gst_interleave, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE (interleave, "interleave",
GST_RANK_NONE, gst_interleave_get_type ());
enum
{

View file

@ -23,17 +23,17 @@
#include "config.h"
#endif
#include "plugin.h"
#include "gstinterleaveelements.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "interleave",
GST_RANK_NONE, gst_interleave_get_type ()) ||
!gst_element_register (plugin, "deinterleave",
GST_RANK_NONE, gst_deinterleave_get_type ()))
return FALSE;
return TRUE;
gboolean ret = FALSE;
ret |= GST_ELEMENT_REGISTER (interleave, plugin);
ret |= GST_ELEMENT_REGISTER (deinterleave, plugin);
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,