Commit 5d4fd722 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

rtp: Use G_DEFINE_TYPE instead of GST_BOILERPLATE

parent 0759ce85
......@@ -161,13 +161,9 @@ static GstStateChangeReturn gst_base_rtp_payload_audio_change_state (GstElement
static gboolean gst_base_rtp_payload_audio_handle_event (GstPad * pad,
GstEvent * event);
GST_BOILERPLATE (GstBaseRTPAudioPayload, gst_base_rtp_audio_payload,
GstBaseRTPPayload, GST_TYPE_BASE_RTP_PAYLOAD);
static void
gst_base_rtp_audio_payload_base_init (gpointer klass)
{
}
#define gst_base_rtp_audio_payload_parent_class parent_class
G_DEFINE_TYPE (GstBaseRTPAudioPayload, gst_base_rtp_audio_payload,
GST_TYPE_BASE_RTP_PAYLOAD);
static void
gst_base_rtp_audio_payload_class_init (GstBaseRTPAudioPayloadClass * klass)
......@@ -204,8 +200,7 @@ gst_base_rtp_audio_payload_class_init (GstBaseRTPAudioPayloadClass * klass)
}
static void
gst_base_rtp_audio_payload_init (GstBaseRTPAudioPayload * payload,
GstBaseRTPAudioPayloadClass * klass)
gst_base_rtp_audio_payload_init (GstBaseRTPAudioPayload * payload)
{
payload->priv = GST_BASE_RTP_AUDIO_PAYLOAD_GET_PRIVATE (payload);
......
......@@ -100,15 +100,38 @@ static gboolean gst_base_rtp_depayload_packet_lost (GstBaseRTPDepayload *
static gboolean gst_base_rtp_depayload_handle_event (GstBaseRTPDepayload *
filter, GstEvent * event);
GST_BOILERPLATE (GstBaseRTPDepayload, gst_base_rtp_depayload, GstElement,
GST_TYPE_ELEMENT);
static void
gst_base_rtp_depayload_base_init (gpointer klass)
static GstElementClass *parent_class = NULL;
static void gst_base_rtp_depayload_class_init (GstBaseRTPDepayloadClass *
klass);
static void gst_base_rtp_depayload_init (GstBaseRTPDepayload * basertppayload,
GstBaseRTPDepayloadClass * klass);
GType
gst_base_rtp_depayload_get_type (void)
{
/*GstElementClass *element_class = GST_ELEMENT_CLASS (klass); */
static GType base_rtp_depayload_type = 0;
if (g_once_init_enter ((gsize *) & base_rtp_depayload_type)) {
static const GTypeInfo base_rtp_depayload_info = {
sizeof (GstBaseRTPDepayloadClass),
NULL,
NULL,
(GClassInitFunc) gst_base_rtp_depayload_class_init,
NULL,
NULL,
sizeof (GstBaseRTPDepayload),
0,
(GInstanceInitFunc) gst_base_rtp_depayload_init,
};
g_once_init_leave ((gsize *) & base_rtp_depayload_type,
g_type_register_static (GST_TYPE_ELEMENT, "GstBaseRTPDepayload",
&base_rtp_depayload_info, G_TYPE_FLAG_ABSTRACT));
}
return base_rtp_depayload_type;
}
static void
gst_base_rtp_depayload_class_init (GstBaseRTPDepayloadClass * klass)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment