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>
This commit is contained in:
Stéphane Cerveau 2021-02-25 15:22:15 +01:00 committed by GStreamer Marge Bot
parent 7f60138ef6
commit 891be51105
322 changed files with 1582 additions and 1198 deletions

View file

@ -72,8 +72,6 @@ enum
PROP_LAST_TRACK PROP_LAST_TRACK
}; };
#define parent_class gst_accurip_parent_class
G_DEFINE_TYPE (GstAccurip, gst_accurip, GST_TYPE_AUDIO_FILTER);
@ -86,6 +84,11 @@ static GstFlowReturn gst_accurip_transform_ip (GstBaseTransform * trans,
GstBuffer * buf); GstBuffer * buf);
static gboolean gst_accurip_sink_event (GstBaseTransform * trans, static gboolean gst_accurip_sink_event (GstBaseTransform * trans,
GstEvent * event); GstEvent * event);
static gboolean accurip_element_init (GstPlugin * plugin);
#define parent_class gst_accurip_parent_class
G_DEFINE_TYPE (GstAccurip, gst_accurip, GST_TYPE_AUDIO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (accurip, accurip_element_init);
static void static void
gst_accurip_class_init (GstAccuripClass * klass) gst_accurip_class_init (GstAccuripClass * klass)
@ -342,7 +345,7 @@ gst_accurip_get_property (GObject * object, guint prop_id,
} }
static gboolean static gboolean
plugin_init (GstPlugin * plugin) accurip_element_init (GstPlugin * plugin)
{ {
gboolean ret; gboolean ret;
@ -362,6 +365,12 @@ plugin_init (GstPlugin * plugin)
return ret; return ret;
} }
static gboolean
plugin_init (GstPlugin * plugin)
{
return GST_ELEMENT_REGISTER (accurip, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
accurip, accurip,

View file

@ -80,6 +80,8 @@ struct _GstAccuripClass
GType gst_accurip_get_type (void); GType gst_accurip_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (accurip);
G_END_DECLS G_END_DECLS
#endif /* __GST_ACCURIP_H__ */ #endif /* __GST_ACCURIP_H__ */

View file

@ -81,7 +81,12 @@ typedef struct _ADPCMDec
} ADPCMDec; } ADPCMDec;
GType adpcmdec_get_type (void); GType adpcmdec_get_type (void);
G_DEFINE_TYPE (ADPCMDec, adpcmdec, GST_TYPE_AUDIO_DECODER); GST_ELEMENT_REGISTER_DECLARE (adpcmdec);
G_DEFINE_TYPE_WITH_CODE (ADPCMDec, adpcmdec, GST_TYPE_AUDIO_DECODER,
GST_DEBUG_CATEGORY_INIT (adpcmdec_debug, "adpcmdec", 0, "ADPCM Decoders");
);
GST_ELEMENT_REGISTER_DEFINE (adpcmdec, "adpcmdec", GST_RANK_PRIMARY,
GST_TYPE_ADPCM_DEC);
static gboolean static gboolean
adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps) adpcmdec_set_format (GstAudioDecoder * bdec, GstCaps * in_caps)
@ -485,12 +490,7 @@ adpcmdec_class_init (ADPCMDecClass * klass)
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (adpcmdec_debug, "adpcmdec", 0, "ADPCM Decoders"); return GST_ELEMENT_REGISTER (adpcmdec, plugin);
if (!gst_element_register (plugin, "adpcmdec", GST_RANK_PRIMARY,
GST_TYPE_ADPCM_DEC)) {
return FALSE;
}
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, adpcmdec, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, adpcmdec,

View file

@ -132,7 +132,12 @@ typedef struct _ADPCMEnc
} ADPCMEnc; } ADPCMEnc;
GType adpcmenc_get_type (void); GType adpcmenc_get_type (void);
G_DEFINE_TYPE (ADPCMEnc, adpcmenc, GST_TYPE_AUDIO_ENCODER); GST_ELEMENT_REGISTER_DECLARE (adpcmenc);
G_DEFINE_TYPE_WITH_CODE (ADPCMEnc, adpcmenc, GST_TYPE_AUDIO_ENCODER,
GST_DEBUG_CATEGORY_INIT (adpcmenc_debug, "adpcmenc", 0, "ADPCM Encoders");
);
GST_ELEMENT_REGISTER_DEFINE (adpcmenc, "adpcmenc", GST_RANK_PRIMARY,
GST_TYPE_ADPCM_ENC);
static gboolean static gboolean
adpcmenc_setup (ADPCMEnc * enc) adpcmenc_setup (ADPCMEnc * enc)
@ -470,12 +475,7 @@ adpcmenc_class_init (ADPCMEncClass * klass)
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (adpcmenc_debug, "adpcmenc", 0, "ADPCM Encoders"); return GST_ELEMENT_REGISTER (adpcmenc, plugin);
if (!gst_element_register (plugin, "adpcmenc", GST_RANK_PRIMARY,
GST_TYPE_ADPCM_ENC)) {
return FALSE;
}
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, adpcmenc, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, adpcmenc,

View file

@ -22,41 +22,16 @@
#include "config.h" #include "config.h"
#endif #endif
#include <gst/tag/tag.h> #include "aiffelements.h"
#include <gst/gst-i18n-plugin.h>
#include "aiffparse.h"
#include "aiffmux.h"
GST_DEBUG_CATEGORY_STATIC (aiff_debug);
#define GST_CAT_DEFAULT (aiff_debug)
GST_DEBUG_CATEGORY_EXTERN (aiffparse_debug);
GST_DEBUG_CATEGORY_EXTERN (aiffmux_debug);
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gboolean ret; gboolean ret = FALSE;
GST_DEBUG_CATEGORY_INIT (aiff_debug, "aiff", 0, "AIFF plugin"); ret |= GST_ELEMENT_REGISTER (aiffparse, plugin);
GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser"); ret |= GST_ELEMENT_REGISTER (aiffmux, plugin);
GST_DEBUG_CATEGORY_INIT (aiffmux_debug, "aiffmux", 0, "AIFF muxer");
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
ret = gst_element_register (plugin, "aiffparse", GST_RANK_PRIMARY,
GST_TYPE_AIFF_PARSE);
ret &= gst_element_register (plugin, "aiffmux", GST_RANK_PRIMARY,
GST_TYPE_AIFF_MUX);
gst_tag_register_musicbrainz_tags ();
return ret; return ret;
} }

35
gst/aiff/aiffelements.h Normal file
View file

@ -0,0 +1,35 @@
/* GStreamer
* Copyright (C) <2020> The GStreamer Contributors.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_AIFF_ELEMENTS_H__
#define __GST_AIFF_ELEMENTS_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gst/gst.h>
G_GNUC_INTERNAL void aiff_element_init (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (aiffmux);
GST_ELEMENT_REGISTER_DECLARE (aiffparse);
#endif /* __GST_AIFF_ELEMENTS_H__ */

View file

@ -57,6 +57,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbytewriter.h> #include <gst/base/gstbytewriter.h>
#include "aiffelements.h"
#include "aiffmux.h" #include "aiffmux.h"
GST_DEBUG_CATEGORY (aiffmux_debug); GST_DEBUG_CATEGORY (aiffmux_debug);
@ -77,7 +78,10 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
); );
#define gst_aiff_mux_parent_class parent_class #define gst_aiff_mux_parent_class parent_class
G_DEFINE_TYPE (GstAiffMux, gst_aiff_mux, GST_TYPE_ELEMENT); G_DEFINE_TYPE_WITH_CODE (GstAiffMux, gst_aiff_mux, GST_TYPE_ELEMENT,
GST_DEBUG_CATEGORY_INIT (aiffmux_debug, "aiffmux", 0, "AIFF muxer"));
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (aiffmux, "aiffmux", GST_RANK_PRIMARY,
GST_TYPE_AIFF_MUX, aiff_element_init (plugin));
static GstStateChangeReturn static GstStateChangeReturn
gst_aiff_mux_change_state (GstElement * element, GstStateChange transition) gst_aiff_mux_change_state (GstElement * element, GstStateChange transition)

View file

@ -52,6 +52,7 @@
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
#include "aiffelements.h"
#include "aiffparse.h" #include "aiffparse.h"
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include <gst/tag/tag.h> #include <gst/tag/tag.h>
@ -104,7 +105,10 @@ GST_STATIC_PAD_TEMPLATE ("src",
#define MAX_BUFFER_SIZE 4096 #define MAX_BUFFER_SIZE 4096
#define gst_aiff_parse_parent_class parent_class #define gst_aiff_parse_parent_class parent_class
G_DEFINE_TYPE (GstAiffParse, gst_aiff_parse, GST_TYPE_ELEMENT); G_DEFINE_TYPE_WITH_CODE (GstAiffParse, gst_aiff_parse, GST_TYPE_ELEMENT,
GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser"));
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (aiffparse, "aiffparse", GST_RANK_PRIMARY,
GST_TYPE_AIFF_PARSE, aiff_element_init (plugin));
static void static void
gst_aiff_parse_class_init (GstAiffParseClass * klass) gst_aiff_parse_class_init (GstAiffParseClass * klass)

50
gst/aiff/gstaiffelement.c Normal file
View file

@ -0,0 +1,50 @@
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/* GStreamer AIFF plugin initialisation
* Copyright (C) <2008> Pioneers of the Inevitable <songbird@songbirdnest.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <gst/tag/tag.h>
#include <gst/gst-i18n-plugin.h>
#include "aiffelements.h"
GST_DEBUG_CATEGORY_STATIC (aiff_debug);
#define GST_CAT_DEFAULT (aiff_debug)
void
aiff_element_init (GstPlugin * plugin)
{
static gsize res = FALSE;
if (g_once_init_enter (&res)) {
GST_DEBUG_CATEGORY_INIT (aiff_debug, "aiff", 0, "AIFF plugin");
#ifdef ENABLE_NLS
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
LOCALEDIR);
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
gst_tag_register_musicbrainz_tags ();
g_once_init_leave (&res, TRUE);
}
}

View file

@ -1,5 +1,5 @@
aiff_sources = [ aiff_sources = [
'aiff.c', 'aiffmux.c', 'aiffparse.c', 'aiff.c', 'aiffmux.c', 'aiffparse.c', 'gstaiffelement.c'
] ]
gstaiff = library('gstaiff', gstaiff = library('gstaiff',

View file

@ -32,16 +32,13 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
if (!gst_asf_mux_plugin_init (plugin)) { gboolean ret = FALSE;
return FALSE;
} ret |= GST_ELEMENT_REGISTER (asfmux, plugin);
if (!gst_rtp_asf_pay_plugin_init (plugin)) { ret |= GST_ELEMENT_REGISTER (rtpasfpay, plugin);
return FALSE; ret |= GST_ELEMENT_REGISTER (asfparse, plugin);
}
if (!gst_asf_parse_plugin_init (plugin)) { return ret;
return FALSE;
}
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -173,6 +173,8 @@ static GstElementClass *parent_class = NULL;
G_DEFINE_TYPE_WITH_CODE (GstAsfMux, gst_asf_mux, GST_TYPE_ELEMENT, G_DEFINE_TYPE_WITH_CODE (GstAsfMux, gst_asf_mux, GST_TYPE_ELEMENT,
G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL)); G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL));
GST_ELEMENT_REGISTER_DEFINE (asfmux, "asfmux",
GST_RANK_PRIMARY, GST_TYPE_ASF_MUX);
static void static void
gst_asf_mux_reset (GstAsfMux * asfmux) gst_asf_mux_reset (GstAsfMux * asfmux)
@ -2455,10 +2457,3 @@ gst_asf_mux_change_state (GstElement * element, GstStateChange transition)
done: done:
return ret; return ret;
} }
gboolean
gst_asf_mux_plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "asfmux",
GST_RANK_PRIMARY, GST_TYPE_ASF_MUX);
}

View file

@ -152,7 +152,7 @@ struct _GstAsfMuxClass
}; };
GType gst_asf_mux_get_type (void); GType gst_asf_mux_get_type (void);
gboolean gst_asf_mux_plugin_init (GstPlugin * plugin); GST_ELEMENT_REGISTER_DECLARE (asfmux);
G_END_DECLS G_END_DECLS
#endif /* __GST_ASF_MUX_H__ */ #endif /* __GST_ASF_MUX_H__ */

View file

@ -44,6 +44,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
#define gst_asf_parse_parent_class parent_class #define gst_asf_parse_parent_class parent_class
G_DEFINE_TYPE (GstAsfParse, gst_asf_parse, GST_TYPE_BASE_PARSE); G_DEFINE_TYPE (GstAsfParse, gst_asf_parse, GST_TYPE_BASE_PARSE);
GST_ELEMENT_REGISTER_DEFINE (asfparse, "asfparse",
GST_RANK_NONE, GST_TYPE_ASF_PARSE);
static gboolean static gboolean
gst_asf_parse_start (GstBaseParse * parse) gst_asf_parse_start (GstBaseParse * parse)
@ -416,10 +418,3 @@ gst_asf_parse_init (GstAsfParse * asfparse)
asfparse->asfinfo = gst_asf_file_info_new (); asfparse->asfinfo = gst_asf_file_info_new ();
asfparse->packetinfo = g_new0 (GstAsfPacketInfo, 1); asfparse->packetinfo = g_new0 (GstAsfPacketInfo, 1);
} }
gboolean
gst_asf_parse_plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "asfparse",
GST_RANK_NONE, GST_TYPE_ASF_PARSE);
}

View file

@ -71,7 +71,7 @@ struct _GstAsfParseClass {
}; };
GType gst_asf_parse_get_type(void); GType gst_asf_parse_get_type(void);
gboolean gst_asf_parse_plugin_init (GstPlugin * plugin); GST_ELEMENT_REGISTER_DECLARE (asfparse);
G_END_DECLS G_END_DECLS

View file

@ -57,6 +57,8 @@ gst_rtp_asf_pay_set_caps (GstRTPBasePayload * rtppay, GstCaps * caps);
#define gst_rtp_asf_pay_parent_class parent_class #define gst_rtp_asf_pay_parent_class parent_class
G_DEFINE_TYPE (GstRtpAsfPay, gst_rtp_asf_pay, GST_TYPE_RTP_BASE_PAYLOAD); G_DEFINE_TYPE (GstRtpAsfPay, gst_rtp_asf_pay, GST_TYPE_RTP_BASE_PAYLOAD);
GST_ELEMENT_REGISTER_DEFINE (rtpasfpay, "rtpasfpay",
GST_RANK_NONE, GST_TYPE_RTP_ASF_PAY);
static void static void
gst_rtp_asf_pay_init (GstRtpAsfPay * rtpasfpay) gst_rtp_asf_pay_init (GstRtpAsfPay * rtpasfpay)
@ -460,10 +462,3 @@ gst_rtp_asf_pay_handle_buffer (GstRTPBasePayload * rtppay, GstBuffer * buffer)
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
return GST_FLOW_OK; return GST_FLOW_OK;
} }
gboolean
gst_rtp_asf_pay_plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "rtpasfpay",
GST_RANK_NONE, GST_TYPE_RTP_ASF_PAY);
}

View file

@ -81,7 +81,8 @@ struct _GstRtpAsfPayClass
}; };
GType gst_rtp_asf_pay_get_type (void); GType gst_rtp_asf_pay_get_type (void);
gboolean gst_rtp_asf_pay_plugin_init (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (rtpasfpay);
G_END_DECLS G_END_DECLS
#endif /* __GST_RTP_ASF_PAY_H__ */ #endif /* __GST_RTP_ASF_PAY_H__ */

View file

@ -63,7 +63,11 @@ enum
#define DEFAULT_MAX_SILENCE_TIME (0) #define DEFAULT_MAX_SILENCE_TIME (0)
#define parent_class gst_audio_buffer_split_parent_class #define parent_class gst_audio_buffer_split_parent_class
G_DEFINE_TYPE (GstAudioBufferSplit, gst_audio_buffer_split, GST_TYPE_ELEMENT); G_DEFINE_TYPE_WITH_CODE (GstAudioBufferSplit, gst_audio_buffer_split,
GST_TYPE_ELEMENT, GST_DEBUG_CATEGORY_INIT (gst_audio_buffer_split_debug,
"audiobuffersplit", 0, "Audio buffer splitter"););
GST_ELEMENT_REGISTER_DEFINE (audiobuffersplit, "audiobuffersplit",
GST_RANK_NONE, GST_TYPE_AUDIO_BUFFER_SPLIT);
static GstFlowReturn gst_audio_buffer_split_sink_chain (GstPad * pad, static GstFlowReturn gst_audio_buffer_split_sink_chain (GstPad * pad,
GstObject * parent, GstBuffer * buffer); GstObject * parent, GstBuffer * buffer);
@ -923,13 +927,7 @@ gst_audio_buffer_split_src_query (GstPad * pad,
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_audio_buffer_split_debug, "audiobuffersplit", return GST_ELEMENT_REGISTER (audiobuffersplit, plugin);
0, "Audio buffer splitter");
gst_element_register (plugin, "audiobuffersplit", GST_RANK_NONE,
GST_TYPE_AUDIO_BUFFER_SPLIT);
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -74,6 +74,7 @@ struct _GstAudioBufferSplitClass {
}; };
GType gst_audio_buffer_split_get_type (void); GType gst_audio_buffer_split_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (audiobuffersplit);
G_END_DECLS G_END_DECLS

View file

@ -91,6 +91,8 @@ G_DEFINE_TYPE_WITH_CODE (GstAudioChannelMix, gst_audio_channel_mix,
GST_TYPE_AUDIO_FILTER, GST_TYPE_AUDIO_FILTER,
GST_DEBUG_CATEGORY_INIT (gst_audio_channel_mix_debug_category, GST_DEBUG_CATEGORY_INIT (gst_audio_channel_mix_debug_category,
"audiochannelmix", 0, "debug category for audiochannelmix element")); "audiochannelmix", 0, "debug category for audiochannelmix element"));
GST_ELEMENT_REGISTER_DEFINE (audiochannelmix, "audiochannelmix", GST_RANK_NONE,
GST_TYPE_AUDIO_CHANNEL_MIX);
static void static void
gst_audio_channel_mix_class_init (GstAudioChannelMixClass * klass) gst_audio_channel_mix_class_init (GstAudioChannelMixClass * klass)

View file

@ -50,6 +50,8 @@ struct _GstAudioChannelMixClass
GType gst_audio_channel_mix_get_type (void); GType gst_audio_channel_mix_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (audiochannelmix);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -26,8 +26,7 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
return gst_element_register (plugin, "audiochannelmix", GST_RANK_NONE, return GST_ELEMENT_REGISTER (audiochannelmix, plugin);
GST_TYPE_AUDIO_CHANNEL_MIX);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -79,7 +79,11 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
); );
#define gst_audiolatency_parent_class parent_class #define gst_audiolatency_parent_class parent_class
G_DEFINE_TYPE (GstAudioLatency, gst_audiolatency, GST_TYPE_BIN); G_DEFINE_TYPE_WITH_CODE (GstAudioLatency, gst_audiolatency, GST_TYPE_BIN,
GST_DEBUG_CATEGORY_INIT (gst_audiolatency_debug, "audiolatency", 0,
"audiolatency"););
GST_ELEMENT_REGISTER_DEFINE (audiolatency, "audiolatency", GST_RANK_PRIMARY,
GST_TYPE_AUDIOLATENCY);
#define DEFAULT_PRINT_LATENCY FALSE #define DEFAULT_PRINT_LATENCY FALSE
enum enum
@ -422,11 +426,7 @@ out:
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_audiolatency_debug, "audiolatency", 0, return GST_ELEMENT_REGISTER (audiolatency, plugin);
"audiolatency");
return gst_element_register (plugin, "audiolatency", GST_RANK_PRIMARY,
GST_TYPE_AUDIOLATENCY);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -65,5 +65,7 @@ struct _GstAudioLatencyClass
GType gst_audiolatency_get_type (void); GType gst_audiolatency_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (audiolatency);
G_END_DECLS G_END_DECLS
#endif /* __GST_AUDIOLATENCY_H__ */ #endif /* __GST_AUDIOLATENCY_H__ */

View file

