mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
[MOVED FROM GST-P-FARSIGHT] Port mimic plugins to GST_BOILERPLATE
20080704205010-3e2dc-da41e5685ab9ceb67555d499125432cd12d5505d.gz
This commit is contained in:
parent
c6396458b7
commit
e76cd30d7f
4 changed files with 10 additions and 71 deletions
|
@ -59,9 +59,6 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
)
|
||||
);
|
||||
|
||||
static void gst_mimdec_class_init (GstMimDecClass *klass);
|
||||
static void gst_mimdec_base_init (GstMimDecClass *klass);
|
||||
static void gst_mimdec_init (GstMimDec *mimdec);
|
||||
static void gst_mimdec_finalize (GObject *object);
|
||||
|
||||
static GstFlowReturn gst_mimdec_chain (GstPad *pad,
|
||||
|
@ -72,36 +69,11 @@ static GstStateChangeReturn
|
|||
gst_mimdec_change_state (GstElement *element,
|
||||
GstStateChange transition);
|
||||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gst_gst_mimdec_get_type (void)
|
||||
{
|
||||
static GType plugin_type = 0;
|
||||
|
||||
if (!plugin_type)
|
||||
{
|
||||
static const GTypeInfo plugin_info =
|
||||
{
|
||||
sizeof (GstMimDecClass),
|
||||
(GBaseInitFunc) gst_mimdec_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc) gst_mimdec_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GstMimDec),
|
||||
0,
|
||||
(GInstanceInitFunc) gst_mimdec_init,
|
||||
};
|
||||
plugin_type = g_type_register_static (GST_TYPE_ELEMENT,
|
||||
"GstMimDec",
|
||||
&plugin_info, 0);
|
||||
}
|
||||
return plugin_type;
|
||||
}
|
||||
GST_BOILERPLATE (GstMimDec, gst_mimdec, GstElement, GST_TYPE_ELEMENT);
|
||||
|
||||
static void
|
||||
gst_mimdec_base_init (GstMimDecClass *klass)
|
||||
gst_mimdec_base_init (gpointer klass)
|
||||
{
|
||||
static GstElementDetails plugin_details = {
|
||||
"MimDec",
|
||||
|
@ -134,13 +106,11 @@ gst_mimdec_class_init (GstMimDecClass *klass)
|
|||
|
||||
gobject_class->finalize = gst_mimdec_finalize;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (mimdec_debug, "mimdec", 0, "Mimic decoder plugin");
|
||||
}
|
||||
|
||||
static void
|
||||
gst_mimdec_init (GstMimDec *mimdec)
|
||||
gst_mimdec_init (GstMimDec *mimdec, GstMimDecClass *klass)
|
||||
{
|
||||
mimdec->sinkpad = gst_pad_new_from_template (
|
||||
gst_static_pad_template_get (&sink_factory), "sink");
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MIMDEC \
|
||||
(gst_gst_mimdec_get_type())
|
||||
(gst_mimdec_get_type())
|
||||
#define GST_MIMDEC(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIMDEC,GstMimDec))
|
||||
#define GST_MIMDEC_CLASS(klass) \
|
||||
|
@ -65,7 +65,7 @@ struct _GstMimDecClass
|
|||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_gst_mimdec_get_type (void);
|
||||
GType gst_mimdec_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -71,10 +71,6 @@ GST_STATIC_PAD_TEMPLATE (
|
|||
);
|
||||
|
||||
|
||||
static void gst_mimenc_class_init (GstMimEncClass *klass);
|
||||
static void gst_mimenc_base_init (GstMimEncClass *klass);
|
||||
static void gst_mimenc_init (GstMimEnc *mimenc);
|
||||
|
||||
static gboolean gst_mimenc_setcaps (GstPad *pad,
|
||||
GstCaps *caps);
|
||||
static GstFlowReturn gst_mimenc_chain (GstPad *pad,
|
||||
|
@ -86,36 +82,11 @@ static GstStateChangeReturn
|
|||
gst_mimenc_change_state (GstElement *element,
|
||||
GstStateChange transition);
|
||||
|
||||
static GstElementClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gst_gst_mimenc_get_type (void)
|
||||
{
|
||||
static GType plugin_type = 0;
|
||||
|
||||
if (!plugin_type)
|
||||
{
|
||||
static const GTypeInfo plugin_info =
|
||||
{
|
||||
sizeof (GstMimEncClass),
|
||||
(GBaseInitFunc) gst_mimenc_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc) gst_mimenc_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof (GstMimEnc),
|
||||
0,
|
||||
(GInstanceInitFunc) gst_mimenc_init,
|
||||
};
|
||||
plugin_type = g_type_register_static (GST_TYPE_ELEMENT,
|
||||
"GstMimEnc",
|
||||
&plugin_info, 0);
|
||||
}
|
||||
return plugin_type;
|
||||
}
|
||||
GST_BOILERPLATE (GstMimEnc, gst_mimenc, GstElement, GST_TYPE_ELEMENT);
|
||||
|
||||
static void
|
||||
gst_mimenc_base_init (GstMimEncClass *klass)
|
||||
gst_mimenc_base_init (gpointer klass)
|
||||
{
|
||||
static GstElementDetails plugin_details = {
|
||||
"MimEnc",
|
||||
|
@ -142,13 +113,11 @@ gst_mimenc_class_init (GstMimEncClass *klass)
|
|||
gstelement_class = (GstElementClass*) klass;
|
||||
gstelement_class->change_state = gst_mimenc_change_state;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (mimenc_debug, "mimenc", 0, "Mimic encoder plugin");
|
||||
}
|
||||
|
||||
static void
|
||||
gst_mimenc_init (GstMimEnc *mimenc)
|
||||
gst_mimenc_init (GstMimEnc *mimenc, GstMimEncClass *klass)
|
||||
{
|
||||
mimenc->sinkpad = gst_pad_new_from_template (
|
||||
gst_static_pad_template_get (&sink_factory), "sink");
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_MIMENC \
|
||||
(gst_gst_mimenc_get_type())
|
||||
(gst_mimenc_get_type())
|
||||
#define GST_MIMENC(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MIMENC,GstMimEnc))
|
||||
#define GST_MIMENC_CLASS(klass) \
|
||||
|
@ -62,7 +62,7 @@ struct _GstMimEncClass
|
|||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_gst_mimenc_get_type (void);
|
||||
GType gst_mimenc_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue