Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gst-plugins-good
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
60db07b4
Commit
60db07b4
authored
Apr 25, 2011
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp: port some more (de)payloaders
parent
237ca163
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
222 additions
and
282 deletions
+222
-282
gst/rtp/gstrtpac3depay.c
gst/rtp/gstrtpac3depay.c
+12
-18
gst/rtp/gstrtpac3pay.c
gst/rtp/gstrtpac3pay.c
+16
-21
gst/rtp/gstrtpbvdepay.c
gst/rtp/gstrtpbvdepay.c
+13
-16
gst/rtp/gstrtpbvpay.c
gst/rtp/gstrtpbvpay.c
+16
-19
gst/rtp/gstrtpceltdepay.c
gst/rtp/gstrtpceltdepay.c
+17
-20
gst/rtp/gstrtpceltpay.c
gst/rtp/gstrtpceltpay.c
+16
-21
gst/rtp/gstrtpdepay.c
gst/rtp/gstrtpdepay.c
+6
-9
gst/rtp/gstrtpdvdepay.c
gst/rtp/gstrtpdvdepay.c
+16
-21
gst/rtp/gstrtpdvpay.c
gst/rtp/gstrtpdvpay.c
+19
-21
gst/rtp/gstrtpgstdepay.c
gst/rtp/gstrtpgstdepay.c
+16
-23
gst/rtp/gstrtpgstpay.c
gst/rtp/gstrtpgstpay.c
+13
-16
gst/rtp/gstrtpilbcdepay.c
gst/rtp/gstrtpilbcdepay.c
+15
-18
gst/rtp/gstrtpilbcpay.c
gst/rtp/gstrtpilbcpay.c
+16
-18
gst/rtp/gstrtpmpadepay.c
gst/rtp/gstrtpmpadepay.c
+15
-20
gst/rtp/gstrtpmpapay.c
gst/rtp/gstrtpmpapay.c
+16
-21
No files found.
gst/rtp/gstrtpac3depay.c
View file @
60db07b4
...
...
@@ -47,8 +47,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"encoding-name = (string)
\"
AC3
\"
"
)
);
GST_BOILERPLATE
(
GstRtpAC3Depay
,
gst_rtp_ac3_depay
,
GstBaseRTPDepayload
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
G_DEFINE_TYPE
(
GstRtpAC3Depay
,
gst_rtp_ac3_depay
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
static
gboolean
gst_rtp_ac3_depay_setcaps
(
GstBaseRTPDepayload
*
depayload
,
GstCaps
*
caps
);
...
...
@@ -56,27 +55,23 @@ static GstBuffer *gst_rtp_ac3_depay_process (GstBaseRTPDepayload * depayload,
GstBuffer
*
buf
);
static
void
gst_rtp_ac3_depay_
base_init
(
gpointer
klass
)
gst_rtp_ac3_depay_
class_init
(
GstRtpAC3DepayClass
*
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
GstElementClass
*
gstelement_class
;
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
element_class
,
gst_element_class_add_pad_template
(
gst
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_depay_src_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_element_class_add_pad_template
(
gst
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_depay_sink_template
));
gst_element_class_set_details_simple
(
element_class
,
"RTP AC3 depayloader"
,
gst_element_class_set_details_simple
(
gst
element_class
,
"RTP AC3 depayloader"
,
"Codec/Depayloader/Network/RTP"
,
"Extracts AC3 audio from RTP packets (RFC 4184)"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
}
static
void
gst_rtp_ac3_depay_class_init
(
GstRtpAC3DepayClass
*
klass
)
{
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
gstbasertpdepayload_class
->
set_caps
=
gst_rtp_ac3_depay_setcaps
;
gstbasertpdepayload_class
->
process
=
gst_rtp_ac3_depay_process
;
...
...
@@ -86,10 +81,9 @@ gst_rtp_ac3_depay_class_init (GstRtpAC3DepayClass * klass)
}
static
void
gst_rtp_ac3_depay_init
(
GstRtpAC3Depay
*
rtpac3depay
,
GstRtpAC3DepayClass
*
klass
)
gst_rtp_ac3_depay_init
(
GstRtpAC3Depay
*
rtpac3depay
)
{
/* needed because of G
ST_BOILERPLAT
E */
/* needed because of G
_DEFINE_TYP
E */
}
static
gboolean
...
...
gst/rtp/gstrtpac3pay.c
View file @
60db07b4
...
...
@@ -60,23 +60,8 @@ static GstFlowReturn gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay);
static
GstFlowReturn
gst_rtp_ac3_pay_handle_buffer
(
GstBaseRTPPayload
*
payload
,
GstBuffer
*
buffer
);
GST_BOILERPLATE
(
GstRtpAC3Pay
,
gst_rtp_ac3_pay
,
GstBaseRTPPayload
,
GST_TYPE_BASE_RTP_PAYLOAD
)
static
void
gst_rtp_ac3_pay_base_init
(
gpointer
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_pay_src_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_pay_sink_template
));
gst_element_class_set_details_simple
(
element_class
,
"RTP AC3 audio payloader"
,
"Codec/Payloader/Network/RTP"
,
"Payload AC3 audio as RTP packets (RFC 4184)"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
}
#define gst_rtp_ac3_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpAC3Pay
,
gst_rtp_ac3_pay
,
GST_TYPE_BASE_RTP_PAYLOAD
);
static
void
gst_rtp_ac3_pay_class_init
(
GstRtpAC3PayClass
*
klass
)
...
...
@@ -85,6 +70,9 @@ gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass)
GstElementClass
*
gstelement_class
;
GstBaseRTPPayloadClass
*
gstbasertppayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpac3pay_debug
,
"rtpac3pay"
,
0
,
"AC3 Audio RTP Depayloader"
);
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertppayload_class
=
(
GstBaseRTPPayloadClass
*
)
klass
;
...
...
@@ -93,16 +81,23 @@ gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass)
gstelement_class
->
change_state
=
gst_rtp_ac3_pay_change_state
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_pay_src_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_pay_sink_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP AC3 audio payloader"
,
"Codec/Payloader/Network/RTP"
,
"Payload AC3 audio as RTP packets (RFC 4184)"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbasertppayload_class
->
set_caps
=
gst_rtp_ac3_pay_setcaps
;
gstbasertppayload_class
->
handle_event
=
gst_rtp_ac3_pay_handle_event
;
gstbasertppayload_class
->
handle_buffer
=
gst_rtp_ac3_pay_handle_buffer
;
GST_DEBUG_CATEGORY_INIT
(
rtpac3pay_debug
,
"rtpac3pay"
,
0
,
"AC3 Audio RTP Depayloader"
);
}
static
void
gst_rtp_ac3_pay_init
(
GstRtpAC3Pay
*
rtpac3pay
,
GstRtpAC3PayClass
*
klass
)
gst_rtp_ac3_pay_init
(
GstRtpAC3Pay
*
rtpac3pay
)
{
rtpac3pay
->
adapter
=
gst_adapter_new
();
}
...
...
gst/rtp/gstrtpbvdepay.c
View file @
60db07b4
...
...
@@ -54,37 +54,34 @@ static GstBuffer *gst_rtp_bv_depay_process (GstBaseRTPDepayload * depayload,
static
gboolean
gst_rtp_bv_depay_setcaps
(
GstBaseRTPDepayload
*
depayload
,
GstCaps
*
caps
);
GST_BOILERPLATE
(
GstRTPBVDepay
,
gst_rtp_bv_depay
,
GstBaseRTPDepayload
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
#define gst_rtp_bv_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRTPBVDepay
,
gst_rtp_bv_depay
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
static
void
gst_rtp_bv_depay_
base_init
(
gpointer
klass
)
gst_rtp_bv_depay_
class_init
(
GstRTPBVDepayClass
*
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
GstElementClass
*
gstelement_class
;
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
element_class
,
gst_element_class_add_pad_template
(
gst
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_bv_depay_src_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_element_class_add_pad_template
(
gst
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_bv_depay_sink_template
));
gst_element_class_set_details_simple
(
element_class
,
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP BroadcomVoice depayloader"
,
"Codec/Depayloader/Network/RTP"
,
"Extracts BroadcomVoice audio from RTP packets (RFC 4298)"
,
"Wim Taymans <wim.taymans@collabora.co.uk>"
);
}
static
void
gst_rtp_bv_depay_class_init
(
GstRTPBVDepayClass
*
klass
)
{
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
gstbasertpdepayload_class
->
process
=
gst_rtp_bv_depay_process
;
gstbasertpdepayload_class
->
set_caps
=
gst_rtp_bv_depay_setcaps
;
}
static
void
gst_rtp_bv_depay_init
(
GstRTPBVDepay
*
rtpbvdepay
,
GstRTPBVDepayClass
*
klass
)
gst_rtp_bv_depay_init
(
GstRTPBVDepay
*
rtpbvdepay
)
{
rtpbvdepay
->
mode
=
-
1
;
}
...
...
gst/rtp/gstrtpbvpay.c
View file @
60db07b4
...
...
@@ -58,40 +58,37 @@ static GstCaps *gst_rtp_bv_pay_sink_getcaps (GstBaseRTPPayload * payload,
static
gboolean
gst_rtp_bv_pay_sink_setcaps
(
GstBaseRTPPayload
*
payload
,
GstCaps
*
caps
);
GST_BOILERPLATE
(
GstRTPBVPay
,
gst_rtp_bv_pay
,
GstBaseRTPAudioPayload
,
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD
);
#define gst_rtp_bv_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRTPBVPay
,
gst_rtp_bv_pay
,
GST_TYPE_BASE_RTP_AUDIO_PAYLOAD
);
static
void
gst_rtp_bv_pay_
base_init
(
gpointer
klass
)
gst_rtp_bv_pay_
class_init
(
GstRTPBVPayClass
*
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
GstElementClass
*
gstelement_class
;
GstBaseRTPPayloadClass
*
gstbasertppayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpbvpay_debug
,
"rtpbvpay"
,
0
,
"BroadcomVoice audio RTP payloader"
);
gst_element_class_add_pad_template
(
element_class
,
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertppayload_class
=
(
GstBaseRTPPayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_bv_pay_sink_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_element_class_add_pad_template
(
gst
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_bv_pay_src_template
));
gst_element_class_set_details_simple
(
element_class
,
"RTP BV Payloader"
,
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP BV Payloader"
,
"Codec/Payloader/Network/RTP"
,
"Packetize BroadcomVoice audio streams into RTP packets (RFC 4298)"
,
"Wim Taymans <wim.taymans@collabora.co.uk>"
);
}
static
void
gst_rtp_bv_pay_class_init
(
GstRTPBVPayClass
*
klass
)
{
GstBaseRTPPayloadClass
*
gstbasertppayload_class
;
gstbasertppayload_class
=
(
GstBaseRTPPayloadClass
*
)
klass
;
gstbasertppayload_class
->
set_caps
=
gst_rtp_bv_pay_sink_setcaps
;
gstbasertppayload_class
->
get_caps
=
gst_rtp_bv_pay_sink_getcaps
;
GST_DEBUG_CATEGORY_INIT
(
rtpbvpay_debug
,
"rtpbvpay"
,
0
,
"BroadcomVoice audio RTP payloader"
);
}
static
void
gst_rtp_bv_pay_init
(
GstRTPBVPay
*
rtpbvpay
,
GstRTPBVPayClass
*
klass
)
gst_rtp_bv_pay_init
(
GstRTPBVPay
*
rtpbvpay
)
{
GstBaseRTPAudioPayload
*
basertpaudiopayload
;
...
...
gst/rtp/gstrtpceltdepay.c
View file @
60db07b4
...
...
@@ -70,41 +70,38 @@ static GstBuffer *gst_rtp_celt_depay_process (GstBaseRTPDepayload * depayload,
static
gboolean
gst_rtp_celt_depay_setcaps
(
GstBaseRTPDepayload
*
depayload
,
GstCaps
*
caps
);
GST_BOILERPLATE
(
GstRtpCELTDepay
,
gst_rtp_celt_depay
,
GstBaseRTPDepayload
,
#define gst_rtp_celt_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpCELTDepay
,
gst_rtp_celt_depay
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
static
void
gst_rtp_celt_depay_
base_init
(
gpointer
klass
)
gst_rtp_celt_depay_
class_init
(
GstRtpCELTDepayClass
*
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_depay_src_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_depay_sink_template
));
gst_element_class_set_details_simple
(
element_class
,
"RTP CELT depayloader"
,
"Codec/Depayloader/Network/RTP"
,
"Extracts CELT audio from RTP packets"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
GstElementClass
*
gstelement_class
;
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpceltdepay_debug
,
"rtpceltdepay"
,
0
,
"CELT RTP Depayloader"
);
}
static
void
gst_rtp_celt_depay_class_init
(
GstRtpCELTDepayClass
*
klass
)
{
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_depay_src_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_depay_sink_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP CELT depayloader"
,
"Codec/Depayloader/Network/RTP"
,
"Extracts CELT audio from RTP packets"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbasertpdepayload_class
->
process
=
gst_rtp_celt_depay_process
;
gstbasertpdepayload_class
->
set_caps
=
gst_rtp_celt_depay_setcaps
;
}
static
void
gst_rtp_celt_depay_init
(
GstRtpCELTDepay
*
rtpceltdepay
,
GstRtpCELTDepayClass
*
klass
)
gst_rtp_celt_depay_init
(
GstRtpCELTDepay
*
rtpceltdepay
)
{
}
...
...
gst/rtp/gstrtpceltpay.c
View file @
60db07b4
...
...
@@ -62,26 +62,8 @@ static GstCaps *gst_rtp_celt_pay_getcaps (GstBaseRTPPayload * payload,
static
GstFlowReturn
gst_rtp_celt_pay_handle_buffer
(
GstBaseRTPPayload
*
payload
,
GstBuffer
*
buffer
);
GST_BOILERPLATE
(
GstRtpCELTPay
,
gst_rtp_celt_pay
,
GstBaseRTPPayload
,
GST_TYPE_BASE_RTP_PAYLOAD
);
static
void
gst_rtp_celt_pay_base_init
(
gpointer
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_pay_sink_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_pay_src_template
));
gst_element_class_set_details_simple
(
element_class
,
"RTP CELT payloader"
,
"Codec/Payloader/Network/RTP"
,
"Payload-encodes CELT audio into a RTP packet"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
GST_DEBUG_CATEGORY_INIT
(
rtpceltpay_debug
,
"rtpceltpay"
,
0
,
"CELT RTP Payloader"
);
}
#define gst_rtp_celt_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpCELTPay
,
gst_rtp_celt_pay
,
GST_TYPE_BASE_RTP_PAYLOAD
);
static
void
gst_rtp_celt_pay_class_init
(
GstRtpCELTPayClass
*
klass
)
...
...
@@ -90,6 +72,9 @@ gst_rtp_celt_pay_class_init (GstRtpCELTPayClass * klass)
GstElementClass
*
gstelement_class
;
GstBaseRTPPayloadClass
*
gstbasertppayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpceltpay_debug
,
"rtpceltpay"
,
0
,
"CELT RTP Payloader"
);
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertppayload_class
=
(
GstBaseRTPPayloadClass
*
)
klass
;
...
...
@@ -98,13 +83,23 @@ gst_rtp_celt_pay_class_init (GstRtpCELTPayClass * klass)
gstelement_class
->
change_state
=
gst_rtp_celt_pay_change_state
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_pay_sink_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_celt_pay_src_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP CELT payloader"
,
"Codec/Payloader/Network/RTP"
,
"Payload-encodes CELT audio into a RTP packet"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbasertppayload_class
->
set_caps
=
gst_rtp_celt_pay_setcaps
;
gstbasertppayload_class
->
get_caps
=
gst_rtp_celt_pay_getcaps
;
gstbasertppayload_class
->
handle_buffer
=
gst_rtp_celt_pay_handle_buffer
;
}
static
void
gst_rtp_celt_pay_init
(
GstRtpCELTPay
*
rtpceltpay
,
GstRtpCELTPayClass
*
klass
)
gst_rtp_celt_pay_init
(
GstRtpCELTPay
*
rtpceltpay
)
{
rtpceltpay
->
queue
=
g_queue_new
();
}
...
...
gst/rtp/gstrtpdepay.c
View file @
60db07b4
...
...
@@ -56,13 +56,15 @@ static GstFlowReturn gst_rtp_depay_chain_rtp (GstPad * pad, GstBuffer * buffer);
static
GstFlowReturn
gst_rtp_depay_chain_rtcp
(
GstPad
*
pad
,
GstBuffer
*
buffer
);
G
ST_BOILERPLATE
(
GstRTPDepay
,
gst_rtp_depay
,
GstElement
,
GST_TYPE_ELEMENT
);
G
_DEFINE_TYPE
(
GstRTPDepay
,
gst_rtp_depay
,
GST_TYPE_ELEMENT
);
static
void
gst_rtp_depay_
base_init
(
gpointer
klass
)
gst_rtp_depay_
class_init
(
GstRTPDepayClass
*
klass
)
{
GstElementClass
*
gstelement_class
=
GST_ELEMENT_CLASS
(
klass
);
GST_DEBUG_CATEGORY_INIT
(
rtpdepay_debug
,
"rtpdepay"
,
0
,
"RTP decoder"
);
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_depay_src_rtp_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
...
...
@@ -71,6 +73,7 @@ gst_rtp_depay_base_init (gpointer klass)
gst_static_pad_template_get
(
&
gst_rtp_depay_sink_rtp_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_depay_sink_rtcp_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
"Dummy RTP session manager"
,
"Codec/Depayloader/Network/RTP"
,
"Accepts raw RTP and RTCP packets and sends them forward"
,
...
...
@@ -78,13 +81,7 @@ gst_rtp_depay_base_init (gpointer klass)
}
static
void
gst_rtp_depay_class_init
(
GstRTPDepayClass
*
klass
)
{
GST_DEBUG_CATEGORY_INIT
(
rtpdepay_debug
,
"rtpdepay"
,
0
,
"RTP decoder"
);
}
static
void
gst_rtp_depay_init
(
GstRTPDepay
*
rtpdepay
,
GstRTPDepayClass
*
klass
)
gst_rtp_depay_init
(
GstRTPDepay
*
rtpdepay
)
{
/* the input rtp pad */
rtpdepay
->
sink_rtp
=
...
...
gst/rtp/gstrtpdvdepay.c
View file @
60db07b4
...
...
@@ -80,25 +80,10 @@ static GstBuffer *gst_rtp_dv_depay_process (GstBaseRTPDepayload * base,
static
gboolean
gst_rtp_dv_depay_setcaps
(
GstBaseRTPDepayload
*
depayload
,
GstCaps
*
caps
);
GST_BOILERPLATE
(
GstRTPDVDepay
,
gst_rtp_dv_depay
,
GstBaseRTPDepayload
,
GST_TYPE_BASE_RTP_DEPAYLOAD
)
#define gst_rtp_dv_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRTPDVDepay
,
gst_rtp_dv_depay
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
static
void
gst_rtp_dv_depay_base_init
(
gpointer
g_class
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
g_class
);
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
src_factory
));
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
sink_factory
));
gst_element_class_set_details_simple
(
element_class
,
"RTP DV Depayloader"
,
"Codec/Depayloader/Network/RTP"
,
"Depayloads DV from RTP packets (RFC 3189)"
,
"Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>"
);
}
/* initialize the plugin's class */
static
void
gst_rtp_dv_depay_class_init
(
GstRTPDVDepayClass
*
klass
)
{
...
...
@@ -106,16 +91,26 @@ gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass)
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
GST_DEBUG_CATEGORY_INIT
(
rtpdvdepay_debug
,
"rtpdvdepay"
,
0
,
"DV RTP Depayloader"
);
gstelement_class
->
change_state
=
GST_DEBUG_FUNCPTR
(
gst_rtp_dv_depay_change_state
);
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
src_factory
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
sink_factory
));
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP DV Depayloader"
,
"Codec/Depayloader/Network/RTP"
,
"Depayloads DV from RTP packets (RFC 3189)"
,
"Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>"
);
gstbasertpdepayload_class
->
process
=
GST_DEBUG_FUNCPTR
(
gst_rtp_dv_depay_process
);
gstbasertpdepayload_class
->
set_caps
=
GST_DEBUG_FUNCPTR
(
gst_rtp_dv_depay_setcaps
);
GST_DEBUG_CATEGORY_INIT
(
rtpdvdepay_debug
,
"rtpdvdepay"
,
0
,
"DV RTP Depayloader"
);
}
/* initialize the new element
...
...
@@ -124,7 +119,7 @@ gst_rtp_dv_depay_class_init (GstRTPDVDepayClass * klass)
* initialize structure
*/
static
void
gst_rtp_dv_depay_init
(
GstRTPDVDepay
*
filter
,
GstRTPDVDepayClass
*
klass
)
gst_rtp_dv_depay_init
(
GstRTPDVDepay
*
filter
)
{
}
...
...
gst/rtp/gstrtpdvpay.c
View file @
60db07b4
...
...
@@ -94,49 +94,47 @@ static void gst_dv_pay_set_property (GObject * object,
static
void
gst_dv_pay_get_property
(
GObject
*
object
,
guint
prop_id
,
GValue
*
value
,
GParamSpec
*
pspec
);
GST_BOILERPLATE
(
GstRTPDVPay
,
gst_rtp_dv_pay
,
GstBaseRTPPayload
,
GST_TYPE_BASE_RTP_PAYLOAD
)
static
void
gst_rtp_dv_pay_base_init
(
gpointer
g_class
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
g_class
);
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_dv_pay_sink_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_dv_pay_src_template
));
gst_element_class_set_details_simple
(
element_class
,
"RTP DV Payloader"
,
"Codec/Payloader/Network/RTP"
,
"Payloads DV into RTP packets (RFC 3189)"
,
"Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>"
);
}
#define gst_rtp_dv_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRTPDVPay
,
gst_rtp_dv_pay
,
GST_TYPE_BASE_RTP_PAYLOAD
);
static
void
gst_rtp_dv_pay_class_init
(
GstRTPDVPayClass
*
klass
)
{
GObjectClass
*
gobject_class
;
GstElementClass
*
gstelement_class
;
GstBaseRTPPayloadClass
*
gstbasertppayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpdvpay_debug
,
"rtpdvpay"
,
0
,
"DV RTP Payloader"
);
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertppayload_class
=
(
GstBaseRTPPayloadClass
*
)
klass
;
gobject_class
->
set_property
=
gst_dv_pay_set_property
;
gobject_class
->
get_property
=
gst_dv_pay_get_property
;
gstbasertppayload_class
->
set_caps
=
gst_rtp_dv_pay_setcaps
;
gstbasertppayload_class
->
handle_buffer
=
gst_rtp_dv_pay_handle_buffer
;
g_object_class_install_property
(
gobject_class
,
PROP_MODE
,
g_param_spec_enum
(
"mode"
,
"Mode"
,
"The payload mode of payloading"
,
GST_TYPE_DV_PAY_MODE
,
DEFAULT_MODE
,
G_PARAM_READWRITE
|
G_PARAM_STATIC_STRINGS
));
GST_DEBUG_CATEGORY_INIT
(
rtpdvpay_debug
,
"rtpdvpay"
,
0
,
"DV RTP Payloader"
);
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_dv_pay_sink_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_dv_pay_src_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
"RTP DV Payloader"
,
"Codec/Payloader/Network/RTP"
,
"Payloads DV into RTP packets (RFC 3189)"
,
"Marcel Moreaux <marcelm@spacelabs.nl>, Wim Taymans <wim.taymans@gmail.com>"
);
gstbasertppayload_class
->
set_caps
=
gst_rtp_dv_pay_setcaps
;
gstbasertppayload_class
->
handle_buffer
=
gst_rtp_dv_pay_handle_buffer
;
}
static
void
gst_rtp_dv_pay_init
(
GstRTPDVPay
*
rtpdvpay
,
GstRTPDVPayClass
*
klass
)
gst_rtp_dv_pay_init
(
GstRTPDVPay
*
rtpdvpay
)
{
}
...
...
gst/rtp/gstrtpgstdepay.c
View file @
60db07b4
...
...
@@ -45,8 +45,8 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"clock-rate = (int) 90000, "
"encoding-name = (string)
\"
X-GST
\"
"
)
);
GST_BOILERPLATE
(
GstRtpGSTDepay
,
gst_rtp_gst_depay
,
GstBaseRTPDepayload
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
#define gst_rtp_gst_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpGSTDepay
,
gst_rtp_gst_depay
,
GST_TYPE_BASE_RTP_DEPAYLOAD
);
static
void
gst_rtp_gst_depay_finalize
(
GObject
*
object
);
...
...
@@ -59,22 +59,6 @@ static gboolean gst_rtp_gst_depay_setcaps (GstBaseRTPDepayload * depayload,
static
GstBuffer
*
gst_rtp_gst_depay_process
(
GstBaseRTPDepayload
*
depayload
,
GstBuffer
*
buf
);
static
void
gst_rtp_gst_depay_base_init
(
gpointer
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_gst_depay_src_template
));
gst_element_class_add_pad_template
(
element_class
,
gst_static_pad_template_get
(
&
gst_rtp_gst_depay_sink_template
));
gst_element_class_set_details_simple
(
element_class
,
"GStreamer depayloader"
,
"Codec/Depayloader/Network"
,
"Extracts GStreamer buffers from RTP packets"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
}
static
void
gst_rtp_gst_depay_class_init
(
GstRtpGSTDepayClass
*
klass
)
{
...
...
@@ -82,6 +66,9 @@ gst_rtp_gst_depay_class_init (GstRtpGSTDepayClass * klass)
GstElementClass
*
gstelement_class
;
GstBaseRTPDepayloadClass
*
gstbasertpdepayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpgstdepay_debug
,
"rtpgstdepay"
,
0
,
"Gstreamer RTP Depayloader"
);
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertpdepayload_class
=
(
GstBaseRTPDepayloadClass
*
)
klass
;
...
...
@@ -90,16 +77,22 @@ gst_rtp_gst_depay_class_init (GstRtpGSTDepayClass * klass)
gstelement_class
->
change_state
=
gst_rtp_gst_depay_change_state
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_gst_depay_src_template
));
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_gst_depay_sink_template
));
gst_element_class_set_details_simple
(
gstelement_class
,
"GStreamer depayloader"
,
"Codec/Depayloader/Network"
,
"Extracts GStreamer buffers from RTP packets"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbasertpdepayload_class
->
set_caps
=
gst_rtp_gst_depay_setcaps
;
gstbasertpdepayload_class
->
process
=
gst_rtp_gst_depay_process
;
GST_DEBUG_CATEGORY_INIT
(
rtpgstdepay_debug
,
"rtpgstdepay"
,
0
,
"Gstreamer RTP Depayloader"
);
}
static
void
gst_rtp_gst_depay_init
(
GstRtpGSTDepay
*
rtpgstdepay
,
GstRtpGSTDepayClass
*
klass
)
gst_rtp_gst_depay_init
(
GstRtpGSTDepay
*
rtpgstdepay
)
{
rtpgstdepay
->
adapter
=
gst_adapter_new
();
}
...
...
gst/rtp/gstrtpgstpay.c
View file @
60db07b4
...
...
@@ -73,37 +73,34 @@ static gboolean gst_rtp_gst_pay_setcaps (GstBaseRTPPayload * payload,
static
GstFlowReturn
gst_rtp_gst_pay_handle_buffer
(
GstBaseRTPPayload
*
payload
,
GstBuffer
*
buffer
);
GST_BOILERPLATE
(
GstRtpGSTPay
,
gst_rtp_gst_pay
,
GstBaseRTPPayload
,
GST_TYPE_BASE_RTP_PAYLOAD
)
#define gst_rtp_gst_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpGSTPay
,
gst_rtp_gst_pay
,
GST_TYPE_BASE_RTP_PAYLOAD
);
static
void
gst_rtp_gst_pay_base_init
(
gpointer
klass
)
static
void
gst_rtp_gst_pay_class_init
(
GstRtpGSTPayClass
*
klass
)
{
GstElementClass
*
element_class
=
GST_ELEMENT_CLASS
(
klass
);
GstElementClass
*
gstelement_class
;
GstBaseRTPPayloadClass
*
gstbasertppayload_class
;
gst_element_class_add_pad_template
(
element_class
,
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbasertppayload_class
=
(
GstBaseRTPPayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_gst_pay_src_template
));