summaryrefslogtreecommitdiffstats
path: root/gst/rtpmux/gstrtpmux.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-20 17:43:39 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.co.uk>2009-04-20 20:23:37 -0400
commit655a3d125a31ec8953a6dcc3567087f4fbe4a84d (patch)
treec9e0b0c7b67128ed67aa9b4240b5cc21f08ec3fb /gst/rtpmux/gstrtpmux.c
parent5af0efd1d31d037220d10b5b0d1e8aa3fb31bcac (diff)
downloadgst-plugins-bad-655a3d125a31ec8953a6dcc3567087f4fbe4a84d.tar.gz
gst-plugins-bad-655a3d125a31ec8953a6dcc3567087f4fbe4a84d.tar.bz2
gst-plugins-bad-655a3d125a31ec8953a6dcc3567087f4fbe4a84d.zip
rtpmux: Use GST_BOILERPLATE
Diffstat (limited to 'gst/rtpmux/gstrtpmux.c')
-rw-r--r--gst/rtpmux/gstrtpmux.c50
1 files changed, 9 insertions, 41 deletions
diff --git a/gst/rtpmux/gstrtpmux.c b/gst/rtpmux/gstrtpmux.c
index 00782bbe..5cb86e18 100644
--- a/gst/rtpmux/gstrtpmux.c
+++ b/gst/rtpmux/gstrtpmux.c
@@ -81,10 +81,6 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
GST_STATIC_CAPS ("application/x-rtp")
);
-static void gst_rtp_mux_base_init (gpointer g_class);
-static void gst_rtp_mux_class_init (GstRTPMuxClass * klass);
-static void gst_rtp_mux_init (GstRTPMux * rtp_mux);
-
static void gst_rtp_mux_finalize (GObject * object);
static GstPad *gst_rtp_mux_request_new_pad (GstElement * element,
@@ -102,34 +98,8 @@ static void gst_rtp_mux_set_property (GObject * object, guint prop_id,
static void gst_rtp_mux_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static gboolean gst_rtp_mux_src_event (GstPad * pad, GstEvent * event);
-
-static GstElementClass *parent_class = NULL;
-GType
-gst_rtp_mux_get_type (void)
-{
- static GType rtp_mux_type = 0;
-
- if (!rtp_mux_type) {
- static const GTypeInfo rtp_mux_info = {
- sizeof (GstRTPMuxClass),
- gst_rtp_mux_base_init,
- NULL,
- (GClassInitFunc) gst_rtp_mux_class_init,
- NULL,
- NULL,
- sizeof (GstRTPMux),
- 0,
- (GInstanceInitFunc) gst_rtp_mux_init,
- };
-
- rtp_mux_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRTPMux",
- &rtp_mux_info, 0);
- }
- return rtp_mux_type;
-}
+GST_BOILERPLATE (GstRTPMux, gst_rtp_mux, GstElement, GST_TYPE_ELEMENT);
static void
gst_rtp_mux_base_init (gpointer g_class)
@@ -153,8 +123,6 @@ gst_rtp_mux_class_init (GstRTPMuxClass * klass)
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
- parent_class = g_type_class_peek_parent (klass);
-
gobject_class->finalize = gst_rtp_mux_finalize;
gobject_class->get_property = gst_rtp_mux_get_property;
gobject_class->set_property = gst_rtp_mux_set_property;
@@ -225,20 +193,20 @@ gst_rtp_mux_src_event (GstPad * pad, GstEvent * event)
}
static void
-gst_rtp_mux_init (GstRTPMux * rtp_mux)
+gst_rtp_mux_init (GstRTPMux * object, GstRTPMuxClass * g_class)
{
- GstElementClass *klass = GST_ELEMENT_GET_CLASS (rtp_mux);
+ GstElementClass *klass = GST_ELEMENT_GET_CLASS (object);
- rtp_mux->srcpad =
+ object->srcpad =
gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
"src"), "src");
- gst_pad_set_event_function (rtp_mux->srcpad,
+ gst_pad_set_event_function (object->srcpad,
GST_DEBUG_FUNCPTR (gst_rtp_mux_src_event));
- gst_element_add_pad (GST_ELEMENT (rtp_mux), rtp_mux->srcpad);
+ gst_element_add_pad (GST_ELEMENT (object), object->srcpad);
- rtp_mux->ssrc = DEFAULT_SSRC;
- rtp_mux->ts_offset = DEFAULT_TIMESTAMP_OFFSET;
- rtp_mux->seqnum_offset = DEFAULT_SEQNUM_OFFSET;
+ object->ssrc = DEFAULT_SSRC;
+ object->ts_offset = DEFAULT_TIMESTAMP_OFFSET;
+ object->seqnum_offset = DEFAULT_SEQNUM_OFFSET;
}
static void