@ -150,6 +150,8 @@ static GstStateChangeReturn gst_audio_mix_matrix_change_state (GstElement *
G_DEFINE_TYPE (GstAudioMixMatrix, gst_audio_mix_matrix, G_DEFINE_TYPE (GstAudioMixMatrix, gst_audio_mix_matrix,
GST_TYPE_BASE_TRANSFORM); GST_TYPE_BASE_TRANSFORM);
GST_ELEMENT_REGISTER_DEFINE (audiomixmatrix, "audiomixmatrix", GST_RANK_NONE,
GST_TYPE_AUDIO_MIX_MATRIX);
static void static void
gst_audio_mix_matrix_class_init (GstAudioMixMatrixClass * klass) gst_audio_mix_matrix_class_init (GstAudioMixMatrixClass * klass)
@ -743,8 +745,7 @@ beach:
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
return gst_element_register (plugin, "audiomixmatrix", GST_RANK_NONE, return GST_ELEMENT_REGISTER (audiomixmatrix, plugin);
GST_TYPE_AUDIO_MIX_MATRIX);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -72,6 +72,8 @@ struct _GstAudioMixMatrixClass
GType gst_audio_mix_matrix_get_type (void); GType gst_audio_mix_matrix_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (audiomixmatrix);
GType gst_audio_mix_matrix_mode_get_type (void); GType gst_audio_mix_matrix_mode_get_type (void);
G_END_DECLS G_END_DECLS

View file

@ -120,7 +120,11 @@ static gboolean gst_space_scope_render (GstAudioVisualizer * scope,
GstBuffer * audio, GstVideoFrame * video); GstBuffer * audio, GstVideoFrame * video);
G_DEFINE_TYPE (GstSpaceScope, gst_space_scope, GST_TYPE_AUDIO_VISUALIZER); G_DEFINE_TYPE_WITH_CODE (GstSpaceScope, gst_space_scope,
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (space_scope_debug,
"spacescope", 0, "spacescope"););
GST_ELEMENT_REGISTER_DEFINE (spacescope, "spacescope", GST_RANK_NONE,
GST_TYPE_SPACE_SCOPE);
static void static void
gst_space_scope_class_init (GstSpaceScopeClass * g_class) gst_space_scope_class_init (GstSpaceScopeClass * g_class)
@ -445,12 +449,3 @@ gst_space_scope_render (GstAudioVisualizer * base, GstBuffer * audio,
gst_buffer_unmap (audio, &amap); gst_buffer_unmap (audio, &amap);
return TRUE; return TRUE;
} }
gboolean
gst_space_scope_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (space_scope_debug, "spacescope", 0, "spacescope");
return gst_element_register (plugin, "spacescope", GST_RANK_NONE,
GST_TYPE_SPACE_SCOPE);
}

View file

@ -56,7 +56,8 @@ struct _GstSpaceScopeClass
}; };
GType gst_space_scope_get_type (void); GType gst_space_scope_get_type (void);
gboolean gst_space_scope_plugin_init (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (spacescope);
G_END_DECLS G_END_DECLS
#endif /* __GST_SPACE_SCOPE_H__ */ #endif /* __GST_SPACE_SCOPE_H__ */

View file

@ -75,7 +75,11 @@ static gboolean gst_spectra_scope_render (GstAudioVisualizer * scope,
GstBuffer * audio, GstVideoFrame * video); GstBuffer * audio, GstVideoFrame * video);
G_DEFINE_TYPE (GstSpectraScope, gst_spectra_scope, GST_TYPE_AUDIO_VISUALIZER); G_DEFINE_TYPE_WITH_CODE (GstSpectraScope, gst_spectra_scope,
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (spectra_scope_debug,
"spectrascope", 0, "spectrascope"););
GST_ELEMENT_REGISTER_DEFINE (spectrascope, "spectrascope", GST_RANK_NONE,
GST_TYPE_SPECTRA_SCOPE);
static void static void
gst_spectra_scope_class_init (GstSpectraScopeClass * g_class) gst_spectra_scope_class_init (GstSpectraScopeClass * g_class)
@ -228,13 +232,3 @@ gst_spectra_scope_render (GstAudioVisualizer * bscope, GstBuffer * audio,
gst_buffer_unmap (audio, &amap); gst_buffer_unmap (audio, &amap);
return TRUE; return TRUE;
} }
gboolean
gst_spectra_scope_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (spectra_scope_debug, "spectrascope", 0,
"spectrascope");
return gst_element_register (plugin, "spectrascope", GST_RANK_NONE,
GST_TYPE_SPECTRA_SCOPE);
}

View file

@ -48,7 +48,8 @@ struct _GstSpectraScopeClass
}; };
GType gst_spectra_scope_get_type (void); GType gst_spectra_scope_get_type (void);
gboolean gst_spectra_scope_plugin_init (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (spectrascope);
G_END_DECLS G_END_DECLS
#endif /* __GST_SPECTRA_SCOPE_H__ */ #endif /* __GST_SPECTRA_SCOPE_H__ */

View file

@ -73,7 +73,11 @@ static gboolean gst_synae_scope_render (GstAudioVisualizer * scope,
GstBuffer * audio, GstVideoFrame * video); GstBuffer * audio, GstVideoFrame * video);
G_DEFINE_TYPE (GstSynaeScope, gst_synae_scope, GST_TYPE_AUDIO_VISUALIZER); G_DEFINE_TYPE_WITH_CODE (GstSynaeScope, gst_synae_scope,
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (synae_scope_debug,
"synaescope", 0, "synaescope"););
GST_ELEMENT_REGISTER_DEFINE (synaescope, "synaescope", GST_RANK_NONE,
GST_TYPE_SYNAE_SCOPE);
static void static void
gst_synae_scope_class_init (GstSynaeScopeClass * g_class) gst_synae_scope_class_init (GstSynaeScopeClass * g_class)
@ -309,12 +313,3 @@ gst_synae_scope_render (GstAudioVisualizer * bscope, GstBuffer * audio,
return TRUE; return TRUE;
} }
gboolean
gst_synae_scope_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (synae_scope_debug, "synaescope", 0, "synaescope");
return gst_element_register (plugin, "synaescope", GST_RANK_NONE,
GST_TYPE_SYNAE_SCOPE);
}

View file

@ -52,7 +52,8 @@ struct _GstSynaeScopeClass
}; };
GType gst_synae_scope_get_type (void); GType gst_synae_scope_get_type (void);
gboolean gst_synae_scope_plugin_init (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (synaescope);
G_END_DECLS G_END_DECLS
#endif /* __GST_SYNAE_SCOPE_H__ */ #endif /* __GST_SYNAE_SCOPE_H__ */

View file

@ -122,7 +122,11 @@ static gboolean gst_wave_scope_render (GstAudioVisualizer * base,
GstBuffer * audio, GstVideoFrame * video); GstBuffer * audio, GstVideoFrame * video);
#define gst_wave_scope_parent_class parent_class #define gst_wave_scope_parent_class parent_class
G_DEFINE_TYPE (GstWaveScope, gst_wave_scope, GST_TYPE_AUDIO_VISUALIZER); G_DEFINE_TYPE_WITH_CODE (GstWaveScope, gst_wave_scope,
GST_TYPE_AUDIO_VISUALIZER, GST_DEBUG_CATEGORY_INIT (wave_scope_debug,
"wavescope", 0, "wavescope"););
GST_ELEMENT_REGISTER_DEFINE (wavescope, "wavescope", GST_RANK_NONE,
GST_TYPE_WAVE_SCOPE);
static void static void
gst_wave_scope_class_init (GstWaveScopeClass * g_class) gst_wave_scope_class_init (GstWaveScopeClass * g_class)
@ -422,12 +426,3 @@ gst_wave_scope_render (GstAudioVisualizer * base, GstBuffer * audio,
return TRUE; return TRUE;
} }
gboolean
gst_wave_scope_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (wave_scope_debug, "wavescope", 0, "wavescope");
return gst_element_register (plugin, "wavescope", GST_RANK_NONE,
GST_TYPE_WAVE_SCOPE);
}

View file

@ -53,7 +53,8 @@ struct _GstWaveScopeClass
}; };
GType gst_wave_scope_get_type (void); GType gst_wave_scope_get_type (void);
gboolean gst_wave_scope_plugin_init (GstPlugin * plugin);
GST_ELEMENT_REGISTER_DECLARE (wavescope);
G_END_DECLS G_END_DECLS
#endif /* __GST_WAVE_SCOPE_H__ */ #endif /* __GST_WAVE_SCOPE_H__ */

View file

@ -32,13 +32,14 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gboolean res = TRUE; gboolean ret = FALSE;
res &= gst_space_scope_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (spacescope, plugin);
res &= gst_spectra_scope_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (spectrascope, plugin);
res &= gst_synae_scope_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (synaescope, plugin);
res &= gst_wave_scope_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (wavescope, plugin);
return res;
return ret;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -145,6 +145,8 @@ static GQuark internal_sinkpad_quark = 0;
static GQuark parent_quark = 0; static GQuark parent_quark = 0;
G_DEFINE_TYPE (GstAutoConvert, gst_auto_convert, GST_TYPE_BIN); G_DEFINE_TYPE (GstAutoConvert, gst_auto_convert, GST_TYPE_BIN);
GST_ELEMENT_REGISTER_DEFINE (autoconvert, "autoconvert",
GST_RANK_NONE, GST_TYPE_AUTO_CONVERT);
static void static void
gst_auto_convert_class_init (GstAutoConvertClass * klass) gst_auto_convert_class_init (GstAutoConvertClass * klass)

View file

@ -61,6 +61,7 @@ struct _GstAutoConvertClass
}; };
GType gst_auto_convert_get_type (void); GType gst_auto_convert_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (autoconvert);
G_END_DECLS G_END_DECLS
#endif /* __GST_AUTO_CONVERT_H__ */ #endif /* __GST_AUTO_CONVERT_H__ */

View file

@ -131,6 +131,8 @@ gst_auto_video_convert_update_factory_list (GstAutoVideoConvert *
} }
G_DEFINE_TYPE (GstAutoVideoConvert, gst_auto_video_convert, GST_TYPE_BIN); G_DEFINE_TYPE (GstAutoVideoConvert, gst_auto_video_convert, GST_TYPE_BIN);
GST_ELEMENT_REGISTER_DEFINE (autovideoconvert, "autovideoconvert",
GST_RANK_NONE, GST_TYPE_AUTO_VIDEO_CONVERT);
static void static void
gst_auto_video_convert_class_init (GstAutoVideoConvertClass * klass) gst_auto_video_convert_class_init (GstAutoVideoConvertClass * klass)

View file

@ -50,6 +50,7 @@ struct _GstAutoVideoConvertClass
}; };
GType gst_auto_video_convert_get_type (void); GType gst_auto_video_convert_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (autovideoconvert);
G_END_DECLS G_END_DECLS
#endif /* __GST_AUTO_VIDEO_CONVERT_H__ */ #endif /* __GST_AUTO_VIDEO_CONVERT_H__ */

View file

@ -28,13 +28,10 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gboolean ret; gboolean ret = FALSE;
ret = gst_element_register (plugin, "autoconvert", ret |= GST_ELEMENT_REGISTER (autoconvert, plugin);
GST_RANK_NONE, GST_TYPE_AUTO_CONVERT); ret |= GST_ELEMENT_REGISTER (autovideoconvert, plugin);
ret &= gst_element_register (plugin, "autovideoconvert",
GST_RANK_NONE, GST_TYPE_AUTO_VIDEO_CONVERT);
return ret; return ret;
} }

