summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubos Dolezel <lubos@dolezel.info>2015-06-15 14:37:30 +0200
committerLubos Dolezel <lubos@dolezel.info>2015-06-15 14:37:30 +0200
commit541d947a9e41cb63ccc8e7c63c3aa1a63d4920b0 (patch)
treeafe0b342a9a639ba6d5471d3397822e19988624f
parent9e8d4db7789c0d8476f02610a3e1579782228f47 (diff)
downloadtwinkle-541d947a9e41cb63ccc8e7c63c3aa1a63d4920b0.tar
twinkle-541d947a9e41cb63ccc8e7c63c3aa1a63d4920b0.tar.gz
twinkle-541d947a9e41cb63ccc8e7c63c3aa1a63d4920b0.tar.lz
twinkle-541d947a9e41cb63ccc8e7c63c3aa1a63d4920b0.tar.xz
twinkle-541d947a9e41cb63ccc8e7c63c3aa1a63d4920b0.zip
G.729A support is complete (resolves #15)
-rw-r--r--src/sdp/sdp.cpp2
-rw-r--r--src/user.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/sdp/sdp.cpp b/src/sdp/sdp.cpp
index dfb01cf..eda2c5e 100644
--- a/src/sdp/sdp.cpp
+++ b/src/sdp/sdp.cpp
@@ -661,6 +661,8 @@ t_audio_codec t_sdp::get_rtpmap_codec(const string &rtpmap) const {
return CODEC_G726_32;
} else if (cmp_nocase(codec_name, SDP_AC_NAME_G726_40) == 0 && sample_rate == 8000) {
return CODEC_G726_40;
+ } else if (cmp_nocase(codec_name, SDP_AC_NAME_G729) == 0 && sample_rate == 8000) {
+ return CODEC_G729A;
} else if (cmp_nocase(codec_name, SDP_AC_NAME_TELEPHONE_EV) == 0) {
return CODEC_TELEPHONE_EVENT;
}
diff --git a/src/user.cpp b/src/user.cpp
index 38978eb..a6a2a95 100644
--- a/src/user.cpp
+++ b/src/user.cpp
@@ -369,12 +369,12 @@ t_user::t_user() {
#ifdef HAVE_ILBC
codecs.push_back(CODEC_ILBC);
#endif
-#ifdef HAVE_BCG729
- codecs.push_back(CODEC_G729A);
-#endif
codecs.push_back(CODEC_G711_ALAW);
codecs.push_back(CODEC_G711_ULAW);
codecs.push_back(CODEC_GSM);
+#ifdef HAVE_BCG729
+ codecs.push_back(CODEC_G729A);
+#endif
ptime = 20;
out_obey_far_end_codec_pref = true;
in_obey_far_end_codec_pref = true;