aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_jingle.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 22:33:03 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 22:33:03 +0000
commite8641db25bf5f35576727d5900f20e967ea71ce9 (patch)
treee3b3b3451d397a8df6321854986eafc3b458334f /channels/chan_jingle.c
parent38bb3d18410bf22b0686775fc677e358358d9981 (diff)
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
Diffstat (limited to 'channels/chan_jingle.c')
-rw-r--r--channels/chan_jingle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c
index 1d3032465..87fb37955 100644
--- a/channels/chan_jingle.c
+++ b/channels/chan_jingle.c
@@ -726,6 +726,9 @@ static struct jingle_pvt *jingle_alloc(struct jingle *client, const char *from,
if (!(tmp = ast_calloc(1, sizeof(*tmp)))) {
return NULL;
}
+
+ memcpy(&tmp->prefs, &client->prefs, sizeof(tmp->prefs));
+
if (sid) {
ast_copy_string(tmp->sid, sid, sizeof(tmp->sid));
ast_copy_string(tmp->from, from, sizeof(tmp->from));
@@ -777,6 +780,11 @@ static struct ast_channel *jingle_new(struct jingle *client, struct jingle_pvt *
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);