View file

@ -23,19 +23,17 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstbayerelements.h"
GType gst_bayer2rgb_get_type (void);
GType gst_rgb2bayer_get_type (void);
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gst_element_register (plugin, "bayer2rgb", GST_RANK_NONE, gboolean ret = FALSE;
gst_bayer2rgb_get_type ());
gst_element_register (plugin, "rgb2bayer", GST_RANK_NONE,
gst_rgb2bayer_get_type ());
return TRUE; ret |= GST_ELEMENT_REGISTER (bayer2rgb, plugin);
ret |= GST_ELEMENT_REGISTER (rgb2bayer, plugin);
return ret;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -86,6 +86,7 @@
#include <stdint.h> #include <stdint.h>
#endif #endif
#include "gstbayerelements.h"
#include "gstbayerorc.h" #include "gstbayerorc.h"
#define GST_CAT_DEFAULT gst_bayer2rgb_debug #define GST_CAT_DEFAULT gst_bayer2rgb_debug
@ -145,6 +146,8 @@ GType gst_bayer2rgb_get_type (void);
#define gst_bayer2rgb_parent_class parent_class #define gst_bayer2rgb_parent_class parent_class
G_DEFINE_TYPE (GstBayer2RGB, gst_bayer2rgb, GST_TYPE_BASE_TRANSFORM); G_DEFINE_TYPE (GstBayer2RGB, gst_bayer2rgb, GST_TYPE_BASE_TRANSFORM);
GST_ELEMENT_REGISTER_DEFINE (bayer2rgb, "bayer2rgb", GST_RANK_NONE,
gst_bayer2rgb_get_type ());
static void gst_bayer2rgb_set_property (GObject * object, guint prop_id, static void gst_bayer2rgb_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);

View file

@ -0,0 +1,33 @@
/* GStreamer
* Copyright (C) <2020> Julian Bouzas <julian.bouzas@collabora.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_BAYER_ELEMENT_H__
#define __GST_BAYER_ELEMENT_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gst/gst.h>
GST_ELEMENT_REGISTER_DECLARE (bayer2rgb);
GST_ELEMENT_REGISTER_DECLARE (rgb2bayer);
#endif /* __GST_BAYER_ELEMENT_H__ */

View file

@ -25,6 +25,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbasetransform.h> #include <gst/base/gstbasetransform.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include "gstbayerelements.h"
#include "gstrgb2bayer.h" #include "gstrgb2bayer.h"
#define GST_CAT_DEFAULT gst_rgb2bayer_debug #define GST_CAT_DEFAULT gst_rgb2bayer_debug
@ -76,6 +77,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
#define gst_rgb2bayer_parent_class parent_class #define gst_rgb2bayer_parent_class parent_class
G_DEFINE_TYPE (GstRGB2Bayer, gst_rgb2bayer, GST_TYPE_BASE_TRANSFORM); G_DEFINE_TYPE (GstRGB2Bayer, gst_rgb2bayer, GST_TYPE_BASE_TRANSFORM);
GST_ELEMENT_REGISTER_DEFINE (rgb2bayer, "rgb2bayer", GST_RANK_NONE,
gst_rgb2bayer_get_type ());
static void static void
gst_rgb2bayer_class_init (GstRGB2BayerClass * klass) gst_rgb2bayer_class_init (GstRGB2BayerClass * klass)

View file

@ -311,6 +311,11 @@ gst_camera_bin2_get_type (void)
return gst_camera_bin_type; return gst_camera_bin_type;
} }
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (camerabin, "camerabin", GST_RANK_NONE,
gst_camera_bin2_get_type (), GST_DEBUG_CATEGORY_INIT (gst_camera_bin_debug,
"camerabin", 0, "CameraBin");
);
/* GObject class functions */ /* GObject class functions */
static void gst_camera_bin_set_property (GObject * object, guint prop_id, static void gst_camera_bin_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
@ -2390,12 +2395,3 @@ gst_camera_bin_get_property (GObject * object, guint prop_id,
break; break;
} }
} }
gboolean
gst_camera_bin2_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_camera_bin_debug, "camerabin", 0, "CameraBin");
return gst_element_register (plugin, "camerabin", GST_RANK_NONE,
gst_camera_bin2_get_type ());
}

View file

@ -161,7 +161,7 @@ struct _GstCameraBin2Class
}; };
GType gst_camera_bin2_get_type (void); GType gst_camera_bin2_get_type (void);
gboolean gst_camera_bin2_plugin_init (GstPlugin * plugin); GST_ELEMENT_REGISTER_DECLARE (camerabin);
G_END_DECLS G_END_DECLS

View file

@ -30,14 +30,13 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
if (!gst_viewfinder_bin_plugin_init (plugin)) gboolean ret = FALSE;
return FALSE;
if (!gst_wrapper_camera_bin_src_plugin_init (plugin))
return FALSE;
if (!gst_camera_bin2_plugin_init (plugin))
return FALSE;
return TRUE; ret |= GST_ELEMENT_REGISTER (viewfinderbin, plugin);
ret |= GST_ELEMENT_REGISTER (wrappercamerabinsrc, plugin);
ret |= GST_ELEMENT_REGISTER (camerabin, plugin);
return ret;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -63,6 +63,11 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
/* class initialization */ /* class initialization */
#define gst_viewfinder_bin_parent_class parent_class #define gst_viewfinder_bin_parent_class parent_class
G_DEFINE_TYPE (GstViewfinderBin, gst_viewfinder_bin, GST_TYPE_BIN); G_DEFINE_TYPE (GstViewfinderBin, gst_viewfinder_bin, GST_TYPE_BIN);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (viewfinderbin, "viewfinderbin",
GST_RANK_NONE, gst_viewfinder_bin_get_type (),
GST_DEBUG_CATEGORY_INIT (gst_viewfinder_bin_debug, "viewfinderbin", 0,
"ViewFinderBin");
);
static void gst_viewfinder_bin_set_property (GObject * object, guint prop_id, static void gst_viewfinder_bin_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * spec); const GValue * value, GParamSpec * spec);
@ -358,12 +363,3 @@ gst_viewfinder_bin_get_property (GObject * object, guint prop_id,
break; break;
} }
} }
gboolean
gst_viewfinder_bin_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_viewfinder_bin_debug, "viewfinderbin", 0,
"ViewFinderBin");
return gst_element_register (plugin, "viewfinderbin", GST_RANK_NONE,
gst_viewfinder_bin_get_type ());
}

View file

@ -53,7 +53,7 @@ struct _GstViewfinderBinClass
}; };
GType gst_viewfinder_bin_get_type (void); GType gst_viewfinder_bin_get_type (void);
gboolean gst_viewfinder_bin_plugin_init (GstPlugin * plugin); GST_ELEMENT_REGISTER_DECLARE (viewfinderbin);
G_END_DECLS G_END_DECLS

View file

@ -52,6 +52,8 @@ GST_DEBUG_CATEGORY (wrapper_camera_bin_src_debug);
#define gst_wrapper_camera_bin_src_parent_class parent_class #define gst_wrapper_camera_bin_src_parent_class parent_class
G_DEFINE_TYPE (GstWrapperCameraBinSrc, gst_wrapper_camera_bin_src, G_DEFINE_TYPE (GstWrapperCameraBinSrc, gst_wrapper_camera_bin_src,
GST_TYPE_BASE_CAMERA_SRC); GST_TYPE_BASE_CAMERA_SRC);
GST_ELEMENT_REGISTER_DEFINE (wrappercamerabinsrc, "wrappercamerabinsrc",
GST_RANK_NONE, gst_wrapper_camera_bin_src_get_type ());
static GstStaticPadTemplate vfsrc_template = static GstStaticPadTemplate vfsrc_template =
GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME, GST_STATIC_PAD_TEMPLATE (GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME,
@ -1169,10 +1171,3 @@ gst_wrapper_camera_bin_src_init (GstWrapperCameraBinSrc * self)
self->mode = GST_BASE_CAMERA_SRC_CAST (self)->mode; self->mode = GST_BASE_CAMERA_SRC_CAST (self)->mode;
self->app_vid_filter = NULL; self->app_vid_filter = NULL;
} }
gboolean
gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin)
{
return gst_element_register (plugin, "wrappercamerabinsrc", GST_RANK_NONE,
gst_wrapper_camera_bin_src_get_type ());
}

View file

@ -124,7 +124,7 @@ struct _GstWrapperCameraBinSrcClass
GstBaseCameraSrcClass parent; GstBaseCameraSrcClass parent;
}; };
gboolean gst_wrapper_camera_bin_src_plugin_init (GstPlugin * plugin); GST_ELEMENT_REGISTER_DECLARE (wrappercamerabinsrc);
G_END_DECLS G_END_DECLS

View file

@ -111,6 +111,8 @@ static void gst_chroma_hold_finalize (GObject * object);
#define gst_chroma_hold_parent_class parent_class #define gst_chroma_hold_parent_class parent_class
G_DEFINE_TYPE (GstChromaHold, gst_chroma_hold, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstChromaHold, gst_chroma_hold, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE (chromahold, "chromahold",
GST_RANK_NONE, gst_chroma_hold_get_type ());
static void static void
gst_chroma_hold_class_init (GstChromaHoldClass * klass) gst_chroma_hold_class_init (GstChromaHoldClass * klass)

View file

@ -74,6 +74,7 @@ struct _GstChromaHoldClass
}; };
GType gst_chroma_hold_get_type (void); GType gst_chroma_hold_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (chromahold);
G_END_DECLS G_END_DECLS
#endif /* __GST_CHROMA_HOLD_H__ */ #endif /* __GST_CHROMA_HOLD_H__ */

View file

@ -51,6 +51,8 @@ enum
#define gst_color_effects_parent_class parent_class #define gst_color_effects_parent_class parent_class
G_DEFINE_TYPE (GstColorEffects, gst_color_effects, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstColorEffects, gst_color_effects, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE (coloreffects, "coloreffects",
GST_RANK_NONE, gst_color_effects_get_type ());
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ " \ #define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ " \
"ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, AYUV }") "ARGB, BGRA, ABGR, RGBA, xRGB, BGRx, xBGR, RGBx, RGB, BGR, AYUV }")

View file

@ -87,6 +87,7 @@ struct _GstColorEffectsClass
}; };
GType gst_color_effects_get_type (void); GType gst_color_effects_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (coloreffects);
G_END_DECLS G_END_DECLS
#endif /* __GST_COLOR_EFFECTS_H__ */ #endif /* __GST_COLOR_EFFECTS_H__ */

