aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_mgcp.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 22:51:48 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-06 22:51:48 +0000
commit4b2fc9d3e738dbb2e7dd297de2f35e571e350691 (patch)
treee611f1c508d4cbd9720858d06c92a4cfaa25dccb /channels/chan_mgcp.c
parentfed34a6362c74a4f65bae5fb89bcae3f58db5f27 (diff)
Commit some cleanups to the format type code.
- Remove the AST_FORMAT_MAX_* types, as these are consuming 3 out of our available 32 bits. - Add a native slin16 type, so that 16kHz codecs can translate without losing resolution. (This doesn't affect anything immediately, until another codec has wb support.) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89071 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_mgcp.c')
-rw-r--r--channels/chan_mgcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 9eb0fa112..b0b138a00 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -2076,7 +2076,7 @@ static int add_sdp(struct mgcp_request *resp, struct mgcp_subchannel *sub, struc
snprintf(c, sizeof(c), "c=IN IP4 %s\r\n", ast_inet_ntoa(dest.sin_addr));
ast_copy_string(t, "t=0 0\r\n", sizeof(t));
snprintf(m, sizeof(m), "m=audio %d RTP/AVP", ntohs(dest.sin_port));
- for (x = 1; x <= AST_FORMAT_MAX_AUDIO; x <<= 1) {
+ for (x = 1; x <= AST_FORMAT_AUDIO_MASK; x <<= 1) {
if (p->capability & x) {
if (mgcpdebug) {
ast_verbose("Answering with capability %d\n", x);
@@ -2142,7 +2142,7 @@ static int transmit_modify_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp
return 0;
}
ast_copy_string(local, "p:20", sizeof(local));
- for (x=1;x<= AST_FORMAT_MAX_AUDIO; x <<= 1) {
+ for (x = 1; x <= AST_FORMAT_AUDIO_MASK; x <<= 1) {
if (p->capability & x) {
snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x, 0));
strncat(local, tmp, sizeof(local) - strlen(local) - 1);
@@ -2172,7 +2172,7 @@ static int transmit_connect_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp
struct mgcp_endpoint *p = sub->parent;
ast_copy_string(local, "p:20", sizeof(local));
- for (x=1;x<= AST_FORMAT_MAX_AUDIO; x <<= 1) {
+ for (x = 1; x <= AST_FORMAT_AUDIO_MASK; x <<= 1) {
if (p->capability & x) {
snprintf(tmp, sizeof(tmp), ", a:%s", ast_rtp_lookup_mime_subtype(1, x, 0));
strncat(local, tmp, sizeof(local) - strlen(local) - 1);