mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
rtppayload: set standard payload type as default
Initialize the PT to the default value of the codec and check if it is still the default before declaring the pt to be dynamic or not when setting the caps. Also use the PT constants from the rtp lib when possible https://bugzilla.gnome.org/show_bug.cgi?id=747965
This commit is contained in:
parent
e0878d6325
commit
5a17572119
13 changed files with 55 additions and 45 deletions
|
@ -208,16 +208,16 @@ gst_rtp_L16_pay_getcaps (GstRTPBasePayload * rtppayload, GstPad * pad,
|
||||||
if (gst_structure_get_int (structure, "channels", &channels)) {
|
if (gst_structure_get_int (structure, "channels", &channels)) {
|
||||||
gst_caps_set_simple (caps, "channels", G_TYPE_INT, channels, NULL);
|
gst_caps_set_simple (caps, "channels", G_TYPE_INT, channels, NULL);
|
||||||
} else if (gst_structure_get_int (structure, "payload", &pt)) {
|
} else if (gst_structure_get_int (structure, "payload", &pt)) {
|
||||||
if (pt == 10)
|
if (pt == GST_RTP_PAYLOAD_L16_STEREO)
|
||||||
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
|
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
|
||||||
else if (pt == 11)
|
else if (pt == GST_RTP_PAYLOAD_L16_MONO)
|
||||||
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
|
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gst_structure_get_int (structure, "clock-rate", &rate)) {
|
if (gst_structure_get_int (structure, "clock-rate", &rate)) {
|
||||||
gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate, NULL);
|
gst_caps_set_simple (caps, "rate", G_TYPE_INT, rate, NULL);
|
||||||
} else if (gst_structure_get_int (structure, "payload", &pt)) {
|
} else if (gst_structure_get_int (structure, "payload", &pt)) {
|
||||||
if (pt == 10 || pt == 11)
|
if (pt == GST_RTP_PAYLOAD_L16_STEREO || pt == GST_RTP_PAYLOAD_L16_MONO)
|
||||||
gst_caps_set_simple (caps, "rate", G_TYPE_INT, 44100, NULL);
|
gst_caps_set_simple (caps, "rate", G_TYPE_INT, 44100, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,13 +40,18 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
);
|
);
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_g722_pay_src_template =
|
static GstStaticPadTemplate gst_rtp_g722_pay_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("application/x-rtp, "
|
GST_STATIC_CAPS ("application/x-rtp, "
|
||||||
"media = (string) \"audio\", "
|
"media = (string) \"audio\", "
|
||||||
"encoding-name = (string) \"G722\", "
|
"encoding-name = (string) \"G722\", "
|
||||||
"payload = (int) " GST_RTP_PAYLOAD_G722_STRING ", "
|
"payload = (int) " GST_RTP_PAYLOAD_G722_STRING ", "
|
||||||
|
"clock-rate = (int) 8000; "
|
||||||
|
"application/x-rtp, "
|
||||||
|
"media = (string) \"audio\", "
|
||||||
|
"encoding-name = (string) \"G722\", "
|
||||||
|
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
|
||||||
"clock-rate = (int) 8000")
|
"clock-rate = (int) 8000")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -92,6 +97,8 @@ gst_rtp_g722_pay_init (GstRtpG722Pay * rtpg722pay)
|
||||||
|
|
||||||
rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpg722pay);
|
rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtpg722pay);
|
||||||
|
|
||||||
|
GST_RTP_BASE_PAYLOAD (rtpg722pay)->pt = GST_RTP_PAYLOAD_G722;
|
||||||
|
|
||||||
/* tell rtpbaseaudiopayload that this is a sample based codec */
|
/* tell rtpbaseaudiopayload that this is a sample based codec */
|
||||||
gst_rtp_base_audio_payload_set_sample_based (rtpbaseaudiopayload);
|
gst_rtp_base_audio_payload_set_sample_based (rtpbaseaudiopayload);
|
||||||
}
|
}
|
||||||
|
@ -136,8 +143,8 @@ gst_rtp_g722_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
|
||||||
* RFC 3551 although the sampling rate is 16000 Hz */
|
* RFC 3551 although the sampling rate is 16000 Hz */
|
||||||
clock_rate = 8000;
|
clock_rate = 8000;
|
||||||
|
|
||||||
gst_rtp_base_payload_set_options (basepayload, "audio", TRUE, "G722",
|
gst_rtp_base_payload_set_options (basepayload, "audio",
|
||||||
clock_rate);
|
basepayload->pt != GST_RTP_PAYLOAD_G722, "G722", clock_rate);
|
||||||
params = g_strdup_printf ("%d", channels);
|
params = g_strdup_printf ("%d", channels);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -29,9 +29,6 @@
|
||||||
|
|
||||||
#include "gstrtpg723pay.h"
|
#include "gstrtpg723pay.h"
|
||||||
|
|
||||||
#define GST_RTP_PAYLOAD_G723 4
|
|
||||||
#define GST_RTP_PAYLOAD_G723_STRING "4"
|
|
||||||
|
|
||||||
#define G723_FRAME_DURATION (30 * GST_MSECOND)
|
#define G723_FRAME_DURATION (30 * GST_MSECOND)
|
||||||
|
|
||||||
static gboolean gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload,
|
static gboolean gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload,
|
||||||
|
@ -107,7 +104,6 @@ gst_rtp_g723_pay_init (GstRTPG723Pay * pay)
|
||||||
pay->adapter = gst_adapter_new ();
|
pay->adapter = gst_adapter_new ();
|
||||||
|
|
||||||
payload->pt = GST_RTP_PAYLOAD_G723;
|
payload->pt = GST_RTP_PAYLOAD_G723;
|
||||||
gst_rtp_base_payload_set_options (payload, "audio", FALSE, "G723", 8000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -128,16 +124,9 @@ static gboolean
|
||||||
gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
|
gst_rtp_g723_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstStructure *structure;
|
|
||||||
gint pt;
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
|
||||||
if (!gst_structure_get_int (structure, "payload", &pt))
|
|
||||||
pt = GST_RTP_PAYLOAD_G723;
|
|
||||||
|
|
||||||
payload->pt = pt;
|
|
||||||
payload->dynamic = pt != GST_RTP_PAYLOAD_G723;
|
|
||||||
|
|
||||||
|
gst_rtp_base_payload_set_options (payload, "audio",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_G723, "G723", 8000);
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -121,7 +121,6 @@ gst_rtp_g729_pay_init (GstRTPG729Pay * pay)
|
||||||
GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (pay);
|
GstRTPBasePayload *payload = GST_RTP_BASE_PAYLOAD (pay);
|
||||||
|
|
||||||
payload->pt = GST_RTP_PAYLOAD_G729;
|
payload->pt = GST_RTP_PAYLOAD_G729;
|
||||||
gst_rtp_base_payload_set_options (payload, "audio", FALSE, "G729", 8000);
|
|
||||||
|
|
||||||
pay->adapter = gst_adapter_new ();
|
pay->adapter = gst_adapter_new ();
|
||||||
}
|
}
|
||||||
|
@ -140,15 +139,9 @@ static gboolean
|
||||||
gst_rtp_g729_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
|
gst_rtp_g729_pay_set_caps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstStructure *structure;
|
|
||||||
gint pt;
|
|
||||||
|
|
||||||
structure = gst_caps_get_structure (caps, 0);
|
gst_rtp_base_payload_set_options (payload, "audio",
|
||||||
if (!gst_structure_get_int (structure, "payload", &pt))
|
payload->pt != GST_RTP_PAYLOAD_G729, "G729", 8000);
|
||||||
pt = GST_RTP_PAYLOAD_G729;
|
|
||||||
|
|
||||||
payload->pt = pt;
|
|
||||||
payload->dynamic = pt != GST_RTP_PAYLOAD_G729;
|
|
||||||
|
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,8 @@ gst_rtp_gsm_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
if (strcmp ("audio/x-gsm", stname))
|
if (strcmp ("audio/x-gsm", stname))
|
||||||
goto invalid_type;
|
goto invalid_type;
|
||||||
|
|
||||||
gst_rtp_base_payload_set_options (payload, "audio", FALSE, "GSM", 8000);
|
gst_rtp_base_payload_set_options (payload, "audio",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_GSM, "GSM", 8000);
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -1018,7 +1018,8 @@ gst_rtp_h261_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
gst_rtp_base_payload_set_options (payload, "video", TRUE, "H261", 90000);
|
gst_rtp_base_payload_set_options (payload, "video",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_H261, "H261", 90000);
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -440,6 +440,7 @@ gst_rtp_h263_pay_class_init (GstRtpH263PayClass * klass)
|
||||||
static void
|
static void
|
||||||
gst_rtp_h263_pay_init (GstRtpH263Pay * rtph263pay)
|
gst_rtp_h263_pay_init (GstRtpH263Pay * rtph263pay)
|
||||||
{
|
{
|
||||||
|
GST_RTP_BASE_PAYLOAD_PT (rtph263pay) = GST_RTP_PAYLOAD_H263;
|
||||||
rtph263pay->prop_payload_mode = DEFAULT_MODE_A;
|
rtph263pay->prop_payload_mode = DEFAULT_MODE_A;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,8 +477,8 @@ gst_rtp_h263_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
framesize = g_strdup_printf ("%d-%d", width, height);
|
framesize = g_strdup_printf ("%d-%d", width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
payload->pt = GST_RTP_PAYLOAD_H263;
|
gst_rtp_base_payload_set_options (payload, "video",
|
||||||
gst_rtp_base_payload_set_options (payload, "video", TRUE, "H263", 90000);
|
payload->pt != GST_RTP_PAYLOAD_H263, "H263", 90000);
|
||||||
|
|
||||||
if (framesize != NULL) {
|
if (framesize != NULL) {
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload,
|
res = gst_rtp_base_payload_set_outcaps (payload,
|
||||||
|
|
|
@ -49,12 +49,18 @@ static GstStaticPadTemplate gst_rtp_jpeg_pay_sink_template =
|
||||||
);
|
);
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_jpeg_pay_src_template =
|
static GstStaticPadTemplate gst_rtp_jpeg_pay_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("application/x-rtp, "
|
GST_STATIC_CAPS ("application/x-rtp, "
|
||||||
" media = (string) \"video\", "
|
" media = (string) \"video\", "
|
||||||
" payload = (int) 26 , "
|
" payload = (int) " GST_RTP_PAYLOAD_JPEG_STRING ", "
|
||||||
|
" clock-rate = (int) 90000, "
|
||||||
|
" encoding-name = (string) \"JPEG\", "
|
||||||
|
" width = (int) [ 1, 65536 ], " " height = (int) [ 1, 65536 ]; "
|
||||||
|
" application/x-rtp, "
|
||||||
|
" media = (string) \"video\", "
|
||||||
|
" payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
|
||||||
" clock-rate = (int) 90000, "
|
" clock-rate = (int) 90000, "
|
||||||
" encoding-name = (string) \"JPEG\", "
|
" encoding-name = (string) \"JPEG\", "
|
||||||
" width = (int) [ 1, 65536 ], " " height = (int) [ 1, 65536 ]")
|
" width = (int) [ 1, 65536 ], " " height = (int) [ 1, 65536 ]")
|
||||||
|
@ -283,6 +289,8 @@ gst_rtp_jpeg_pay_init (GstRtpJPEGPay * pay)
|
||||||
pay->type = DEFAULT_JPEG_TYPE;
|
pay->type = DEFAULT_JPEG_TYPE;
|
||||||
pay->width = -1;
|
pay->width = -1;
|
||||||
pay->height = -1;
|
pay->height = -1;
|
||||||
|
|
||||||
|
GST_RTP_BASE_PAYLOAD_PT (pay) = GST_RTP_PAYLOAD_JPEG;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -321,7 +329,8 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps)
|
||||||
pay->width = GST_ROUND_UP_8 (width) / 8;
|
pay->width = GST_ROUND_UP_8 (width) / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_rtp_base_payload_set_options (basepayload, "video", TRUE, "JPEG", 90000);
|
gst_rtp_base_payload_set_options (basepayload, "video",
|
||||||
|
basepayload->pt != GST_RTP_PAYLOAD_JPEG, "JPEG", 90000);
|
||||||
|
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
gdouble framerate;
|
gdouble framerate;
|
||||||
|
|
|
@ -112,7 +112,8 @@ gst_rtp_mp2t_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
gst_rtp_base_payload_set_options (payload, "video", TRUE, "MP2T", 90000);
|
gst_rtp_base_payload_set_options (payload, "video",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_MP2T, "MP2T", 90000);
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -104,6 +104,8 @@ static void
|
||||||
gst_rtp_mpa_pay_init (GstRtpMPAPay * rtpmpapay)
|
gst_rtp_mpa_pay_init (GstRtpMPAPay * rtpmpapay)
|
||||||
{
|
{
|
||||||
rtpmpapay->adapter = gst_adapter_new ();
|
rtpmpapay->adapter = gst_adapter_new ();
|
||||||
|
|
||||||
|
GST_RTP_BASE_PAYLOAD (rtpmpapay)->pt = GST_RTP_PAYLOAD_MPA;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -133,7 +135,8 @@ gst_rtp_mpa_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
gst_rtp_base_payload_set_options (payload, "audio", TRUE, "MPA", 90000);
|
gst_rtp_base_payload_set_options (payload, "audio",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_MPA, "MPA", 90000);
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -39,12 +39,16 @@ GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
);
|
);
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_rtp_mpv_pay_src_template =
|
static GstStaticPadTemplate gst_rtp_mpv_pay_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC,
|
GST_PAD_SRC,
|
||||||
GST_PAD_ALWAYS,
|
GST_PAD_ALWAYS,
|
||||||
GST_STATIC_CAPS ("application/x-rtp, "
|
GST_STATIC_CAPS ("application/x-rtp, "
|
||||||
"media = (string) \"video\", "
|
"media = (string) \"video\", "
|
||||||
"payload = (int) " GST_RTP_PAYLOAD_MPV_STRING ", "
|
"payload = (int) " GST_RTP_PAYLOAD_MPV_STRING ", "
|
||||||
|
"clock-rate = (int) 90000, " "encoding-name = (string) \"MPV\"; "
|
||||||
|
"application/x-rtp, "
|
||||||
|
"media = (string) \"video\", "
|
||||||
|
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
|
||||||
"clock-rate = (int) 90000, " "encoding-name = (string) \"MPV\"")
|
"clock-rate = (int) 90000, " "encoding-name = (string) \"MPV\"")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -131,7 +135,8 @@ gst_rtp_mpv_pay_reset (GstRTPMPVPay * pay)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_rtp_mpv_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
gst_rtp_mpv_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gst_rtp_base_payload_set_options (payload, "video", FALSE, "MPV", 90000);
|
gst_rtp_base_payload_set_options (payload, "video",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_MPV, "MPV", 90000);
|
||||||
return gst_rtp_base_payload_set_outcaps (payload, NULL);
|
return gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,7 @@ gst_rtp_pcma_pay_init (GstRtpPcmaPay * rtppcmapay)
|
||||||
|
|
||||||
rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtppcmapay);
|
rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtppcmapay);
|
||||||
|
|
||||||
|
GST_RTP_BASE_PAYLOAD (rtppcmapay)->pt = GST_RTP_PAYLOAD_PCMA;
|
||||||
GST_RTP_BASE_PAYLOAD (rtppcmapay)->clock_rate = 8000;
|
GST_RTP_BASE_PAYLOAD (rtppcmapay)->clock_rate = 8000;
|
||||||
|
|
||||||
/* tell rtpbaseaudiopayload that this is a sample based codec */
|
/* tell rtpbaseaudiopayload that this is a sample based codec */
|
||||||
|
@ -100,9 +101,8 @@ gst_rtp_pcma_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
payload->pt = GST_RTP_PAYLOAD_PCMA;
|
gst_rtp_base_payload_set_options (payload, "audio",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_PCMA, "PCMA", 8000);
|
||||||
gst_rtp_base_payload_set_options (payload, "audio", FALSE, "PCMA", 8000);
|
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -86,6 +86,7 @@ gst_rtp_pcmu_pay_init (GstRtpPcmuPay * rtppcmupay)
|
||||||
|
|
||||||
rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtppcmupay);
|
rtpbaseaudiopayload = GST_RTP_BASE_AUDIO_PAYLOAD (rtppcmupay);
|
||||||
|
|
||||||
|
GST_RTP_BASE_PAYLOAD (rtppcmupay)->pt = GST_RTP_PAYLOAD_PCMU;
|
||||||
GST_RTP_BASE_PAYLOAD (rtppcmupay)->clock_rate = 8000;
|
GST_RTP_BASE_PAYLOAD (rtppcmupay)->clock_rate = 8000;
|
||||||
|
|
||||||
/* tell rtpbaseaudiopayload that this is a sample based codec */
|
/* tell rtpbaseaudiopayload that this is a sample based codec */
|
||||||
|
@ -100,9 +101,8 @@ gst_rtp_pcmu_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
payload->pt = GST_RTP_PAYLOAD_PCMU;
|
gst_rtp_base_payload_set_options (payload, "audio",
|
||||||
|
payload->pt != GST_RTP_PAYLOAD_PCMU, "PCMU", 8000);
|
||||||
gst_rtp_base_payload_set_options (payload, "audio", FALSE, "PCMU", 8000);
|
|
||||||
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
res = gst_rtp_base_payload_set_outcaps (payload, NULL);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in a new issue