mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
gst/base/gstpushsrc.c: Shorten by 30% via use of boilerplate macro.
Original commit message from CVS: 2005-11-05 Andy Wingo <wingo@pobox.com> * gst/base/gstpushsrc.c: Shorten by 30% via use of boilerplate macro.
This commit is contained in:
parent
fd15eb56af
commit
fe7eeac197
3 changed files with 23 additions and 110 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-11-05 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* gst/base/gstpushsrc.c: Shorten by 30% via use of boilerplate
|
||||||
|
macro.
|
||||||
|
|
||||||
2005-11-04 Stefan Kost <ensonic@users.sf.net>
|
2005-11-04 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
|
|
@ -55,51 +55,12 @@
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_push_src_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_push_src_debug);
|
||||||
#define GST_CAT_DEFAULT gst_push_src_debug
|
#define GST_CAT_DEFAULT gst_push_src_debug
|
||||||
|
|
||||||
/* PushSrc signals and args */
|
#define _do_init(type) \
|
||||||
enum
|
GST_DEBUG_CATEGORY_INIT (gst_push_src_debug, "pushsrc", 0, \
|
||||||
{
|
"pushsrc element");
|
||||||
/* FILL ME */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
GST_BOILERPLATE_FULL (GstPushSrc, gst_push_src, GstBaseSrc, GST_TYPE_BASE_SRC,
|
||||||
{
|
_do_init);
|
||||||
PROP_0,
|
|
||||||
};
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
|
|
||||||
static void gst_push_src_base_init (gpointer g_class);
|
|
||||||
static void gst_push_src_class_init (GstPushSrcClass * klass);
|
|
||||||
static void gst_push_src_init (GstPushSrc * src, gpointer g_class);
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_push_src_get_type (void)
|
|
||||||
{
|
|
||||||
static GType push_src_type = 0;
|
|
||||||
|
|
||||||
if (!push_src_type) {
|
|
||||||
static const GTypeInfo push_src_info = {
|
|
||||||
sizeof (GstPushSrcClass),
|
|
||||||
(GBaseInitFunc) gst_push_src_base_init,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_push_src_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstPushSrc),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_push_src_init,
|
|
||||||
};
|
|
||||||
|
|
||||||
push_src_type = g_type_register_static (GST_TYPE_BASE_SRC,
|
|
||||||
"GstPushSrc", &push_src_info, G_TYPE_FLAG_ABSTRACT);
|
|
||||||
}
|
|
||||||
return push_src_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static const GstEventMask *gst_push_src_get_event_mask (GstPad * pad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
|
static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
|
||||||
guint length, GstBuffer ** ret);
|
guint length, GstBuffer ** ret);
|
||||||
|
@ -107,28 +68,21 @@ static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
|
||||||
static void
|
static void
|
||||||
gst_push_src_base_init (gpointer g_class)
|
gst_push_src_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_push_src_debug, "pushsrc", 0, "pushsrc element");
|
/* nop */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_push_src_class_init (GstPushSrcClass * klass)
|
gst_push_src_class_init (GstPushSrcClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
|
||||||
GstElementClass *gstelement_class;
|
|
||||||
GstBaseSrcClass *gstbasesrc_class;
|
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
|
||||||
gstelement_class = (GstElementClass *) klass;
|
|
||||||
gstbasesrc_class = (GstBaseSrcClass *) klass;
|
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_BASE_SRC);
|
|
||||||
|
|
||||||
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_push_src_create);
|
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_push_src_create);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_push_src_init (GstPushSrc * pushsrc, gpointer g_class)
|
gst_push_src_init (GstPushSrc * pushsrc, GstPushSrcClass * klass)
|
||||||
{
|
{
|
||||||
|
/* nop */
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
|
|
@ -55,51 +55,12 @@
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_push_src_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_push_src_debug);
|
||||||
#define GST_CAT_DEFAULT gst_push_src_debug
|
#define GST_CAT_DEFAULT gst_push_src_debug
|
||||||
|
|
||||||
/* PushSrc signals and args */
|
#define _do_init(type) \
|
||||||
enum
|
GST_DEBUG_CATEGORY_INIT (gst_push_src_debug, "pushsrc", 0, \
|
||||||
{
|
"pushsrc element");
|
||||||
/* FILL ME */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
GST_BOILERPLATE_FULL (GstPushSrc, gst_push_src, GstBaseSrc, GST_TYPE_BASE_SRC,
|
||||||
{
|
_do_init);
|
||||||
PROP_0,
|
|
||||||
};
|
|
||||||
|
|
||||||
static GstElementClass *parent_class = NULL;
|
|
||||||
|
|
||||||
static void gst_push_src_base_init (gpointer g_class);
|
|
||||||
static void gst_push_src_class_init (GstPushSrcClass * klass);
|
|
||||||
static void gst_push_src_init (GstPushSrc * src, gpointer g_class);
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_push_src_get_type (void)
|
|
||||||
{
|
|
||||||
static GType push_src_type = 0;
|
|
||||||
|
|
||||||
if (!push_src_type) {
|
|
||||||
static const GTypeInfo push_src_info = {
|
|
||||||
sizeof (GstPushSrcClass),
|
|
||||||
(GBaseInitFunc) gst_push_src_base_init,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_push_src_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstPushSrc),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_push_src_init,
|
|
||||||
};
|
|
||||||
|
|
||||||
push_src_type = g_type_register_static (GST_TYPE_BASE_SRC,
|
|
||||||
"GstPushSrc", &push_src_info, G_TYPE_FLAG_ABSTRACT);
|
|
||||||
}
|
|
||||||
return push_src_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
static const GstEventMask *gst_push_src_get_event_mask (GstPad * pad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
|
static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
|
||||||
guint length, GstBuffer ** ret);
|
guint length, GstBuffer ** ret);
|
||||||
|
@ -107,28 +68,21 @@ static GstFlowReturn gst_push_src_create (GstBaseSrc * bsrc, guint64 offset,
|
||||||
static void
|
static void
|
||||||
gst_push_src_base_init (gpointer g_class)
|
gst_push_src_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_push_src_debug, "pushsrc", 0, "pushsrc element");
|
/* nop */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_push_src_class_init (GstPushSrcClass * klass)
|
gst_push_src_class_init (GstPushSrcClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GstBaseSrcClass *gstbasesrc_class = (GstBaseSrcClass *) klass;
|
||||||
GstElementClass *gstelement_class;
|
|
||||||
GstBaseSrcClass *gstbasesrc_class;
|
|
||||||
|
|
||||||
gobject_class = (GObjectClass *) klass;
|
|
||||||
gstelement_class = (GstElementClass *) klass;
|
|
||||||
gstbasesrc_class = (GstBaseSrcClass *) klass;
|
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_BASE_SRC);
|
|
||||||
|
|
||||||
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_push_src_create);
|
gstbasesrc_class->create = GST_DEBUG_FUNCPTR (gst_push_src_create);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_push_src_init (GstPushSrc * pushsrc, gpointer g_class)
|
gst_push_src_init (GstPushSrc * pushsrc, GstPushSrcClass * klass)
|
||||||
{
|
{
|
||||||
|
/* nop */
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
|
|
Loading…
Reference in a new issue