From 7c56918262079b7bd940ddeefa9a659738d83b08 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Tue, 6 Nov 2007 22:51:48 +0000 Subject: 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: https://origsvn.digium.com/svn/asterisk/trunk@89071 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_mgcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'channels/chan_mgcp.c') 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); -- cgit v1.2.3