mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-06 03:25:31 +00:00
sip: media: use number types for payload id and clock rate
This is needed for the next commits where we check the received SDP offers/answers.
This commit is contained in:
parent
7d113d4180
commit
157dc1fffb
3 changed files with 11 additions and 11 deletions
|
@ -121,9 +121,9 @@ calls_sip_media_manager_static_capabilities (CallsSipMediaManager *self,
|
|||
for (node = self->supported_codecs; node != NULL; node = node->next) {
|
||||
MediaCodecInfo *codec = node->data;
|
||||
|
||||
g_string_append_printf (media_line, " %s", codec->payload_id);
|
||||
g_string_append_printf (media_line, " %u", codec->payload_id);
|
||||
g_string_append_printf (attribute_lines,
|
||||
"a=rtpmap:%s %s/%s%s",
|
||||
"a=rtpmap:%u %s/%u%s",
|
||||
codec->payload_id,
|
||||
codec->name,
|
||||
codec->clock_rate,
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
|
||||
/* Use the following codecs in order of preference */
|
||||
static MediaCodecInfo gst_codecs[] = {
|
||||
{"8", "PCMA", "8000", 1, "rtppcmapay", "rtppcmadepay", "alawenc", "alawdec"},
|
||||
{"0", "PCMU", "8000", 1, "rtppcmupay", "rtppcmudepay", "mulawenc", "mulawdec"},
|
||||
{"3", "GSM", "8000", 1, "rtpgsmpay", "rtpgsmdepay", "gsmenc", "gsmdec"},
|
||||
{"9", "G722", "8000", 1, "rtpg722pay", "rtpg722depay", "avenc_g722", "avdec_g722"},
|
||||
{"4", "G723", "8000", 1, "rtpg723pay", "rtpg723depay", "avenc_g723_1", "avdec_g723_1"}, // does not seem to work
|
||||
{8, "PCMA", 8000, 1, "rtppcmapay", "rtppcmadepay", "alawenc", "alawdec"},
|
||||
{0, "PCMU", 8000, 1, "rtppcmupay", "rtppcmudepay", "mulawenc", "mulawdec"},
|
||||
{3, "GSM", 8000, 1, "rtpgsmpay", "rtpgsmdepay", "gsmenc", "gsmdec"},
|
||||
{9, "G722", 8000, 1, "rtpg722pay", "rtpg722depay", "avenc_g722", "avdec_g722"},
|
||||
{4, "G723", 8000, 1, "rtpg723pay", "rtpg723depay", "avenc_g723_1", "avdec_g723_1"}, // does not seem to work
|
||||
};
|
||||
|
||||
|
||||
|
@ -58,8 +58,8 @@ media_codec_by_name (const char *name)
|
|||
gchar *
|
||||
media_codec_get_gst_capabilities (MediaCodecInfo *codec)
|
||||
{
|
||||
return g_strdup_printf ("application/x-rtp,media=(string)audio,clock-rate=(int)%s"
|
||||
",encoding-name=(string)%s,payload=(int)%s",
|
||||
return g_strdup_printf ("application/x-rtp,media=(string)audio,clock-rate=(int)%u"
|
||||
",encoding-name=(string)%s,payload=(int)%u",
|
||||
codec->clock_rate,
|
||||
codec->name,
|
||||
codec->payload_id);
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
*/
|
||||
|
||||
typedef struct {
|
||||
char *payload_id;
|
||||
guint payload_id;
|
||||
char *name;
|
||||
char *clock_rate;
|
||||
gint clock_rate;
|
||||
gint channels;
|
||||
char *gst_payloader_name;
|
||||
char *gst_depayloader_name;
|
||||
|
|
Loading…
Reference in a new issue