mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
rtp: Use G_DEFINE_TYPE instead of GST_BOILERPLATE
This commit is contained in:
parent
0759ce8533
commit
5d4fd722f0
2 changed files with 32 additions and 14 deletions
|
@ -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,
|
static gboolean gst_base_rtp_payload_audio_handle_event (GstPad * pad,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
|
|
||||||
GST_BOILERPLATE (GstBaseRTPAudioPayload, gst_base_rtp_audio_payload,
|
#define gst_base_rtp_audio_payload_parent_class parent_class
|
||||||
GstBaseRTPPayload, GST_TYPE_BASE_RTP_PAYLOAD);
|
G_DEFINE_TYPE (GstBaseRTPAudioPayload, gst_base_rtp_audio_payload,
|
||||||
|
GST_TYPE_BASE_RTP_PAYLOAD);
|
||||||
static void
|
|
||||||
gst_base_rtp_audio_payload_base_init (gpointer klass)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_base_rtp_audio_payload_class_init (GstBaseRTPAudioPayloadClass * klass)
|
gst_base_rtp_audio_payload_class_init (GstBaseRTPAudioPayloadClass * klass)
|
||||||
|
@ -204,8 +200,7 @@ gst_base_rtp_audio_payload_class_init (GstBaseRTPAudioPayloadClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_base_rtp_audio_payload_init (GstBaseRTPAudioPayload * payload,
|
gst_base_rtp_audio_payload_init (GstBaseRTPAudioPayload * payload)
|
||||||
GstBaseRTPAudioPayloadClass * klass)
|
|
||||||
{
|
{
|
||||||
payload->priv = GST_BASE_RTP_AUDIO_PAYLOAD_GET_PRIVATE (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 *
|
static gboolean gst_base_rtp_depayload_handle_event (GstBaseRTPDepayload *
|
||||||
filter, GstEvent * event);
|
filter, GstEvent * event);
|
||||||
|
|
||||||
GST_BOILERPLATE (GstBaseRTPDepayload, gst_base_rtp_depayload, GstElement,
|
static GstElementClass *parent_class = NULL;
|
||||||
GST_TYPE_ELEMENT);
|
static void gst_base_rtp_depayload_class_init (GstBaseRTPDepayloadClass *
|
||||||
|
klass);
|
||||||
|
static void gst_base_rtp_depayload_init (GstBaseRTPDepayload * basertppayload,
|
||||||
|
GstBaseRTPDepayloadClass * klass);
|
||||||
|
|
||||||
static void
|
GType
|
||||||
gst_base_rtp_depayload_base_init (gpointer klass)
|
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
|
static void
|
||||||
gst_base_rtp_depayload_class_init (GstBaseRTPDepayloadClass * klass)
|
gst_base_rtp_depayload_class_init (GstBaseRTPDepayloadClass * klass)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue