Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
249d0083
Commit
249d0083
authored
Nov 11, 2011
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for base class rename
parent
3d9d2c6c
Changes
136
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
605 additions
and
605 deletions
+605
-605
gst/isomp4/gstrtpxqtdepay.c
gst/isomp4/gstrtpxqtdepay.c
+11
-11
gst/isomp4/gstrtpxqtdepay.h
gst/isomp4/gstrtpxqtdepay.h
+2
-2
gst/rtp/gstrtpL16depay.c
gst/rtp/gstrtpL16depay.c
+9
-9
gst/rtp/gstrtpL16depay.h
gst/rtp/gstrtpL16depay.h
+2
-2
gst/rtp/gstrtpL16pay.c
gst/rtp/gstrtpL16pay.c
+19
-19
gst/rtp/gstrtpL16pay.h
gst/rtp/gstrtpL16pay.h
+2
-2
gst/rtp/gstrtpac3depay.c
gst/rtp/gstrtpac3depay.c
+9
-9
gst/rtp/gstrtpac3depay.h
gst/rtp/gstrtpac3depay.h
+2
-2
gst/rtp/gstrtpac3pay.c
gst/rtp/gstrtpac3pay.c
+18
-18
gst/rtp/gstrtpac3pay.h
gst/rtp/gstrtpac3pay.h
+2
-2
gst/rtp/gstrtpamrdepay.c
gst/rtp/gstrtpamrdepay.c
+13
-13
gst/rtp/gstrtpamrdepay.h
gst/rtp/gstrtpamrdepay.h
+2
-2
gst/rtp/gstrtpamrpay.c
gst/rtp/gstrtpamrpay.c
+14
-14
gst/rtp/gstrtpamrpay.h
gst/rtp/gstrtpamrpay.h
+2
-2
gst/rtp/gstrtpbvdepay.c
gst/rtp/gstrtpbvdepay.c
+10
-10
gst/rtp/gstrtpbvdepay.h
gst/rtp/gstrtpbvdepay.h
+2
-2
gst/rtp/gstrtpbvpay.c
gst/rtp/gstrtpbvpay.c
+21
-21
gst/rtp/gstrtpbvpay.h
gst/rtp/gstrtpbvpay.h
+2
-2
gst/rtp/gstrtpceltdepay.c
gst/rtp/gstrtpceltdepay.c
+12
-12
gst/rtp/gstrtpceltdepay.h
gst/rtp/gstrtpceltdepay.h
+2
-2
gst/rtp/gstrtpceltpay.c
gst/rtp/gstrtpceltpay.c
+18
-18
gst/rtp/gstrtpceltpay.h
gst/rtp/gstrtpceltpay.h
+2
-2
gst/rtp/gstrtpdvdepay.c
gst/rtp/gstrtpdvdepay.c
+9
-9
gst/rtp/gstrtpdvdepay.h
gst/rtp/gstrtpdvdepay.h
+2
-2
gst/rtp/gstrtpdvpay.c
gst/rtp/gstrtpdvpay.c
+14
-14
gst/rtp/gstrtpdvpay.h
gst/rtp/gstrtpdvpay.h
+2
-2
gst/rtp/gstrtpg722depay.c
gst/rtp/gstrtpg722depay.c
+9
-9
gst/rtp/gstrtpg722depay.h
gst/rtp/gstrtpg722depay.h
+2
-2
gst/rtp/gstrtpg722pay.c
gst/rtp/gstrtpg722pay.c
+19
-19
gst/rtp/gstrtpg722pay.h
gst/rtp/gstrtpg722pay.h
+2
-2
gst/rtp/gstrtpg723depay.c
gst/rtp/gstrtpg723depay.c
+13
-13
gst/rtp/gstrtpg723depay.h
gst/rtp/gstrtpg723depay.h
+2
-2
gst/rtp/gstrtpg723pay.c
gst/rtp/gstrtpg723pay.c
+12
-12
gst/rtp/gstrtpg723pay.h
gst/rtp/gstrtpg723pay.h
+2
-2
gst/rtp/gstrtpg726depay.c
gst/rtp/gstrtpg726depay.c
+13
-13
gst/rtp/gstrtpg726depay.h
gst/rtp/gstrtpg726depay.h
+2
-2
gst/rtp/gstrtpg726pay.c
gst/rtp/gstrtpg726pay.c
+22
-22
gst/rtp/gstrtpg726pay.h
gst/rtp/gstrtpg726pay.h
+2
-2
gst/rtp/gstrtpg729depay.c
gst/rtp/gstrtpg729depay.c
+13
-13
gst/rtp/gstrtpg729depay.h
gst/rtp/gstrtpg729depay.h
+2
-2
gst/rtp/gstrtpg729pay.c
gst/rtp/gstrtpg729pay.c
+13
-13
gst/rtp/gstrtpg729pay.h
gst/rtp/gstrtpg729pay.h
+2
-2
gst/rtp/gstrtpgsmdepay.c
gst/rtp/gstrtpgsmdepay.c
+10
-10
gst/rtp/gstrtpgsmdepay.h
gst/rtp/gstrtpgsmdepay.h
+2
-2
gst/rtp/gstrtpgsmpay.c
gst/rtp/gstrtpgsmpay.c
+16
-16
gst/rtp/gstrtpgsmpay.h
gst/rtp/gstrtpgsmpay.h
+2
-2
gst/rtp/gstrtpgstdepay.c
gst/rtp/gstrtpgstdepay.c
+9
-9
gst/rtp/gstrtpgstdepay.h
gst/rtp/gstrtpgstdepay.h
+2
-2
gst/rtp/gstrtpgstpay.c
gst/rtp/gstrtpgstpay.c
+13
-13
gst/rtp/gstrtpgstpay.h
gst/rtp/gstrtpgstpay.h
+2
-2
gst/rtp/gstrtph263depay.c
gst/rtp/gstrtph263depay.c
+11
-11
gst/rtp/gstrtph263depay.h
gst/rtp/gstrtph263depay.h
+2
-2
gst/rtp/gstrtph263pay.c
gst/rtp/gstrtph263pay.c
+12
-12
gst/rtp/gstrtph263pay.h
gst/rtp/gstrtph263pay.h
+2
-2
gst/rtp/gstrtph263pdepay.c
gst/rtp/gstrtph263pdepay.c
+10
-10
gst/rtp/gstrtph263pdepay.h
gst/rtp/gstrtph263pdepay.h
+2
-2
gst/rtp/gstrtph263ppay.c
gst/rtp/gstrtph263ppay.c
+21
-21
gst/rtp/gstrtph263ppay.h
gst/rtp/gstrtph263ppay.h
+2
-2
gst/rtp/gstrtph264depay.c
gst/rtp/gstrtph264depay.c
+16
-16
gst/rtp/gstrtph264depay.h
gst/rtp/gstrtph264depay.h
+2
-2
gst/rtp/gstrtph264pay.c
gst/rtp/gstrtph264pay.c
+29
-29
gst/rtp/gstrtph264pay.h
gst/rtp/gstrtph264pay.h
+2
-2
gst/rtp/gstrtpilbcdepay.c
gst/rtp/gstrtpilbcdepay.c
+10
-10
gst/rtp/gstrtpilbcdepay.h
gst/rtp/gstrtpilbcdepay.h
+2
-2
gst/rtp/gstrtpilbcpay.c
gst/rtp/gstrtpilbcpay.c
+22
-22
gst/rtp/gstrtpilbcpay.h
gst/rtp/gstrtpilbcpay.h
+2
-2
gst/rtp/gstrtpj2kdepay.c
gst/rtp/gstrtpj2kdepay.c
+14
-14
gst/rtp/gstrtpj2kdepay.h
gst/rtp/gstrtpj2kdepay.h
+2
-2
gst/rtp/gstrtpj2kpay.c
gst/rtp/gstrtpj2kpay.c
+14
-14
gst/rtp/gstrtpj2kpay.h
gst/rtp/gstrtpj2kpay.h
+2
-2
gst/rtp/gstrtpjpegdepay.c
gst/rtp/gstrtpjpegdepay.c
+9
-9
gst/rtp/gstrtpjpegdepay.h
gst/rtp/gstrtpjpegdepay.h
+2
-2
gst/rtp/gstrtpjpegpay.c
gst/rtp/gstrtpjpegpay.c
+14
-14
gst/rtp/gstrtpjpegpay.h
gst/rtp/gstrtpjpegpay.h
+2
-2
gst/rtp/gstrtpmp1sdepay.c
gst/rtp/gstrtpmp1sdepay.c
+10
-10
No files found.
gst/isomp4/gstrtpxqtdepay.c
View file @
249d0083
...
...
@@ -92,13 +92,13 @@ GST_STATIC_PAD_TEMPLATE ("sink",
);
#define gst_rtp_xqt_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpXQTDepay
,
gst_rtp_xqt_depay
,
GST_TYPE_BASE
_RTP
_DEPAYLOAD
);
G_DEFINE_TYPE
(
GstRtpXQTDepay
,
gst_rtp_xqt_depay
,
GST_TYPE_
RTP_
BASE_DEPAYLOAD
);
static
void
gst_rtp_xqt_depay_finalize
(
GObject
*
object
);
static
gboolean
gst_rtp_xqt_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
static
gboolean
gst_rtp_xqt_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
);
static
GstBuffer
*
gst_rtp_xqt_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
static
GstBuffer
*
gst_rtp_xqt_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
);
static
GstStateChangeReturn
gst_rtp_xqt_depay_change_state
(
GstElement
*
...
...
@@ -110,11 +110,11 @@ gst_rtp_xqt_depay_class_init (GstRtpXQTDepayClass * klass)
{
GObjectClass
*
gobject_class
;
GstElementClass
*
gstelement_class
;
GstBase
RTP
DepayloadClass
*
gstbase
rtp
depayload_class
;
Gst
RTP
BaseDepayloadClass
*
gst
rtp
basedepayload_class
;
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbase
rtp
depayload_class
=
(
GstBase
RTP
DepayloadClass
*
)
klass
;
gst
rtp
basedepayload_class
=
(
Gst
RTP
BaseDepayloadClass
*
)
klass
;
parent_class
=
g_type_class_peek_parent
(
klass
);
...
...
@@ -122,8 +122,8 @@ gst_rtp_xqt_depay_class_init (GstRtpXQTDepayClass * klass)
gstelement_class
->
change_state
=
gst_rtp_xqt_depay_change_state
;
gstbase
rtp
depayload_class
->
set_caps
=
gst_rtp_xqt_depay_setcaps
;
gstbase
rtp
depayload_class
->
process
=
gst_rtp_xqt_depay_process
;
gst
rtp
basedepayload_class
->
set_caps
=
gst_rtp_xqt_depay_setcaps
;
gst
rtp
basedepayload_class
->
process
=
gst_rtp_xqt_depay_process
;
GST_DEBUG_CATEGORY_INIT
(
rtpxqtdepay_debug
,
"rtpxqtdepay"
,
0
,
"QT Media RTP Depayloader"
);
...
...
@@ -213,7 +213,7 @@ gst_rtp_quicktime_parse_sd (GstRtpXQTDepay * rtpxqtdepay, guint8 * data,
caps
=
gst_caps_new_simple
(
"video/x-h264"
,
"codec_data"
,
GST_TYPE_BUFFER
,
buf
,
NULL
);
gst_buffer_unref
(
buf
);
gst_pad_set_caps
(
GST_BASE
_RTP
_DEPAYLOAD
(
rtpxqtdepay
)
->
srcpad
,
caps
);
gst_pad_set_caps
(
GST_
RTP_
BASE_DEPAYLOAD
(
rtpxqtdepay
)
->
srcpad
,
caps
);
gst_caps_unref
(
caps
);
break
;
}
...
...
@@ -235,7 +235,7 @@ too_short:
}
static
gboolean
gst_rtp_xqt_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
GstCaps
*
caps
)
gst_rtp_xqt_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
)
{
GstStructure
*
structure
;
gint
clock_rate
=
90000
;
/* default */
...
...
@@ -249,7 +249,7 @@ gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
}
static
GstBuffer
*
gst_rtp_xqt_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
GstBuffer
*
buf
)
gst_rtp_xqt_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
)
{
GstRtpXQTDepay
*
rtpxqtdepay
;
GstBuffer
*
outbuf
=
NULL
;
...
...
@@ -597,7 +597,7 @@ gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
if
(
!
s
)
GST_BUFFER_FLAG_SET
(
outbuf
,
GST_BUFFER_FLAG_DELTA_UNIT
);
gst_base
_rtp
_depayload_push
(
depayload
,
outbuf
);
gst_
rtp_
base_depayload_push
(
depayload
,
outbuf
);
/* aligned on 32 bit boundary */
slen
=
GST_ROUND_UP_4
(
slen
);
...
...
gst/isomp4/gstrtpxqtdepay.h
View file @
249d0083
...
...
@@ -42,7 +42,7 @@ typedef struct _GstRtpXQTDepayClass GstRtpXQTDepayClass;
struct
_GstRtpXQTDepay
{
GstBase
RTP
Depayload
depayload
;
Gst
RTP
BaseDepayload
depayload
;
GstAdapter
*
adapter
;
...
...
@@ -54,7 +54,7 @@ struct _GstRtpXQTDepay
struct
_GstRtpXQTDepayClass
{
GstBase
RTP
DepayloadClass
parent_class
;
Gst
RTP
BaseDepayloadClass
parent_class
;
};
GType
gst_rtp_xqt_depay_get_type
(
void
);
...
...
gst/rtp/gstrtpL16depay.c
View file @
249d0083
...
...
@@ -65,24 +65,24 @@ static GstStaticPadTemplate gst_rtp_L16_depay_sink_template =
);
#define gst_rtp_L16_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpL16Depay
,
gst_rtp_L16_depay
,
GST_TYPE_BASE
_RTP
_DEPAYLOAD
);
G_DEFINE_TYPE
(
GstRtpL16Depay
,
gst_rtp_L16_depay
,
GST_TYPE_
RTP_
BASE_DEPAYLOAD
);
static
gboolean
gst_rtp_L16_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
static
gboolean
gst_rtp_L16_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
);
static
GstBuffer
*
gst_rtp_L16_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
static
GstBuffer
*
gst_rtp_L16_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
);
static
void
gst_rtp_L16_depay_class_init
(
GstRtpL16DepayClass
*
klass
)
{
GstElementClass
*
gstelement_class
;
GstBase
RTP
DepayloadClass
*
gstbase
rtp
depayload_class
;
Gst
RTP
BaseDepayloadClass
*
gst
rtp
basedepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbase
rtp
depayload_class
=
(
GstBase
RTP
DepayloadClass
*
)
klass
;
gst
rtp
basedepayload_class
=
(
Gst
RTP
BaseDepayloadClass
*
)
klass
;
gstbase
rtp
depayload_class
->
set_caps
=
gst_rtp_L16_depay_setcaps
;
gstbase
rtp
depayload_class
->
process
=
gst_rtp_L16_depay_process
;
gst
rtp
basedepayload_class
->
set_caps
=
gst_rtp_L16_depay_setcaps
;
gst
rtp
basedepayload_class
->
process
=
gst_rtp_L16_depay_process
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_L16_depay_src_template
));
...
...
@@ -121,7 +121,7 @@ gst_rtp_L16_depay_parse_int (GstStructure * structure, const gchar * field,
}
static
gboolean
gst_rtp_L16_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
GstCaps
*
caps
)
gst_rtp_L16_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
)
{
GstStructure
*
structure
;
GstRtpL16Depay
*
rtpL16depay
;
...
...
@@ -211,7 +211,7 @@ no_clockrate:
}
static
GstBuffer
*
gst_rtp_L16_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
GstBuffer
*
buf
)
gst_rtp_L16_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
)
{
GstRtpL16Depay
*
rtpL16depay
;
GstBuffer
*
outbuf
;
...
...
gst/rtp/gstrtpL16depay.h
View file @
249d0083
...
...
@@ -43,7 +43,7 @@ typedef struct _GstRtpL16DepayClass GstRtpL16DepayClass;
/* Definition of structure storing data for this element. */
struct
_GstRtpL16Depay
{
GstBase
RTP
Depayload
depayload
;
Gst
RTP
BaseDepayload
depayload
;
guint
rate
;
guint
channels
;
...
...
@@ -52,7 +52,7 @@ struct _GstRtpL16Depay
/* Standard definition defining a class for this element. */
struct
_GstRtpL16DepayClass
{
GstBase
RTP
DepayloadClass
parent_class
;
Gst
RTP
BaseDepayloadClass
parent_class
;
};
GType
gst_rtp_L16_depay_get_type
(
void
);
...
...
gst/rtp/gstrtpL16pay.c
View file @
249d0083
...
...
@@ -64,25 +64,25 @@ static GstStaticPadTemplate gst_rtp_L16_pay_src_template =
"clock-rate = (int) 44100"
)
);
static
gboolean
gst_rtp_L16_pay_setcaps
(
GstBase
RTP
Payload
*
basepayload
,
static
gboolean
gst_rtp_L16_pay_setcaps
(
Gst
RTP
BasePayload
*
basepayload
,
GstCaps
*
caps
);
static
GstCaps
*
gst_rtp_L16_pay_getcaps
(
GstBase
RTP
Payload
*
rtppayload
,
static
GstCaps
*
gst_rtp_L16_pay_getcaps
(
Gst
RTP
BasePayload
*
rtppayload
,
GstPad
*
pad
,
GstCaps
*
filter
);
#define gst_rtp_L16_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpL16Pay
,
gst_rtp_L16_pay
,
GST_TYPE_BASE
_RTP
_AUDIO_PAYLOAD
);
G_DEFINE_TYPE
(
GstRtpL16Pay
,
gst_rtp_L16_pay
,
GST_TYPE_
RTP_
BASE_AUDIO_PAYLOAD
);
static
void
gst_rtp_L16_pay_class_init
(
GstRtpL16PayClass
*
klass
)
{
GstElementClass
*
gstelement_class
;
GstBase
RTP
PayloadClass
*
gstbase
rtp
payload_class
;
Gst
RTP
BasePayloadClass
*
gst
rtp
basepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbase
rtp
payload_class
=
(
GstBase
RTP
PayloadClass
*
)
klass
;
gst
rtp
basepayload_class
=
(
Gst
RTP
BasePayloadClass
*
)
klass
;
gstbase
rtp
payload_class
->
set_caps
=
gst_rtp_L16_pay_setcaps
;
gstbase
rtp
payload_class
->
get_caps
=
gst_rtp_L16_pay_getcaps
;
gst
rtp
basepayload_class
->
set_caps
=
gst_rtp_L16_pay_setcaps
;
gst
rtp
basepayload_class
->
get_caps
=
gst_rtp_L16_pay_getcaps
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_L16_pay_src_template
));
...
...
@@ -101,16 +101,16 @@ gst_rtp_L16_pay_class_init (GstRtpL16PayClass * klass)
static
void
gst_rtp_L16_pay_init
(
GstRtpL16Pay
*
rtpL16pay
)
{
GstBase
RTP
AudioPayload
*
base
rtp
audiopayload
;
Gst
RTP
BaseAudioPayload
*
rtp
baseaudiopayload
;
base
rtp
audiopayload
=
GST_BASE
_RTP
_AUDIO_PAYLOAD
(
rtpL16pay
);
rtp
baseaudiopayload
=
GST_
RTP_
BASE_AUDIO_PAYLOAD
(
rtpL16pay
);
/* tell base
rtp
audiopayload that this is a sample based codec */
gst_base
_rtp
_audio_payload_set_sample_based
(
base
rtp
audiopayload
);
/* tell
rtp
baseaudiopayload that this is a sample based codec */
gst_
rtp_
base_audio_payload_set_sample_based
(
rtp
baseaudiopayload
);
}
static
gboolean
gst_rtp_L16_pay_setcaps
(
GstBase
RTP
Payload
*
basepayload
,
GstCaps
*
caps
)
gst_rtp_L16_pay_setcaps
(
Gst
RTP
BasePayload
*
basepayload
,
GstCaps
*
caps
)
{
GstRtpL16Pay
*
rtpL16pay
;
GstStructure
*
structure
;
...
...
@@ -119,9 +119,9 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
gchar
*
params
;
GstAudioChannelPosition
*
pos
;
const
GstRTPChannelOrder
*
order
;
GstBase
RTP
AudioPayload
*
base
rtp
audiopayload
;
Gst
RTP
BaseAudioPayload
*
rtp
baseaudiopayload
;
base
rtp
audiopayload
=
GST_BASE
_RTP
_AUDIO_PAYLOAD
(
basepayload
);
rtp
baseaudiopayload
=
GST_
RTP_
BASE_AUDIO_PAYLOAD
(
basepayload
);
rtpL16pay
=
GST_RTP_L16_PAY
(
basepayload
);
structure
=
gst_caps_get_structure
(
caps
,
0
);
...
...
@@ -140,7 +140,7 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
else
order
=
NULL
;
gst_base
_rtp
_payload_set_options
(
basepayload
,
"audio"
,
TRUE
,
"L16"
,
rate
);
gst_
rtp_
base_payload_set_options
(
basepayload
,
"audio"
,
TRUE
,
"L16"
,
rate
);
params
=
g_strdup_printf
(
"%d"
,
channels
);
if
(
!
order
&&
channels
>
2
)
{
...
...
@@ -149,11 +149,11 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
}
if
(
order
&&
order
->
name
)
{
res
=
gst_base
_rtp
_payload_set_outcaps
(
basepayload
,
res
=
gst_
rtp_
base_payload_set_outcaps
(
basepayload
,
"encoding-params"
,
G_TYPE_STRING
,
params
,
"channels"
,
G_TYPE_INT
,
channels
,
"channel-order"
,
G_TYPE_STRING
,
order
->
name
,
NULL
);
}
else
{
res
=
gst_base
_rtp
_payload_set_outcaps
(
basepayload
,
res
=
gst_
rtp_
base_payload_set_outcaps
(
basepayload
,
"encoding-params"
,
G_TYPE_STRING
,
params
,
"channels"
,
G_TYPE_INT
,
channels
,
NULL
);
}
...
...
@@ -165,7 +165,7 @@ gst_rtp_L16_pay_setcaps (GstBaseRTPPayload * basepayload, GstCaps * caps)
rtpL16pay
->
channels
=
channels
;
/* octet-per-sample is 2 * channels for L16 */
gst_base
_rtp
_audio_payload_set_sample_options
(
base
rtp
audiopayload
,
gst_
rtp_
base_audio_payload_set_sample_options
(
rtp
baseaudiopayload
,
2
*
rtpL16pay
->
channels
);
return
res
;
...
...
@@ -184,7 +184,7 @@ no_channels:
}
static
GstCaps
*
gst_rtp_L16_pay_getcaps
(
GstBase
RTP
Payload
*
rtppayload
,
GstPad
*
pad
,
gst_rtp_L16_pay_getcaps
(
Gst
RTP
BasePayload
*
rtppayload
,
GstPad
*
pad
,
GstCaps
*
filter
)
{
GstCaps
*
otherpadcaps
;
...
...
gst/rtp/gstrtpL16pay.h
View file @
249d0083
...
...
@@ -41,7 +41,7 @@ typedef struct _GstRtpL16PayClass GstRtpL16PayClass;
struct
_GstRtpL16Pay
{
GstBase
RTP
AudioPayload
payload
;
Gst
RTP
BaseAudioPayload
payload
;
gint
rate
;
gint
channels
;
...
...
@@ -49,7 +49,7 @@ struct _GstRtpL16Pay
struct
_GstRtpL16PayClass
{
GstBase
RTP
AudioPayloadClass
parent_class
;
Gst
RTP
BaseAudioPayloadClass
parent_class
;
};
GType
gst_rtp_L16_pay_get_type
(
void
);
...
...
gst/rtp/gstrtpac3depay.c
View file @
249d0083
...
...
@@ -47,21 +47,21 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"encoding-name = (string)
\"
AC3
\"
"
)
);
G_DEFINE_TYPE
(
GstRtpAC3Depay
,
gst_rtp_ac3_depay
,
GST_TYPE_BASE
_RTP
_DEPAYLOAD
);
G_DEFINE_TYPE
(
GstRtpAC3Depay
,
gst_rtp_ac3_depay
,
GST_TYPE_
RTP_
BASE_DEPAYLOAD
);
static
gboolean
gst_rtp_ac3_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
static
gboolean
gst_rtp_ac3_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
);
static
GstBuffer
*
gst_rtp_ac3_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
static
GstBuffer
*
gst_rtp_ac3_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
);
static
void
gst_rtp_ac3_depay_class_init
(
GstRtpAC3DepayClass
*
klass
)
{
GstElementClass
*
gstelement_class
;
GstBase
RTP
DepayloadClass
*
gstbase
rtp
depayload_class
;
Gst
RTP
BaseDepayloadClass
*
gst
rtp
basedepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbase
rtp
depayload_class
=
(
GstBase
RTP
DepayloadClass
*
)
klass
;
gst
rtp
basedepayload_class
=
(
Gst
RTP
BaseDepayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_ac3_depay_src_template
));
...
...
@@ -73,8 +73,8 @@ gst_rtp_ac3_depay_class_init (GstRtpAC3DepayClass * klass)
"Extracts AC3 audio from RTP packets (RFC 4184)"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbase
rtp
depayload_class
->
set_caps
=
gst_rtp_ac3_depay_setcaps
;
gstbase
rtp
depayload_class
->
process
=
gst_rtp_ac3_depay_process
;
gst
rtp
basedepayload_class
->
set_caps
=
gst_rtp_ac3_depay_setcaps
;
gst
rtp
basedepayload_class
->
process
=
gst_rtp_ac3_depay_process
;
GST_DEBUG_CATEGORY_INIT
(
rtpac3depay_debug
,
"rtpac3depay"
,
0
,
"AC3 Audio RTP Depayloader"
);
...
...
@@ -87,7 +87,7 @@ gst_rtp_ac3_depay_init (GstRtpAC3Depay * rtpac3depay)
}
static
gboolean
gst_rtp_ac3_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
GstCaps
*
caps
)
gst_rtp_ac3_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
)
{
GstStructure
*
structure
;
gint
clock_rate
;
...
...
@@ -155,7 +155,7 @@ static const struct frmsize_s frmsizecod_tbl[] = {
};
static
GstBuffer
*
gst_rtp_ac3_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
GstBuffer
*
buf
)
gst_rtp_ac3_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
)
{
GstRtpAC3Depay
*
rtpac3depay
;
GstBuffer
*
outbuf
;
...
...
gst/rtp/gstrtpac3depay.h
View file @
249d0083
...
...
@@ -41,12 +41,12 @@ typedef struct _GstRtpAC3DepayClass GstRtpAC3DepayClass;
struct
_GstRtpAC3Depay
{
GstBase
RTP
Depayload
depayload
;
Gst
RTP
BaseDepayload
depayload
;
};
struct
_GstRtpAC3DepayClass
{
GstBase
RTP
DepayloadClass
parent_class
;
Gst
RTP
BaseDepayloadClass
parent_class
;
};
GType
gst_rtp_ac3_depay_get_type
(
void
);
...
...
gst/rtp/gstrtpac3pay.c
View file @
249d0083
...
...
@@ -53,30 +53,30 @@ static void gst_rtp_ac3_pay_finalize (GObject * object);
static
GstStateChangeReturn
gst_rtp_ac3_pay_change_state
(
GstElement
*
element
,
GstStateChange
transition
);
static
gboolean
gst_rtp_ac3_pay_setcaps
(
GstBase
RTP
Payload
*
payload
,
static
gboolean
gst_rtp_ac3_pay_setcaps
(
Gst
RTP
BasePayload
*
payload
,
GstCaps
*
caps
);
static
gboolean
gst_rtp_ac3_pay_handle_event
(
GstBase
RTP
Payload
*
payload
,
static
gboolean
gst_rtp_ac3_pay_handle_event
(
Gst
RTP
BasePayload
*
payload
,
GstEvent
*
event
);
static
GstFlowReturn
gst_rtp_ac3_pay_flush
(
GstRtpAC3Pay
*
rtpac3pay
);
static
GstFlowReturn
gst_rtp_ac3_pay_handle_buffer
(
GstBase
RTP
Payload
*
payload
,
static
GstFlowReturn
gst_rtp_ac3_pay_handle_buffer
(
Gst
RTP
BasePayload
*
payload
,
GstBuffer
*
buffer
);
#define gst_rtp_ac3_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpAC3Pay
,
gst_rtp_ac3_pay
,
GST_TYPE_BASE
_RTP
_PAYLOAD
);
G_DEFINE_TYPE
(
GstRtpAC3Pay
,
gst_rtp_ac3_pay
,
GST_TYPE_
RTP_
BASE_PAYLOAD
);
static
void
gst_rtp_ac3_pay_class_init
(
GstRtpAC3PayClass
*
klass
)
{
GObjectClass
*
gobject_class
;
GstElementClass
*
gstelement_class
;
GstBase
RTP
PayloadClass
*
gstbase
rtp
payload_class
;
Gst
RTP
BasePayloadClass
*
gst
rtp
basepayload_class
;
GST_DEBUG_CATEGORY_INIT
(
rtpac3pay_debug
,
"rtpac3pay"
,
0
,
"AC3 Audio RTP Depayloader"
);
gobject_class
=
(
GObjectClass
*
)
klass
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbase
rtp
payload_class
=
(
GstBase
RTP
PayloadClass
*
)
klass
;
gst
rtp
basepayload_class
=
(
Gst
RTP
BasePayloadClass
*
)
klass
;
gobject_class
->
finalize
=
gst_rtp_ac3_pay_finalize
;
...
...
@@ -92,9 +92,9 @@ gst_rtp_ac3_pay_class_init (GstRtpAC3PayClass * klass)
"Payload AC3 audio as RTP packets (RFC 4184)"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbase
rtp
payload_class
->
set_caps
=
gst_rtp_ac3_pay_setcaps
;
gstbase
rtp
payload_class
->
handle_event
=
gst_rtp_ac3_pay_handle_event
;
gstbase
rtp
payload_class
->
handle_buffer
=
gst_rtp_ac3_pay_handle_buffer
;
gst
rtp
basepayload_class
->
set_caps
=
gst_rtp_ac3_pay_setcaps
;
gst
rtp
basepayload_class
->
handle_event
=
gst_rtp_ac3_pay_handle_event
;
gst
rtp
basepayload_class
->
handle_buffer
=
gst_rtp_ac3_pay_handle_buffer
;
}
static
void
...
...
@@ -125,7 +125,7 @@ gst_rtp_ac3_pay_reset (GstRtpAC3Pay * pay)
}
static
gboolean
gst_rtp_ac3_pay_setcaps
(
GstBase
RTP
Payload
*
payload
,
GstCaps
*
caps
)
gst_rtp_ac3_pay_setcaps
(
Gst
RTP
BasePayload
*
payload
,
GstCaps
*
caps
)
{
gboolean
res
;
gint
rate
;
...
...
@@ -136,14 +136,14 @@ gst_rtp_ac3_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
if
(
!
gst_structure_get_int
(
structure
,
"rate"
,
&
rate
))
rate
=
90000
;
/* default */
gst_base
_rtp
_payload_set_options
(
payload
,
"audio"
,
TRUE
,
"AC3"
,
rate
);
res
=
gst_base
_rtp
_payload_set_outcaps
(
payload
,
NULL
);
gst_
rtp_
base_payload_set_options
(
payload
,
"audio"
,
TRUE
,
"AC3"
,
rate
);
res
=
gst_
rtp_
base_payload_set_outcaps
(
payload
,
NULL
);
return
res
;
}
static
gboolean
gst_rtp_ac3_pay_handle_event
(
GstBase
RTP
Payload
*
payload
,
GstEvent
*
event
)
gst_rtp_ac3_pay_handle_event
(
Gst
RTP
BasePayload
*
payload
,
GstEvent
*
event
)
{
gboolean
res
;
GstRtpAC3Pay
*
rtpac3pay
;
...
...
@@ -163,7 +163,7 @@ gst_rtp_ac3_pay_handle_event (GstBaseRTPPayload * payload, GstEvent * event)
}
res
=
GST_BASE
_RTP
_PAYLOAD_CLASS
(
parent_class
)
->
handle_event
(
payload
,
event
);
GST_
RTP_
BASE_PAYLOAD_CLASS
(
parent_class
)
->
handle_event
(
payload
,
event
);
return
res
;
}
...
...
@@ -235,7 +235,7 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
/* number of frames */
NF
=
rtpac3pay
->
NF
;
mtu
=
GST_BASE
_RTP
_PAYLOAD_MTU
(
rtpac3pay
);
mtu
=
GST_
RTP_
BASE_PAYLOAD_MTU
(
rtpac3pay
);
GST_LOG_OBJECT
(
rtpac3pay
,
"flushing %u bytes"
,
avail
);
...
...
@@ -310,14 +310,14 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay)
GST_BUFFER_TIMESTAMP
(
outbuf
)
=
rtpac3pay
->
first_ts
;
GST_BUFFER_DURATION
(
outbuf
)
=
rtpac3pay
->
duration
;
ret
=
gst_base
_rtp
_payload_push
(
GST_BASE
_RTP
_PAYLOAD
(
rtpac3pay
),
outbuf
);
ret
=
gst_
rtp_
base_payload_push
(
GST_
RTP_
BASE_PAYLOAD
(
rtpac3pay
),
outbuf
);
}
return
ret
;
}
static
GstFlowReturn
gst_rtp_ac3_pay_handle_buffer
(
GstBase
RTP
Payload
*
basepayload
,
gst_rtp_ac3_pay_handle_buffer
(
Gst
RTP
BasePayload
*
basepayload
,
GstBuffer
*
buffer
)
{
GstRtpAC3Pay
*
rtpac3pay
;
...
...
@@ -385,7 +385,7 @@ gst_rtp_ac3_pay_handle_buffer (GstBaseRTPPayload * basepayload,
/* if this buffer is going to overflow the packet, flush what we
* have. */
if
(
gst_base
_rtp
_payload_is_filled
(
basepayload
,
if
(
gst_
rtp_
base_payload_is_filled
(
basepayload
,
packet_len
,
rtpac3pay
->
duration
+
duration
))
{
ret
=
gst_rtp_ac3_pay_flush
(
rtpac3pay
);
avail
=
0
;
...
...
gst/rtp/gstrtpac3pay.h
View file @
249d0083
...
...
@@ -42,7 +42,7 @@ typedef struct _GstRtpAC3PayClass GstRtpAC3PayClass;
struct
_GstRtpAC3Pay
{
GstBase
RTP
Payload
payload
;
Gst
RTP
BasePayload
payload
;
GstAdapter
*
adapter
;
GstClockTime
first_ts
;
...
...
@@ -52,7 +52,7 @@ struct _GstRtpAC3Pay
struct
_GstRtpAC3PayClass
{
GstBase
RTP
PayloadClass
parent_class
;
Gst
RTP
BasePayloadClass
parent_class
;
};
GType
gst_rtp_ac3_pay_get_type
(
void
);
...
...
gst/rtp/gstrtpamrdepay.c
View file @
249d0083
...
...
@@ -106,22 +106,22 @@ static GstStaticPadTemplate gst_rtp_amr_depay_src_template =
"audio/AMR-WB, "
"channels = (int) 1,"
"rate = (int) 16000"
)
);
static
gboolean
gst_rtp_amr_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
static
gboolean
gst_rtp_amr_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
);
static
GstBuffer
*
gst_rtp_amr_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
static
GstBuffer
*
gst_rtp_amr_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
);
#define gst_rtp_amr_depay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpAMRDepay
,
gst_rtp_amr_depay
,
GST_TYPE_BASE
_RTP
_DEPAYLOAD
);
G_DEFINE_TYPE
(
GstRtpAMRDepay
,
gst_rtp_amr_depay
,
GST_TYPE_
RTP_
BASE_DEPAYLOAD
);
static
void
gst_rtp_amr_depay_class_init
(
GstRtpAMRDepayClass
*
klass
)
{
GstElementClass
*
gstelement_class
;
GstBase
RTP
DepayloadClass
*
gstbase
rtp
depayload_class
;
Gst
RTP
BaseDepayloadClass
*
gst
rtp
basedepayload_class
;
gstelement_class
=
(
GstElementClass
*
)
klass
;
gstbase
rtp
depayload_class
=
(
GstBase
RTP
DepayloadClass
*
)
klass
;
gst
rtp
basedepayload_class
=
(
Gst
RTP
BaseDepayloadClass
*
)
klass
;
gst_element_class_add_pad_template
(
gstelement_class
,
gst_static_pad_template_get
(
&
gst_rtp_amr_depay_src_template
));
...
...
@@ -133,8 +133,8 @@ gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass)
"Extracts AMR or AMR-WB audio from RTP packets (RFC 3267)"
,
"Wim Taymans <wim.taymans@gmail.com>"
);
gstbase
rtp
depayload_class
->
process
=
gst_rtp_amr_depay_process
;
gstbase
rtp
depayload_class
->
set_caps
=
gst_rtp_amr_depay_setcaps
;
gst
rtp
basedepayload_class
->
process
=
gst_rtp_amr_depay_process
;
gst
rtp
basedepayload_class
->
set_caps
=
gst_rtp_amr_depay_setcaps
;
GST_DEBUG_CATEGORY_INIT
(
rtpamrdepay_debug
,
"rtpamrdepay"
,
0
,
"AMR/AMR-WB RTP Depayloader"
);
...
...
@@ -143,15 +143,15 @@ gst_rtp_amr_depay_class_init (GstRtpAMRDepayClass * klass)
static
void
gst_rtp_amr_depay_init
(
GstRtpAMRDepay
*
rtpamrdepay
)
{
GstBase
RTP
Depayload
*
depayload
;
Gst
RTP
BaseDepayload
*
depayload
;
depayload
=
GST_BASE
_RTP
_DEPAYLOAD
(
rtpamrdepay
);
depayload
=
GST_
RTP_
BASE_DEPAYLOAD
(
rtpamrdepay
);
gst_pad_use_fixed_caps
(
GST_BASE
_RTP
_DEPAYLOAD_SRCPAD
(
depayload
));
gst_pad_use_fixed_caps
(
GST_
RTP_
BASE_DEPAYLOAD_SRCPAD
(
depayload
));
}
static
gboolean
gst_rtp_amr_depay_setcaps
(
GstBase
RTP
Depayload
*
depayload
,
GstCaps
*
caps
)
gst_rtp_amr_depay_setcaps
(
Gst
RTP
BaseDepayload
*
depayload
,
GstCaps
*
caps
)
{
GstStructure
*
structure
;
GstCaps
*
srccaps
;
...
...
@@ -241,7 +241,7 @@ gst_rtp_amr_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
srccaps
=
gst_caps_new_simple
(
type
,
"channels"
,
G_TYPE_INT
,
rtpamrdepay
->
channels
,
"rate"
,
G_TYPE_INT
,
clock_rate
,
NULL
);
res
=
gst_pad_set_caps
(
GST_BASE
_RTP
_DEPAYLOAD_SRCPAD
(
depayload
),
srccaps
);
res
=
gst_pad_set_caps
(
GST_
RTP_
BASE_DEPAYLOAD_SRCPAD
(
depayload
),
srccaps
);
gst_caps_unref
(
srccaps
);
return
res
;
...
...
@@ -266,7 +266,7 @@ static const gint wb_frame_size[16] = {
};
static
GstBuffer
*
gst_rtp_amr_depay_process
(
GstBase
RTP
Depayload
*
depayload
,
GstBuffer
*
buf
)
gst_rtp_amr_depay_process
(
Gst
RTP
BaseDepayload
*
depayload
,
GstBuffer
*
buf
)
{
GstRtpAMRDepay
*
rtpamrdepay
;
const
gint
*
frame_size
;
...
...
gst/rtp/gstrtpamrdepay.h
View file @
249d0083
...
...
@@ -47,7 +47,7 @@ typedef enum {
struct
_GstRtpAMRDepay
{
GstBase
RTP
Depayload
depayload
;
Gst
RTP
BaseDepayload
depayload
;
GstRtpAMRDepayMode
mode
;
...
...
@@ -65,7 +65,7 @@ struct _GstRtpAMRDepay
struct
_GstRtpAMRDepayClass
{
GstBase
RTP
DepayloadClass
parent_class
;
Gst
RTP
BaseDepayloadClass
parent_class
;
};
GType
gst_rtp_amr_depay_get_type
(
void
);
...
...
gst/rtp/gstrtpamrpay.c
View file @
249d0083
...
...
@@ -85,25 +85,25 @@ static GstStaticPadTemplate gst_rtp_amr_pay_src_template =
"maxptime = (int) [ 20, MAX ], "
"ptime = (int) [ 20, MAX ]"
)
);
static
gboolean
gst_rtp_amr_pay_setcaps
(
GstBase
RTP
Payload
*
basepayload
,
static
gboolean
gst_rtp_amr_pay_setcaps
(
Gst
RTP
BasePayload
*
basepayload
,
GstCaps
*
caps
);
static
GstFlowReturn
gst_rtp_amr_pay_handle_buffer
(
GstBase
RTP
Payload
*
pad
,
static
GstFlowReturn
gst_rtp_amr_pay_handle_buffer
(
Gst
RTP
BasePayload
*
pad
,
GstBuffer
*
buffer
);
static
GstStateChangeReturn
gst_rtp_amr_pay_change_state
(
GstElement
*
element
,
GstStateChange
transition
);
#define gst_rtp_amr_pay_parent_class parent_class
G_DEFINE_TYPE
(
GstRtpAMRPay
,
gst_rtp_amr_pay
,
GST_TYPE_BASE
_RTP
_PAYLOAD
);
G_DEFINE_TYPE
(
GstRtpAMRPay
,
gst_rtp_amr_pay
,
GST_TYPE_
RTP_
BASE_PAYLOAD
);