mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
Payloader now sets some default caps on the srcpad if caps on the sinkpad are never set. This is important for the g7...
Original commit message from CVS: Payloader now sets some default caps on the srcpad if caps on the sinkpad are never set. This is important for the g711 to work with burger's rtpbin element.
This commit is contained in:
parent
758cd8fd18
commit
6662f94650
3 changed files with 33 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-10-31 Zeeshan Ali <zeenix@gmail.com>
|
||||
|
||||
* gst/rtp/gstrtpg711dec.c: (gst_rtpg711dec_setcaps),
|
||||
(gst_rtpg711dec_process):
|
||||
* gst/rtp/gstrtpgsmenc.c:
|
||||
Payloader now sets some default caps on the srcpad if caps on the sinkpad
|
||||
are never set. This is important for the g711 to work with burger's rtpbin
|
||||
element.
|
||||
|
||||
2005-10-28 Edgard Lima <edgard.lima@cin.ufpe.br>
|
||||
|
||||
* ext/speex/gstspeexenc.c: (gst_speexenc_chain),
|
||||
|
|
|
@ -62,8 +62,8 @@ static GstStaticPadTemplate gst_rtpg711dec_src_template =
|
|||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("audio/x-mulaw, channels = (int) 1; "
|
||||
"audio/x-alaw, channels = (int) 1")
|
||||
GST_STATIC_CAPS ("audio/x-mulaw, "
|
||||
"channels = (int) 1; " "audio/x-alaw, " "channels = (int) 1")
|
||||
);
|
||||
|
||||
static GstBuffer *gst_rtpg711dec_process (GstBaseRTPDepayload * depayload,
|
||||
|
@ -148,6 +148,7 @@ gst_rtpg711dec_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
static GstBuffer *
|
||||
gst_rtpg711dec_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstCaps *srccaps;
|
||||
GstBuffer *outbuf = NULL;
|
||||
gint payload_len;
|
||||
guint8 *payload;
|
||||
|
@ -157,6 +158,15 @@ gst_rtpg711dec_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
gst_rtpbuffer_get_marker (buf),
|
||||
gst_rtpbuffer_get_timestamp (buf), gst_rtpbuffer_get_seq (buf));
|
||||
|
||||
srccaps = GST_PAD_CAPS (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload));
|
||||
if (!srccaps) {
|
||||
/* Set the default caps */
|
||||
srccaps = gst_caps_new_simple ("audio/x-mulaw",
|
||||
"channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, 8000, NULL);
|
||||
gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps);
|
||||
gst_caps_unref (srccaps);
|
||||
}
|
||||
|
||||
payload_len = gst_rtpbuffer_get_payload_len (buf);
|
||||
payload = gst_rtpbuffer_get_payload (buf);
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@ static GstStaticPadTemplate gst_rtpg711dec_src_template =
|
|||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS ("audio/x-mulaw, channels = (int) 1; "
|
||||
"audio/x-alaw, channels = (int) 1")
|
||||
GST_STATIC_CAPS ("audio/x-mulaw, "
|
||||
"channels = (int) 1; " "audio/x-alaw, " "channels = (int) 1")
|
||||
);
|
||||
|
||||
static GstBuffer *gst_rtpg711dec_process (GstBaseRTPDepayload * depayload,
|
||||
|
@ -148,6 +148,7 @@ gst_rtpg711dec_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
static GstBuffer *
|
||||
gst_rtpg711dec_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstCaps *srccaps;
|
||||
GstBuffer *outbuf = NULL;
|
||||
gint payload_len;
|
||||
guint8 *payload;
|
||||
|
@ -157,6 +158,15 @@ gst_rtpg711dec_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
gst_rtpbuffer_get_marker (buf),
|
||||
gst_rtpbuffer_get_timestamp (buf), gst_rtpbuffer_get_seq (buf));
|
||||
|
||||
srccaps = GST_PAD_CAPS (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload));
|
||||
if (!srccaps) {
|
||||
/* Set the default caps */
|
||||
srccaps = gst_caps_new_simple ("audio/x-mulaw",
|
||||
"channels", G_TYPE_INT, 1, "rate", G_TYPE_INT, 8000, NULL);
|
||||
gst_pad_set_caps (GST_BASE_RTP_DEPAYLOAD_SRCPAD (depayload), srccaps);
|
||||
gst_caps_unref (srccaps);
|
||||
}
|
||||
|
||||
payload_len = gst_rtpbuffer_get_payload_len (buf);
|
||||
payload = gst_rtpbuffer_get_payload (buf);
|
||||
|
||||
|
|
Loading…
Reference in a new issue