View file

@ -26,31 +26,16 @@
#include "gstcoloreffects.h" #include "gstcoloreffects.h"
#include "gstchromahold.h" #include "gstchromahold.h"
struct _elements_entry
{
const gchar *name;
GType (*type) (void);
};
static const struct _elements_entry _elements[] = {
{"coloreffects", gst_color_effects_get_type},
{"chromahold", gst_chroma_hold_get_type},
{NULL, 0},
};
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gint i = 0; gboolean ret = FALSE;
while (_elements[i].name) { ret |= GST_ELEMENT_REGISTER (coloreffects, plugin);
if (!gst_element_register (plugin, _elements[i].name, ret |= GST_ELEMENT_REGISTER (chromahold, plugin);
GST_RANK_NONE, (_elements[i].type) ()))
return FALSE;
i++;
}
return TRUE; return ret;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -23,45 +23,27 @@
#include <gst/gst.h> #include <gst/gst.h>
GType gst_checksum_sink_get_type (void);
GType fps_display_sink_get_type (void); #include "gstdebugutilsbadelements.h"
GType gst_chop_my_data_get_type (void);
GType gst_compare_get_type (void);
GType gst_debug_spy_get_type (void);
GType gst_error_ignore_get_type (void);
GType gst_watchdog_get_type (void);
GType gst_fake_audio_sink_get_type (void);
GType gst_fake_video_sink_get_type (void);
GType gst_test_src_bin_get_type (void);
GType gst_clock_select_get_type (void);
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gst_element_register (plugin, "checksumsink", GST_RANK_NONE, gboolean ret = FALSE;
gst_checksum_sink_get_type ());
gst_element_register (plugin, "fpsdisplaysink", GST_RANK_NONE,
fps_display_sink_get_type ());
gst_element_register (plugin, "chopmydata", GST_RANK_NONE,
gst_chop_my_data_get_type ());
gst_element_register (plugin, "compare", GST_RANK_NONE,
gst_compare_get_type ());
gst_element_register (plugin, "debugspy", GST_RANK_NONE,
gst_debug_spy_get_type ());
gst_element_register (plugin, "watchdog", GST_RANK_NONE,
gst_watchdog_get_type ());
gst_element_register (plugin, "errorignore", GST_RANK_NONE,
gst_error_ignore_get_type ());
gst_element_register (plugin, "fakeaudiosink", GST_RANK_NONE,
gst_fake_audio_sink_get_type ());
gst_element_register (plugin, "fakevideosink", GST_RANK_NONE,
gst_fake_video_sink_get_type ());
gst_element_register (plugin, "testsrcbin", GST_RANK_NONE,
gst_test_src_bin_get_type ());
gst_element_register (plugin, "clockselect", GST_RANK_NONE,
gst_clock_select_get_type ());
return TRUE; ret |= GST_ELEMENT_REGISTER (checksumsink, plugin);
ret |= GST_ELEMENT_REGISTER (fpsdisplaysink, plugin);
ret |= GST_ELEMENT_REGISTER (chopmydata, plugin);
ret |= GST_ELEMENT_REGISTER (compare, plugin);
ret |= GST_ELEMENT_REGISTER (debugspy, plugin);
ret |= GST_ELEMENT_REGISTER (watchdog, plugin);
ret |= GST_ELEMENT_REGISTER (errorignore, plugin);
ret |= GST_ELEMENT_REGISTER (fakevideosink, plugin);
ret |= GST_ELEMENT_REGISTER (fakeaudiosink, plugin);
ret |= GST_ELEMENT_REGISTER (testsrcbin, plugin);
ret |= GST_ELEMENT_REGISTER (clockselect, plugin);
return ret;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -47,6 +47,7 @@
#include "config.h" #include "config.h"
#endif #endif
#include "gstdebugutilsbadelements.h"
#include "fpsdisplaysink.h" #include "fpsdisplaysink.h"
#define DEFAULT_SIGNAL_FPS_MEASUREMENTS FALSE #define DEFAULT_SIGNAL_FPS_MEASUREMENTS FALSE
@ -723,3 +724,6 @@ fps_display_sink_get_type (void)
return fps_display_sink_type; return fps_display_sink_type;
} }
GST_ELEMENT_REGISTER_DEFINE (fpsdisplaysink, "fpsdisplaysink",
GST_RANK_NONE, fps_display_sink_get_type ());

View file

@ -23,6 +23,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbasesink.h> #include <gst/base/gstbasesink.h>
#include "gstdebugutilsbadelements.h"
#include "gstchecksumsink.h" #include "gstchecksumsink.h"
static void gst_checksum_sink_set_property (GObject * object, guint prop_id, static void gst_checksum_sink_set_property (GObject * object, guint prop_id,
@ -73,6 +74,8 @@ gst_checksum_sink_hash_get_type (void)
#define gst_checksum_sink_parent_class parent_class #define gst_checksum_sink_parent_class parent_class
G_DEFINE_TYPE (GstChecksumSink, gst_checksum_sink, GST_TYPE_BASE_SINK); G_DEFINE_TYPE (GstChecksumSink, gst_checksum_sink, GST_TYPE_BASE_SINK);
GST_ELEMENT_REGISTER_DEFINE (checksumsink, "checksumsink",
GST_RANK_NONE, gst_checksum_sink_get_type ());
static void static void
gst_checksum_sink_class_init (GstChecksumSinkClass * klass) gst_checksum_sink_class_init (GstChecksumSinkClass * klass)

View file

@ -45,6 +45,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/gst.h> #include <gst/gst.h>
#include "gstdebugutilsbadelements.h"
#include "gstchopmydata.h" #include "gstchopmydata.h"
/* prototypes */ /* prototypes */
@ -95,6 +96,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
#define gst_chop_my_data_parent_class parent_class #define gst_chop_my_data_parent_class parent_class
G_DEFINE_TYPE (GstChopMyData, gst_chop_my_data, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstChopMyData, gst_chop_my_data, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE (chopmydata, "chopmydata",
GST_RANK_NONE, gst_chop_my_data_get_type ());
static void static void
gst_chop_my_data_class_init (GstChopMyDataClass * klass) gst_chop_my_data_class_init (GstChopMyDataClass * klass)

View file

@ -39,6 +39,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/net/net.h> #include <gst/net/net.h>
#include "gstdebugutilsbadelements.h"
#include "gstclockselect.h" #include "gstclockselect.h"
GST_DEBUG_CATEGORY_STATIC (gst_clock_select_debug_category); GST_DEBUG_CATEGORY_STATIC (gst_clock_select_debug_category);
@ -94,6 +95,8 @@ enum
G_DEFINE_TYPE_WITH_CODE (GstClockSelect, gst_clock_select, GST_TYPE_PIPELINE, G_DEFINE_TYPE_WITH_CODE (GstClockSelect, gst_clock_select, GST_TYPE_PIPELINE,
GST_DEBUG_CATEGORY_INIT (gst_clock_select_debug_category, "clockselect", 0, GST_DEBUG_CATEGORY_INIT (gst_clock_select_debug_category, "clockselect", 0,
"debug category for clockselect element")); "debug category for clockselect element"));
GST_ELEMENT_REGISTER_DEFINE (clockselect, "clockselect",
GST_RANK_NONE, gst_clock_select_get_type ());
static void static void
gst_clock_select_class_init (GstClockSelectClass * klass) gst_clock_select_class_init (GstClockSelectClass * klass)

View file

@ -29,6 +29,7 @@
#include <gst/base/gstcollectpads.h> #include <gst/base/gstcollectpads.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include "gstdebugutilsbadelements.h"
#include "gstcompare.h" #include "gstcompare.h"
GST_DEBUG_CATEGORY_STATIC (compare_debug); GST_DEBUG_CATEGORY_STATIC (compare_debug);
@ -117,6 +118,8 @@ static GstStateChangeReturn gst_compare_change_state (GstElement * element,
#define gst_compare_parent_class parent_class #define gst_compare_parent_class parent_class
G_DEFINE_TYPE (GstCompare, gst_compare, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstCompare, gst_compare, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE (compare, "compare",
GST_RANK_NONE, gst_compare_get_type ());
static void static void
gst_compare_finalize (GObject * object) gst_compare_finalize (GObject * object)

View file

@ -40,6 +40,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstdebugutilsbadelements.h"
#include "gstdebugspy.h" #include "gstdebugspy.h"
GST_DEBUG_CATEGORY_STATIC (gst_debug_spy_debug); GST_DEBUG_CATEGORY_STATIC (gst_debug_spy_debug);
@ -96,6 +97,8 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
); );
G_DEFINE_TYPE (GstDebugSpy, gst_debug_spy, GST_TYPE_BASE_TRANSFORM); G_DEFINE_TYPE (GstDebugSpy, gst_debug_spy, GST_TYPE_BASE_TRANSFORM);
GST_ELEMENT_REGISTER_DEFINE (debugspy, "debugspy",
GST_RANK_NONE, gst_debug_spy_get_type ());
static void gst_debug_spy_set_property (GObject * object, guint prop_id, static void gst_debug_spy_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);

View file

@ -0,0 +1,43 @@
/* GStreamer
* Copyright (C) <2020> Julian Bouzas <julian.bouzas@collabora.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_DEBUGUTILSBAD_ELEMENT_H__
#define __GST_DEBUGUTILSBAD_ELEMENT_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gst/gst.h>
GST_ELEMENT_REGISTER_DECLARE (fpsdisplaysink);
GST_ELEMENT_REGISTER_DECLARE (checksumsink);
GST_ELEMENT_REGISTER_DECLARE (chopmydata);
GST_ELEMENT_REGISTER_DECLARE (clockselect);
GST_ELEMENT_REGISTER_DECLARE (compare);
GST_ELEMENT_REGISTER_DECLARE (debugspy);
GST_ELEMENT_REGISTER_DECLARE (testsrcbin);
GST_ELEMENT_REGISTER_DECLARE (errorignore);
GST_ELEMENT_REGISTER_DECLARE (fakevideosink);
GST_ELEMENT_REGISTER_DECLARE (fakeaudiosink);
GST_ELEMENT_REGISTER_DECLARE (watchdog);
#endif /* __GST_DEBUGUTILSBAD_PLUGIN_H__ */

View file

@ -38,6 +38,7 @@
#include "config.h" #include "config.h"
#endif #endif
#include "gstdebugutilsbadelements.h"
#include "gsterrorignore.h" #include "gsterrorignore.h"
#define GST_CAT_DEFAULT gst_error_ignore_debug #define GST_CAT_DEFAULT gst_error_ignore_debug
@ -69,6 +70,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
#define parent_class gst_error_ignore_parent_class #define parent_class gst_error_ignore_parent_class
G_DEFINE_TYPE (GstErrorIgnore, gst_error_ignore, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstErrorIgnore, gst_error_ignore, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE (errorignore, "errorignore",
GST_RANK_NONE, gst_error_ignore_get_type ());
static GstFlowReturn gst_error_ignore_sink_chain (GstPad * pad, static GstFlowReturn gst_error_ignore_sink_chain (GstPad * pad,
GstObject * parent, GstBuffer * inbuf); GstObject * parent, GstBuffer * inbuf);

View file

@ -37,6 +37,7 @@
* Since: 1.20 * Since: 1.20
*/ */
#include "gstdebugutilsbadelements.h"
#include "gstfakeaudiosink.h" #include "gstfakeaudiosink.h"
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
@ -57,6 +58,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
G_DEFINE_TYPE_WITH_CODE (GstFakeAudioSink, gst_fake_audio_sink, GST_TYPE_BIN, G_DEFINE_TYPE_WITH_CODE (GstFakeAudioSink, gst_fake_audio_sink, GST_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL);); G_IMPLEMENT_INTERFACE (GST_TYPE_STREAM_VOLUME, NULL););
GST_ELEMENT_REGISTER_DEFINE (fakeaudiosink, "fakeaudiosink",
GST_RANK_NONE, gst_fake_audio_sink_get_type ());
/* TODO complete the types and make this an utility */ /* TODO complete the types and make this an utility */
static void static void

View file

@ -37,6 +37,7 @@
* Since 1.14 * Since 1.14
*/ */
#include "gstdebugutilsbadelements.h"
#include "gstfakevideosink.h" #include "gstfakevideosink.h"
#include <gst/video/video.h> #include <gst/video/video.h>
@ -84,6 +85,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_VIDEO_FORMATS_ALL))); GST_VIDEO_FORMATS_ALL)));
G_DEFINE_TYPE (GstFakeVideoSink, gst_fake_video_sink, GST_TYPE_BIN); G_DEFINE_TYPE (GstFakeVideoSink, gst_fake_video_sink, GST_TYPE_BIN);
GST_ELEMENT_REGISTER_DEFINE (fakevideosink, "fakevideosink",
GST_RANK_NONE, gst_fake_video_sink_get_type ());
static gboolean static gboolean
gst_fake_video_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) gst_fake_video_sink_query (GstPad * pad, GstObject * parent, GstQuery * query)

