summaryrefslogtreecommitdiff
path: root/ext/ofa/gstofa.c
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-02-18 10:41:53 +0100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-03-23 14:19:17 +0000
commit3f1c8d930734f91b4c7786f746dce58f967f0ad3 (patch)
tree271f7979e299583fb94dc6c9910f546ffd64cecd /ext/ofa/gstofa.c
parentc2b1368b03fdbd7d01842e6545cd2adab3d6a853 (diff)
downloadgstreamer-plugins-bad-3f1c8d930734f91b4c7786f746dce58f967f0ad3.tar.gz
ofa: 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/ofa/gstofa.c')
-rw-r--r--ext/ofa/gstofa.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/ext/ofa/gstofa.c b/ext/ofa/gstofa.c
index 70d7ae685..77ad32e6b 100644
--- a/ext/ofa/gstofa.c
+++ b/ext/ofa/gstofa.c
@@ -42,8 +42,7 @@ enum
PROP_FINGERPRINT,
};
-#define parent_class gst_ofa_parent_class
-G_DEFINE_TYPE (GstOFA, gst_ofa, GST_TYPE_AUDIO_FILTER);
+
static void gst_ofa_finalize (GObject * object);
static void gst_ofa_get_property (GObject * object, guint prop_id,
@@ -51,6 +50,11 @@ static void gst_ofa_get_property (GObject * object, guint prop_id,
static GstFlowReturn gst_ofa_transform_ip (GstBaseTransform * trans,
GstBuffer * buf);
static gboolean gst_ofa_sink_event (GstBaseTransform * trans, GstEvent * event);
+static gboolean ofa_element_init (GstPlugin * plugin);
+
+#define parent_class gst_ofa_parent_class
+G_DEFINE_TYPE (GstOFA, gst_ofa, GST_TYPE_AUDIO_FILTER);
+GST_ELEMENT_REGISTER_DEFINE_CUSTOM (ofa, ofa_element_init);
static void
gst_ofa_finalize (GObject * object)
@@ -249,7 +253,7 @@ gst_ofa_get_property (GObject * object, guint prop_id, GValue * value,
static gboolean
-plugin_init (GstPlugin * plugin)
+ofa_element_init (GstPlugin * plugin)
{
gboolean ret;
int major, minor, rev;
@@ -271,6 +275,12 @@ plugin_init (GstPlugin * plugin)
return ret;
}
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ return GST_ELEMENT_REGISTER (ofa, plugin);
+}
+
/* FIXME: someone write a libofa replacement with an LGPL or BSD license */
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,