summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@collabora.com>2021-03-29 12:39:36 +0200
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2021-03-29 19:13:36 +0000
commit62d914b5b441c8091bc2e78baeda3a1929ab5ae6 (patch)
tree80169f4018e0090306fb799dd41ac4c31c9c1605
parente3a35c127fdb6187da00cf9c0cbf55c1cbde0af6 (diff)
x264: 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-ugly/-/merge_requests/79>
-rw-r--r--ext/x264/gstx264enc.c14
-rw-r--r--ext/x264/gstx264enc.h1
2 files changed, 11 insertions, 4 deletions
diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c
index 5e36e093..07dff722 100644
--- a/ext/x264/gstx264enc.c
+++ b/ext/x264/gstx264enc.c
@@ -724,6 +724,7 @@ static void gst_x264_enc_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_x264_enc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
+static gboolean x264_element_init (GstPlugin * plugin);
typedef gboolean (*LoadPresetFunc) (GstPreset * preset, const gchar * name);
@@ -755,10 +756,9 @@ gst_x264_enc_preset_interface_init (GstPresetInterface * iface)
G_DEFINE_TYPE_WITH_CODE (GstX264Enc, gst_x264_enc, GST_TYPE_VIDEO_ENCODER,
G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET,
gst_x264_enc_preset_interface_init));
-
+GST_ELEMENT_REGISTER_DEFINE_CUSTOM (x264enc, x264_element_init)
/* don't forget to free the string after use */
-static const gchar *
-gst_x264_enc_build_partitions (gint analyse)
+ static const gchar *gst_x264_enc_build_partitions (gint analyse)
{
GString *string;
@@ -2988,7 +2988,7 @@ gst_x264_enc_get_property (GObject * object, guint prop_id,
}
static gboolean
-plugin_init (GstPlugin * plugin)
+x264_element_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (x264_enc_debug, "x264enc", 0,
"h264 encoding element");
@@ -3026,6 +3026,12 @@ plugin_init (GstPlugin * plugin)
GST_RANK_PRIMARY, GST_TYPE_X264_ENC);
}
+static gboolean
+plugin_init (GstPlugin * plugin)
+{
+ return GST_ELEMENT_REGISTER (x264enc, plugin);
+}
+
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
x264,
diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h
index e1a091fc..6cbfc5c3 100644
--- a/ext/x264/gstx264enc.h
+++ b/ext/x264/gstx264enc.h
@@ -137,6 +137,7 @@ struct _GstX264EncClass
};
GType gst_x264_enc_get_type (void);
+GST_ELEMENT_REGISTER_DECLARE (x264enc);
G_END_DECLS