diff --git a/ext/aom/gstaom.c b/ext/aom/gstaom.c index 5066105756..5a63ae732b 100644 --- a/ext/aom/gstaom.c +++ b/ext/aom/gstaom.c @@ -29,18 +29,12 @@ static gboolean plugin_init (GstPlugin * plugin) { + gboolean ret = FALSE; - if (!gst_element_register (plugin, "av1enc", GST_RANK_PRIMARY, - GST_TYPE_AV1_ENC)) { - return FALSE; - } + ret |= GST_ELEMENT_REGISTER (av1enc, plugin); + ret |= GST_ELEMENT_REGISTER (av1dec, plugin); - if (!gst_element_register (plugin, "av1dec", GST_RANK_PRIMARY, - GST_TYPE_AV1_DEC)) { - return FALSE; - } - - return TRUE; + return ret; } GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, diff --git a/ext/aom/gstav1dec.c b/ext/aom/gstav1dec.c index dcc4955392..40d6e4e87c 100644 --- a/ext/aom/gstav1dec.c +++ b/ext/aom/gstav1dec.c @@ -94,6 +94,8 @@ static gboolean gst_av1_dec_get_valid_format (GstAV1Dec * dec, #define gst_av1_dec_parent_class parent_class G_DEFINE_TYPE (GstAV1Dec, gst_av1_dec, GST_TYPE_VIDEO_DECODER); +GST_ELEMENT_REGISTER_DEFINE (av1dec, "av1dec", GST_RANK_PRIMARY, + GST_TYPE_AV1_DEC); static void gst_av1_dec_class_init (GstAV1DecClass * klass) diff --git a/ext/aom/gstav1dec.h b/ext/aom/gstav1dec.h index 1d91d17da9..921df27cb8 100644 --- a/ext/aom/gstav1dec.h +++ b/ext/aom/gstav1dec.h @@ -68,5 +68,7 @@ struct _GstAV1DecClass GType gst_av1_dec_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (av1dec); + G_END_DECLS #endif /* __GST_AV1_DEC_H__ */ diff --git a/ext/aom/gstav1enc.c b/ext/aom/gstav1enc.c index 049460bf81..3bae5f87dd 100644 --- a/ext/aom/gstav1enc.c +++ b/ext/aom/gstav1enc.c @@ -198,6 +198,8 @@ static void gst_av1_enc_destroy_encoder (GstAV1Enc * av1enc); #define gst_av1_enc_parent_class parent_class G_DEFINE_TYPE (GstAV1Enc, gst_av1_enc, GST_TYPE_VIDEO_ENCODER); +GST_ELEMENT_REGISTER_DEFINE (av1enc, "av1enc", GST_RANK_PRIMARY, + GST_TYPE_AV1_ENC); /* *INDENT-OFF* */ static GstStaticPadTemplate gst_av1_enc_sink_pad_template = diff --git a/ext/aom/gstav1enc.h b/ext/aom/gstav1enc.h index c546ebaa8f..0a991beaf4 100644 --- a/ext/aom/gstav1enc.h +++ b/ext/aom/gstav1enc.h @@ -135,5 +135,7 @@ struct _GstAV1EncClass GType gst_av1_enc_get_type (void); +GST_ELEMENT_REGISTER_DECLARE (av1enc); + G_END_DECLS #endif /* __GST_AV1_ENC_H__ */