View file

@ -39,6 +39,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstflowcombiner.h> #include <gst/base/gstflowcombiner.h>
#include <gst/app/gstappsink.h> #include <gst/app/gstappsink.h>
#include "gstdebugutilsbadelements.h"
static GstStaticPadTemplate video_src_template = static GstStaticPadTemplate video_src_template =
GST_STATIC_PAD_TEMPLATE ("video_src_%u", GST_STATIC_PAD_TEMPLATE ("video_src_%u",
@ -377,6 +378,9 @@ G_DEFINE_TYPE_WITH_CODE (GstTestSrcBin, gst_test_src_bin, GST_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_test_src_bin_uri_handler_init)) G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, gst_test_src_bin_uri_handler_init))
/* *INDENT-ON* */ /* *INDENT-ON* */
GST_ELEMENT_REGISTER_DEFINE (testsrcbin, "testsrcbin",
GST_RANK_NONE, gst_test_src_bin_get_type ());
static void static void
gst_test_src_bin_set_property (GObject * object, guint prop_id, gst_test_src_bin_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec) const GValue * value, GParamSpec * pspec)

View file

@ -46,6 +46,7 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/base/gstbasetransform.h> #include <gst/base/gstbasetransform.h>
#include "gstdebugutilsbadelements.h"
#include "gstwatchdog.h" #include "gstwatchdog.h"
GST_DEBUG_CATEGORY_STATIC (gst_watchdog_debug_category); GST_DEBUG_CATEGORY_STATIC (gst_watchdog_debug_category);
@ -83,6 +84,8 @@ enum
G_DEFINE_TYPE_WITH_CODE (GstWatchdog, gst_watchdog, GST_TYPE_BASE_TRANSFORM, G_DEFINE_TYPE_WITH_CODE (GstWatchdog, gst_watchdog, GST_TYPE_BASE_TRANSFORM,
GST_DEBUG_CATEGORY_INIT (gst_watchdog_debug_category, "watchdog", 0, GST_DEBUG_CATEGORY_INIT (gst_watchdog_debug_category, "watchdog", 0,
"debug category for watchdog element")); "debug category for watchdog element"));
GST_ELEMENT_REGISTER_DEFINE (watchdog, "watchdog", GST_RANK_NONE,
gst_watchdog_get_type ());
static void static void
gst_watchdog_class_init (GstWatchdogClass * klass) gst_watchdog_class_init (GstWatchdogClass * klass)

View file

@ -51,6 +51,10 @@ enum
#define gst_dvb_sub_enc_parent_class parent_class #define gst_dvb_sub_enc_parent_class parent_class
G_DEFINE_TYPE (GstDvbSubEnc, gst_dvb_sub_enc, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstDvbSubEnc, gst_dvb_sub_enc, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvbsubenc, "dvbsubenc", GST_RANK_NONE,
GST_TYPE_DVB_SUB_ENC, GST_DEBUG_CATEGORY_INIT (gst_dvb_sub_enc_debug,
"dvbsubenc", 0, "DVB subtitle encoder");
);
static void gst_dvb_sub_enc_get_property (GObject * object, guint prop_id, static void gst_dvb_sub_enc_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
@ -591,15 +595,7 @@ gst_dvb_sub_enc_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
if (!gst_element_register (plugin, "dvbsubenc", GST_RANK_NONE, return GST_ELEMENT_REGISTER (dvbsubenc, plugin);
GST_TYPE_DVB_SUB_ENC)) {
return FALSE;
}
GST_DEBUG_CATEGORY_INIT (gst_dvb_sub_enc_debug, "dvbsubenc", 0,
"DVB subtitle encoder");
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -64,6 +64,7 @@ struct _GstDvbSubEncClass
}; };
GType gst_dvb_sub_enc_get_type (void); GType gst_dvb_sub_enc_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (dvbsubenc);
gboolean gst_dvbsubenc_ayuv_to_ayuv8p (GstVideoFrame * src, GstVideoFrame * dest, int max_colours, guint32 *out_num_colours); gboolean gst_dvbsubenc_ayuv_to_ayuv8p (GstVideoFrame * src, GstVideoFrame * dest, int max_colours, guint32 *out_num_colours);

View file

@ -107,6 +107,11 @@ static GstStateChangeReturn gst_dvbsub_overlay_change_state (GstElement *
#define gst_dvbsub_overlay_parent_class parent_class #define gst_dvbsub_overlay_parent_class parent_class
G_DEFINE_TYPE (GstDVBSubOverlay, gst_dvbsub_overlay, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstDVBSubOverlay, gst_dvbsub_overlay, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dvbsuboverlay, "dvbsuboverlay",
GST_RANK_PRIMARY, GST_TYPE_DVBSUB_OVERLAY,
GST_DEBUG_CATEGORY_INIT (gst_dvbsub_overlay_debug, "dvbsuboverlay", 0,
"DVB subtitle overlay");
);
static GstCaps *gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay * static GstCaps *gst_dvbsub_overlay_get_videosink_caps (GstDVBSubOverlay *
render, GstPad * pad, GstCaps * filter); render, GstPad * pad, GstCaps * filter);
@ -1303,11 +1308,7 @@ gst_dvbsub_overlay_event_text (GstPad * pad, GstObject * parent,
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_dvbsub_overlay_debug, "dvbsuboverlay", return GST_ELEMENT_REGISTER (dvbsuboverlay, plugin);
0, "DVB subtitle overlay");
return gst_element_register (plugin, "dvbsuboverlay",
GST_RANK_PRIMARY, GST_TYPE_DVBSUB_OVERLAY);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -76,6 +76,7 @@ struct _GstDVBSubOverlayClass
}; };
GType gst_dvbsub_overlay_get_type (void); GType gst_dvbsub_overlay_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (dvbsuboverlay);
G_END_DECLS G_END_DECLS

View file

@ -75,8 +75,11 @@ static GstStaticPadTemplate subpic_sink_factory =
GST_STATIC_CAPS ("subpicture/x-dvd; subpicture/x-pgs") GST_STATIC_CAPS ("subpicture/x-dvd; subpicture/x-pgs")
); );
static gboolean dvd_spu_element_init (GstPlugin * plugin);
#define gst_dvd_spu_parent_class parent_class #define gst_dvd_spu_parent_class parent_class
G_DEFINE_TYPE (GstDVDSpu, gst_dvd_spu, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstDVDSpu, gst_dvd_spu, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_CUSTOM (dvdspu, dvd_spu_element_init);
static void gst_dvd_spu_dispose (GObject * object); static void gst_dvd_spu_dispose (GObject * object);
static void gst_dvd_spu_finalize (GObject * object); static void gst_dvd_spu_finalize (GObject * object);
@ -1238,7 +1241,7 @@ gst_dvd_spu_change_state (GstElement * element, GstStateChange transition)
} }
static gboolean static gboolean
gst_dvd_spu_plugin_init (GstPlugin * plugin) dvd_spu_element_init (GstPlugin * plugin)
{ {
const gchar *env; const gchar *env;
@ -1260,6 +1263,12 @@ gst_dvd_spu_plugin_init (GstPlugin * plugin)
GST_RANK_PRIMARY, GST_TYPE_DVD_SPU); GST_RANK_PRIMARY, GST_TYPE_DVD_SPU);
} }
static gboolean
gst_dvd_spu_plugin_init (GstPlugin * plugin)
{
return GST_ELEMENT_REGISTER (dvdspu, plugin);
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
dvdspu, dvdspu,

View file

@ -123,6 +123,7 @@ struct _GstDVDSpuClass {
}; };
GType gst_dvd_spu_get_type (void); GType gst_dvd_spu_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (dvdspu);
typedef enum { typedef enum {
GST_DVD_SPU_DEBUG_RENDER_RECTANGLE = (1 << 0), GST_DVD_SPU_DEBUG_RENDER_RECTANGLE = (1 << 0),

View file

@ -89,6 +89,11 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
#define gst_face_overlay_parent_class parent_class #define gst_face_overlay_parent_class parent_class
G_DEFINE_TYPE (GstFaceOverlay, gst_face_overlay, GST_TYPE_BIN); G_DEFINE_TYPE (GstFaceOverlay, gst_face_overlay, GST_TYPE_BIN);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (faceoverlay, "faceoverlay",
GST_RANK_NONE, GST_TYPE_FACEOVERLAY,
GST_DEBUG_CATEGORY_INIT (gst_face_overlay_debug, "faceoverlay", 0,
"SVG Face Overlay");
);
static void gst_face_overlay_set_property (GObject * object, guint prop_id, static void gst_face_overlay_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
@ -430,13 +435,9 @@ gst_face_overlay_get_property (GObject * object, guint prop_id,
} }
static gboolean static gboolean
faceoverlay_init (GstPlugin * faceoverlay) faceoverlay_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_face_overlay_debug, "faceoverlay", return GST_ELEMENT_REGISTER (faceoverlay, plugin);
0, "SVG Face Overlay");
return gst_element_register (faceoverlay, "faceoverlay", GST_RANK_NONE,
GST_TYPE_FACEOVERLAY);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -88,6 +88,7 @@ struct _GstFaceOverlayClass
}; };
GType gst_face_overlay_get_type (void); GType gst_face_overlay_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (faceoverlay);
G_END_DECLS G_END_DECLS

