]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Add support for RTP packetization in chan_jingle and chan_gtalk.
authorRussell Bryant <russell@russellbryant.com>
Tue, 3 Apr 2007 22:33:03 +0000 (22:33 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 3 Apr 2007 22:33:03 +0000 (22:33 +0000)
(issue #9416, phsultan)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60011 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_gtalk.c
channels/chan_jingle.c
doc/rtp-packetization.txt

index 4958ccdb4e784be146ab8157682249e1e66acf08..bab6f921723f3364d15450c41ed2bd535f107c44 100644 (file)
@@ -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);
 
index 1d30324655402ac0c5e4e9740bb36feb909faaa6..87fb37955022dca50bf1ee195d68ccd0c54c9ded 100644 (file)
@@ -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);
 
index 647375a9831e45a1c85450f36d5db68b978b15f8..c558a538ea0c61b2a471e6349fcaa97c07041278 100644 (file)
@@ -11,6 +11,8 @@ or global level:
     chan_skinny
     chan_h323
     chan_ooh323 (Asterisk-Addons)
+    chan_gtalk
+    chan_jingle
 
 Configuration
 -------