[telepathy-sofiasip/master] Pass ptime and maxptime properties from the session to codec parameters
Mikhail Zabaluev
mikhail.zabaluev at nokia.com
Mon Jan 4 11:37:14 PST 2010
---
src/sip-media-stream.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/sip-media-stream.c b/src/sip-media-stream.c
index 4a697f4..beff2b2 100644
--- a/src/sip-media-stream.c
+++ b/src/sip-media-stream.c
@@ -1292,6 +1292,8 @@ static void push_remote_codecs (TpsipMediaStream *stream)
GType codec_type;
const sdp_media_t *sdpmedia;
const sdp_rtpmap_t *rtpmap;
+ gchar *ptime = NULL;
+ gchar *max_ptime = NULL;
DEBUG ("enter");
@@ -1311,6 +1313,11 @@ static void push_remote_codecs (TpsipMediaStream *stream)
return;
}
+ g_object_get (priv->session,
+ "remote-ptime", &ptime,
+ "remote-max-ptime", &max_ptime,
+ NULL);
+
codec_type = TP_STRUCT_TYPE_MEDIA_STREAM_HANDLER_CODEC;
codecs_type = TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_CODEC_LIST;
@@ -1332,6 +1339,13 @@ static void push_remote_codecs (TpsipMediaStream *stream)
tpsip_codec_param_parse (priv->media_type, rtpmap->rm_encoding,
rtpmap->rm_fmtp, opt_params);
+ if (ptime != NULL)
+ g_hash_table_insert (opt_params,
+ g_strdup("ptime"), g_strdup (ptime));
+ if (max_ptime != NULL)
+ g_hash_table_insert (opt_params,
+ g_strdup("maxptime"), g_strdup (max_ptime));
+
/* RFC2327: see "m=" line definition
* - note, 'encoding_params' is assumed to be channel
* count (i.e. channels in farsight) */
@@ -1359,6 +1373,8 @@ static void push_remote_codecs (TpsipMediaStream *stream)
}
g_hash_table_destroy (opt_params);
+ g_free (ptime);
+ g_free (max_ptime);
SESSION_DEBUG(priv->session, "passing %d remote codecs to stream engine",
codecs->len);
--
1.5.6.5
More information about the telepathy-commits
mailing list