View file

@ -150,9 +150,14 @@ enum
/*static guint gst_festival_signals[LAST_SIGNAL] = { 0 }; */ /*static guint gst_festival_signals[LAST_SIGNAL] = { 0 }; */
G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT) G_DEFINE_TYPE (GstFestival, gst_festival, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (festival, "festival", GST_RANK_NONE,
GST_TYPE_FESTIVAL, GST_DEBUG_CATEGORY_INIT (festival_debug, "festival",
0, "Festival text-to-speech synthesizer");
);;
static void gst_festival_class_init (GstFestivalClass * klass) static void
gst_festival_class_init (GstFestivalClass * klass)
{ {
GObjectClass *gobject_class; GObjectClass *gobject_class;
GstElementClass *gstelement_class; GstElementClass *gstelement_class;
@ -524,14 +529,7 @@ gst_festival_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (festival_debug, "festival", return GST_ELEMENT_REGISTER (festival, plugin);
0, "Festival text-to-speech synthesizer");
if (!gst_element_register (plugin, "festival", GST_RANK_NONE,
GST_TYPE_FESTIVAL))
return FALSE;
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -116,6 +116,7 @@ struct _GstFestivalClass {
}; };
GType gst_festival_get_type(void); GType gst_festival_get_type(void);
GST_ELEMENT_REGISTER_DECLARE (festival);
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -108,6 +108,12 @@ GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{YUY2,UYVY,Y42B,I420,YV12}"))); GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{YUY2,UYVY,Y42B,I420,YV12}")));
G_DEFINE_TYPE (GstFieldAnalysis, gst_field_analysis, GST_TYPE_ELEMENT); G_DEFINE_TYPE (GstFieldAnalysis, gst_field_analysis, GST_TYPE_ELEMENT);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (fieldanalysis, "fieldanalysis",
GST_RANK_NONE, GST_TYPE_FIELDANALYSIS,
GST_DEBUG_CATEGORY_INIT (gst_field_analysis_debug, "fieldanalysis", 0,
"Video field analysis");
);
#define parent_class gst_field_analysis_parent_class #define parent_class gst_field_analysis_parent_class
static void gst_field_analysis_set_property (GObject * object, guint prop_id, static void gst_field_analysis_set_property (GObject * object, guint prop_id,
@ -1840,13 +1846,9 @@ gst_field_analysis_finalize (GObject * object)
static gboolean static gboolean
fieldanalysis_init (GstPlugin * fieldanalysis) fieldanalysis_init (GstPlugin * plugin)
{ {
GST_DEBUG_CATEGORY_INIT (gst_field_analysis_debug, "fieldanalysis", return GST_ELEMENT_REGISTER (fieldanalysis, plugin);
0, "Video field analysis");
return gst_element_register (fieldanalysis, "fieldanalysis", GST_RANK_NONE,
GST_TYPE_FIELDANALYSIS);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -143,6 +143,7 @@ struct _GstFieldAnalysisClass
}; };
GType gst_field_analysis_get_type (void); GType gst_field_analysis_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (fieldanalysis);
G_END_DECLS G_END_DECLS
#endif /* __GST_FIELDANALYSIS_H__ */ #endif /* __GST_FIELDANALYSIS_H__ */

View file

@ -347,6 +347,8 @@ struct _GstFreeverbPrivate
G_DEFINE_TYPE_WITH_CODE (GstFreeverb, gst_freeverb, GST_TYPE_BASE_TRANSFORM, G_DEFINE_TYPE_WITH_CODE (GstFreeverb, gst_freeverb, GST_TYPE_BASE_TRANSFORM,
G_ADD_PRIVATE (GstFreeverb) G_ADD_PRIVATE (GstFreeverb)
G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL)); G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL));
GST_ELEMENT_REGISTER_DEFINE (freeverb, "freeverb",
GST_RANK_NONE, GST_TYPE_FREEVERB);
static void static void
freeverb_revmodel_init (GstFreeverb * filter) freeverb_revmodel_init (GstFreeverb * filter)
@ -928,8 +930,7 @@ gst_freeverb_transform (GstBaseTransform * base, GstBuffer * inbuf,
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
return gst_element_register (plugin, "freeverb", return GST_ELEMENT_REGISTER (freeverb, plugin);
GST_RANK_NONE, GST_TYPE_FREEVERB);
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,

View file

@ -62,6 +62,7 @@ struct _GstFreeverbClass {
}; };
GType gst_freeverb_get_type (void); GType gst_freeverb_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (freeverb);
G_END_DECLS G_END_DECLS

View file

@ -64,17 +64,19 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <math.h> #include <math.h>
#include "gstplugin.h"
#include "gstburn.h" #include "gstburn.h"
#include "gstgaudieffectsorc.h" #include "gstgaudieffectsorc.h"
#define gst_burn_parent_class parent_class
G_DEFINE_TYPE (GstBurn, gst_burn, GST_TYPE_VIDEO_FILTER);
GST_DEBUG_CATEGORY_STATIC (gst_burn_debug); GST_DEBUG_CATEGORY_STATIC (gst_burn_debug);
#define GST_CAT_DEFAULT gst_burn_debug #define GST_CAT_DEFAULT gst_burn_debug
#define gst_burn_parent_class parent_class
G_DEFINE_TYPE (GstBurn, gst_burn, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (burn, "burn", GST_RANK_NONE,
GST_TYPE_BURN, GST_DEBUG_CATEGORY_INIT (gst_burn_debug, "burn", 0,
"Template burn"));
#if G_BYTE_ORDER == G_LITTLE_ENDIAN #if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }") #define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
#else #else
@ -246,14 +248,3 @@ gst_burn_transform_frame (GstVideoFilter * vfilter,
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* Entry point to initialize the plug-in.
* Register the element factories and other features. */
gboolean
gst_burn_plugin_init (GstPlugin * burn)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_burn_debug, "burn", 0, "Template burn");
return gst_element_register (burn, "burn", GST_RANK_NONE, GST_TYPE_BURN);
}

View file

@ -81,6 +81,7 @@ struct _GstBurnClass
}; };
GType gst_burn_get_type (void); GType gst_burn_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (burn);
G_END_DECLS G_END_DECLS

View file

@ -64,15 +64,17 @@
#include <math.h> #include <math.h>
#include <gst/gst.h> #include <gst/gst.h>
#include "gstplugin.h"
#include "gstchromium.h" #include "gstchromium.h"
#define gst_chromium_parent_class parent_class
G_DEFINE_TYPE (GstChromium, gst_chromium, GST_TYPE_VIDEO_FILTER);
GST_DEBUG_CATEGORY_STATIC (gst_chromium_debug); GST_DEBUG_CATEGORY_STATIC (gst_chromium_debug);
#define GST_CAT_DEFAULT gst_chromium_debug #define GST_CAT_DEFAULT gst_chromium_debug
#define gst_chromium_parent_class parent_class
G_DEFINE_TYPE (GstChromium, gst_chromium, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (chromium, "chromium", GST_RANK_NONE,
GST_TYPE_CHROMIUM, GST_DEBUG_CATEGORY_INIT (gst_chromium_debug, "chromium",
0, "Template chromium"));
#if G_BYTE_ORDER == G_LITTLE_ENDIAN #if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }") #define CAPS_STR GST_VIDEO_CAPS_MAKE ("{ BGRx, RGBx }")
#else #else
@ -275,19 +277,6 @@ gst_chromium_transform_frame (GstVideoFilter * vfilter,
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* Entry point to initialize the plug-in.
* Register the element factories and other features. */
gboolean
gst_chromium_plugin_init (GstPlugin * chromium)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_chromium_debug, "chromium", 0,
"Template chromium");
return gst_element_register (chromium, "chromium", GST_RANK_NONE,
GST_TYPE_CHROMIUM);
}
/*** Now the image processing work.... ***/ /*** Now the image processing work.... ***/
/* Set up the cosine table. */ /* Set up the cosine table. */
void void

View file

@ -79,6 +79,7 @@ struct _GstChromiumClass
}; };
GType gst_chromium_get_type (void); GType gst_chromium_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (chromium);
G_END_DECLS G_END_DECLS

View file

@ -64,7 +64,6 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <math.h> #include <math.h>
#include "gstplugin.h"
#include "gstdilate.h" #include "gstdilate.h"
GST_DEBUG_CATEGORY_STATIC (gst_dilate_debug); GST_DEBUG_CATEGORY_STATIC (gst_dilate_debug);
@ -78,6 +77,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_dilate_debug);
#define gst_dilate_parent_class parent_class #define gst_dilate_parent_class parent_class
G_DEFINE_TYPE (GstDilate, gst_dilate, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstDilate, gst_dilate, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dilate, "dilate", GST_RANK_NONE,
GST_TYPE_DILATE, GST_DEBUG_CATEGORY_INIT (gst_dilate_debug, "dilate", 0,
"Template dilate"));
/* Filter signals and args. */ /* Filter signals and args. */
enum enum
@ -250,18 +252,6 @@ gst_dilate_transform_frame (GstVideoFilter * vfilter,
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* Entry point to initialize the plug-in.
* Register the element factories and other features. */
gboolean
gst_dilate_plugin_init (GstPlugin * dilate)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_dilate_debug, "dilate", 0, "Template dilate");
return gst_element_register (dilate, "dilate", GST_RANK_NONE,
GST_TYPE_DILATE);
}
/*** Now the image processing work.... ***/ /*** Now the image processing work.... ***/
/* Return luminance of the color */ /* Return luminance of the color */

