From e8641db25bf5f35576727d5900f20e967ea71ce9 Mon Sep 17 00:00:00 2001 From: russell Date: Tue, 3 Apr 2007 22:33:03 +0000 Subject: Add support for RTP packetization in chan_jingle and chan_gtalk. (issue #9416, phsultan) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60011 f38db490-d61c-443f-a65b-d21fe96a405b --- channels/chan_gtalk.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'channels/chan_gtalk.c') diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c index 4958ccdb4..bab6f9217 100644 --- a/channels/chan_gtalk.c +++ b/channels/chan_gtalk.c @@ -857,6 +857,9 @@ static struct gtalk_pvt *gtalk_alloc(struct gtalk *client, const char *us, const if (!(tmp = ast_calloc(1, sizeof(*tmp)))) { return NULL; } + + memcpy(&tmp->prefs, &client->prefs, sizeof(struct ast_codec_pref)); + if (sid) { ast_copy_string(tmp->sid, sid, sizeof(tmp->sid)); ast_copy_string(tmp->them, them, sizeof(tmp->them)); @@ -917,6 +920,11 @@ static struct ast_channel *gtalk_new(struct gtalk *client, struct gtalk_pvt *i, what = i->capability; else what = global_capability; + + /* Set Frame packetization */ + if (i->rtp) + ast_rtp_codec_setpref(i->rtp, &i->prefs); + tmp->nativeformats = ast_codec_choose(&i->prefs, what, 1) | (i->jointcapability & AST_FORMAT_VIDEO_MASK); fmt = ast_best_codec(tmp->nativeformats); -- cgit v1.2.3