View file

@ -81,6 +81,7 @@ struct _GstDilateClass
}; };
GType gst_dilate_get_type (void); GType gst_dilate_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (dilate);
G_END_DECLS G_END_DECLS

View file

@ -64,7 +64,6 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <math.h> #include <math.h>
#include "gstplugin.h"
#include "gstdodge.h" #include "gstdodge.h"
GST_DEBUG_CATEGORY_STATIC (gst_dodge_debug); GST_DEBUG_CATEGORY_STATIC (gst_dodge_debug);
@ -78,6 +77,9 @@ GST_DEBUG_CATEGORY_STATIC (gst_dodge_debug);
#define gst_dodge_parent_class parent_class #define gst_dodge_parent_class parent_class
G_DEFINE_TYPE (GstDodge, gst_dodge, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstDodge, gst_dodge, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (dodge, "dodge", GST_RANK_NONE,
GST_TYPE_DODGE, GST_DEBUG_CATEGORY_INIT (gst_dodge_debug, "dodge", 0,
"Template dodge"));
/* Filter signals and args. */ /* Filter signals and args. */
enum enum
@ -223,17 +225,6 @@ gst_dodge_transform_frame (GstVideoFilter * vfilter,
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* Entry point to initialize the plug-in.
* Register the element factories and other features. */
gboolean
gst_dodge_plugin_init (GstPlugin * dodge)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_dodge_debug, "dodge", 0, "Template dodge");
return gst_element_register (dodge, "dodge", GST_RANK_NONE, GST_TYPE_DODGE);
}
/*** Now the image processing work.... ***/ /*** Now the image processing work.... ***/
/* Transform processes each frame. */ /* Transform processes each frame. */

View file

@ -78,6 +78,7 @@ struct _GstDodgeClass
}; };
GType gst_dodge_get_type (void); GType gst_dodge_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (dodge);
G_END_DECLS G_END_DECLS

View file

@ -64,7 +64,6 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <math.h> #include <math.h>
#include "gstplugin.h"
#include "gstexclusion.h" #include "gstexclusion.h"
#include <gst/video/video.h> #include <gst/video/video.h>
@ -115,6 +114,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
#define gst_exclusion_parent_class parent_class #define gst_exclusion_parent_class parent_class
G_DEFINE_TYPE (GstExclusion, gst_exclusion, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstExclusion, gst_exclusion, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (exclusion, "exclusion", GST_RANK_NONE,
GST_TYPE_EXCLUSION, GST_DEBUG_CATEGORY_INIT (gst_exclusion_debug,
"exclusion", 0, "Template exclusion"));
static void gst_exclusion_set_property (GObject * object, guint prop_id, static void gst_exclusion_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
@ -248,19 +250,6 @@ gst_exclusion_transform_frame (GstVideoFilter * vfilter,
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* Entry point to initialize the plug-in.
* Register the element factories and other features. */
gboolean
gst_exclusion_plugin_init (GstPlugin * exclusion)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_exclusion_debug, "exclusion",
0, "Template exclusion");
return gst_element_register (exclusion, "exclusion", GST_RANK_NONE,
GST_TYPE_EXCLUSION);
}
/*** Now the image processing work.... ***/ /*** Now the image processing work.... ***/
/* Transform processes each frame. */ /* Transform processes each frame. */

View file

@ -81,6 +81,7 @@ struct _GstExclusionClass
}; };
GType gst_exclusion_get_type (void); GType gst_exclusion_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (exclusion);
G_END_DECLS G_END_DECLS

View file

@ -66,7 +66,6 @@
#include <math.h> #include <math.h>
#include <gst/gst.h> #include <gst/gst.h>
#include "gstplugin.h"
#include "gstgaussblur.h" #include "gstgaussblur.h"
static void gst_gaussianblur_finalize (GObject * object); static void gst_gaussianblur_finalize (GObject * object);
@ -120,7 +119,10 @@ static void gaussian_smooth (GstGaussianBlur * gb, guint8 * image,
#define gst_gaussianblur_parent_class parent_class #define gst_gaussianblur_parent_class parent_class
G_DEFINE_TYPE (GstGaussianBlur, gst_gaussianblur, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstGaussianBlur, gst_gaussianblur, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (gaussianblur, "gaussianblur",
GST_RANK_NONE, GST_TYPE_GAUSSIANBLUR,
GST_DEBUG_CATEGORY_INIT (gst_gauss_blur_debug, "gaussianblur", 0,
"Gaussian Blur video effect"));
#define DEFAULT_SIGMA 1.2 #define DEFAULT_SIGMA 1.2
/* Initialize the gaussianblur's class. */ /* Initialize the gaussianblur's class. */
@ -452,15 +454,3 @@ gst_gaussianblur_get_property (GObject * object,
break; break;
} }
} }
/* Register the element factories and other features. */
gboolean
gst_gauss_blur_plugin_init (GstPlugin * plugin)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_gauss_blur_debug, "gaussianblur",
0, "Gaussian Blur video effect");
return gst_element_register (plugin, "gaussianblur", GST_RANK_NONE,
GST_TYPE_GAUSSIANBLUR);
}

View file

@ -81,6 +81,7 @@ struct _GstGaussianBlurClass
}; };
GType gst_gaussianblur_get_type(void); GType gst_gaussianblur_get_type(void);
GST_ELEMENT_REGISTER_DECLARE (gaussianblur);
G_END_DECLS G_END_DECLS

View file

@ -49,7 +49,14 @@
#include <gst/gst.h> #include <gst/gst.h>
#include "gstplugin.h" #include "gstburn.h"
#include "gstchromium.h"
#include "gstdilate.h"
#include "gstdodge.h"
#include "gstexclusion.h"
#include "gstgaussblur.h"
#include "gstsolarize.h"
/* PACKAGE: this is usually set by autotools depending on some _INIT macro /* PACKAGE: this is usually set by autotools depending on some _INIT macro
* in configure.ac and then written into and defined in config.h, but we can * in configure.ac and then written into and defined in config.h, but we can
@ -63,15 +70,15 @@
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gboolean ret = TRUE; gboolean ret = FALSE;
ret &= gst_burn_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (burn, plugin);
ret &= gst_chromium_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (chromium, plugin);
ret &= gst_dilate_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (dilate, plugin);
ret &= gst_dodge_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (dodge, plugin);
ret &= gst_exclusion_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (exclusion, plugin);
ret &= gst_solarize_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (solarize, plugin);
ret &= gst_gauss_blur_plugin_init (plugin); ret |= GST_ELEMENT_REGISTER (gaussianblur, plugin);
return ret; return ret;
} }

View file

@ -1,63 +0,0 @@
/*
* GStreamer
* Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
* Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* Copyright (C) 2010 Luis de Bethencourt <luis@debethencourt.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
* Alternatively, the contents of this file may be used under the
* GNU Lesser General Public License Version 2.1 (the "LGPL"), in
* which case the following provisions apply instead of the ones
* mentioned above:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_GAUDI_EFFECTS_H__
#define __GST_GAUDI_EFFECTS_H__
#include <gst/gst.h>
G_BEGIN_DECLS
gboolean gst_burn_plugin_init (GstPlugin *plugin);
gboolean gst_chromium_plugin_init (GstPlugin *plugin);
gboolean gst_dilate_plugin_init (GstPlugin *plugin);
gboolean gst_dodge_plugin_init (GstPlugin *plugin);
gboolean gst_exclusion_plugin_init (GstPlugin *plugin);
gboolean gst_gauss_blur_plugin_init (GstPlugin *plugin);
gboolean gst_solarize_plugin_init (GstPlugin *plugin);
G_END_DECLS
#endif /* __GST_GAUDI_EFFECTS_H__ */

View file

@ -64,7 +64,6 @@
#include <gst/gst.h> #include <gst/gst.h>
#include <math.h> #include <math.h>
#include "gstplugin.h"
#include "gstsolarize.h" #include "gstsolarize.h"
GST_DEBUG_CATEGORY_STATIC (gst_solarize_debug); GST_DEBUG_CATEGORY_STATIC (gst_solarize_debug);
@ -117,6 +116,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
#define gst_solarize_parent_class parent_class #define gst_solarize_parent_class parent_class
G_DEFINE_TYPE (GstSolarize, gst_solarize, GST_TYPE_VIDEO_FILTER); G_DEFINE_TYPE (GstSolarize, gst_solarize, GST_TYPE_VIDEO_FILTER);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (solarize, "solarize", GST_RANK_NONE,
GST_TYPE_SOLARIZE, GST_DEBUG_CATEGORY_INIT (gst_solarize_debug, "solarize",
0, "Template solarize"));
static void gst_solarize_set_property (GObject * object, guint prop_id, static void gst_solarize_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec); const GValue * value, GParamSpec * pspec);
@ -278,19 +280,6 @@ gst_solarize_transform_frame (GstVideoFilter * vfilter,
return GST_FLOW_OK; return GST_FLOW_OK;
} }
/* Entry point to initialize the plug-in.
* Register the element factories and other features. */
gboolean
gst_solarize_plugin_init (GstPlugin * solarize)
{
/* debug category for fltering log messages */
GST_DEBUG_CATEGORY_INIT (gst_solarize_debug, "solarize",
0, "Template solarize");
return gst_element_register (solarize, "solarize", GST_RANK_NONE,
GST_TYPE_SOLARIZE);
}
/*** Now the image processing work.... ***/ /*** Now the image processing work.... ***/
/* Transform processes each frame. */ /* Transform processes each frame. */

View file

@ -81,6 +81,7 @@ struct _GstSolarizeClass
}; };
GType gst_solarize_get_type (void); GType gst_solarize_get_type (void);
GST_ELEMENT_REGISTER_DECLARE (solarize);
G_END_DECLS G_END_DECLS

View file

@ -23,21 +23,17 @@
#include "dataprotocol.h" #include "dataprotocol.h"
#include "gstgdppay.h" #include "gstgdpelements.h"
#include "gstgdpdepay.h"
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
gst_dp_init (); gboolean ret = FALSE;
if (!gst_gdp_depay_plugin_init (plugin)) ret |= GST_ELEMENT_REGISTER (gdpdepay, plugin);
return FALSE; ret |= GST_ELEMENT_REGISTER (gdppay, plugin);
if (!gst_gdp_pay_plugin_init (plugin)) return ret;
return FALSE;
return TRUE;
} }
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR,

Some files were not shown because too many files have changed in this diff Show more