[svn-commits] oej: branch oej/sip-t140-red r116181 - in /team/oej/sip-t140-red: channels/ i...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 14 03:56:28 CDT 2008


Author: oej
Date: Wed May 14 03:56:23 2008
New Revision: 116181

URL: http://svn.digium.com/view/asterisk?view=rev&rev=116181
Log:
Small syntax change

Modified:
    team/oej/sip-t140-red/channels/chan_sip.c
    team/oej/sip-t140-red/include/asterisk/frame.h
    team/oej/sip-t140-red/main/frame.c
    team/oej/sip-t140-red/main/rtp.c

Modified: team/oej/sip-t140-red/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-t140-red/channels/chan_sip.c?view=diff&rev=116181&r1=116180&r2=116181
==============================================================================
--- team/oej/sip-t140-red/channels/chan_sip.c (original)
+++ team/oej/sip-t140-red/channels/chan_sip.c Wed May 14 03:56:23 2008
@@ -6896,7 +6896,7 @@
 	p->peercapability = newpeercapability;		        /* The other sides capability in latest offer */
 	p->jointnoncodeccapability = newnoncodeccapability;	/* DTMF capabilities */
 
-	if (p->jointcapability & AST_FORMAT_RED) {
+	if (p->jointcapability & AST_FORMAT_T140RED) {
 		p->red = 1; 
 		rtp_red_init(p->trtp, 300, red_data_pt, 2);
 	} else {
@@ -7816,7 +7816,7 @@
 			 ast_rtp_lookup_mime_subtype(1, codec, 0), sample_rate);
 	/* Add fmtp code here */
 
-	if (codec == AST_FORMAT_RED) {
+	if (codec == AST_FORMAT_T140RED) {
 		ast_str_append(a_buf, 0, "a=fmtp:%d %d/%d/%d\r\n", rtp_code, 
 			 ast_rtp_lookup_code(p->trtp, 1, AST_FORMAT_T140),
 			 ast_rtp_lookup_code(p->trtp, 1, AST_FORMAT_T140),

Modified: team/oej/sip-t140-red/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/team/oej/sip-t140-red/include/asterisk/frame.h?view=diff&rev=116181&r1=116180&r2=116181
==============================================================================
--- team/oej/sip-t140-red/include/asterisk/frame.h (original)
+++ team/oej/sip-t140-red/include/asterisk/frame.h Wed May 14 03:56:23 2008
@@ -273,9 +273,9 @@
 /*! T.140 Text format - ITU T.140, RFC 4103 */
 #define AST_FORMAT_T140		(1 << 26)
 /*! T.140 RED Text format RFC 4103 */
-#define AST_FORMAT_RED          (1 << 25)
+#define AST_FORMAT_T140RED      (1 << 27)
 /*! Maximum text mask */
-#define AST_FORMAT_MAX_TEXT	(1 << 27)
+#define AST_FORMAT_MAX_TEXT	(1 << 28))
 #define AST_FORMAT_TEXT_MASK   (((1 << 30)-1) & ~(AST_FORMAT_AUDIO_MASK) & ~(AST_FORMAT_VIDEO_MASK))
 
 enum ast_control_frame_type {

Modified: team/oej/sip-t140-red/main/frame.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-t140-red/main/frame.c?view=diff&rev=116181&r1=116180&r2=116181
==============================================================================
--- team/oej/sip-t140-red/main/frame.c (original)
+++ team/oej/sip-t140-red/main/frame.c Wed May 14 03:56:23 2008
@@ -119,7 +119,7 @@
 	{ AST_FORMAT_H263_PLUS, "h263p", 0, "H.263+ Video" },                                                  /*!< H.263plus passthrough support See format_h263.c */
 	{ AST_FORMAT_H264, "h264", 0, "H.264 Video" },                                                         /*!< Passthrough support, see format_h263.c */
 	{ AST_FORMAT_MP4_VIDEO, "mpeg4", 0, "MPEG4 Video" },                                                   /*!< Passthrough support for MPEG4 */
-	{ AST_FORMAT_RED, "red", 1, "T.140 Realtime Text with redundancy"},                                       	/*!< Redundant T.140 Realtime Text */
+	{ AST_FORMAT_T140RED, "red", 1, "T.140 Realtime Text with redundancy"},                                 /*!< Redundant T.140 Realtime Text */
 	{ AST_FORMAT_T140, "t140", 0, "Passthrough T.140 Realtime Text" },                                     /*!< Passthrough support for T.140 Realtime Text */
 };
 

Modified: team/oej/sip-t140-red/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/sip-t140-red/main/rtp.c?view=diff&rev=116181&r1=116180&r2=116181
==============================================================================
--- team/oej/sip-t140-red/main/rtp.c (original)
+++ team/oej/sip-t140-red/main/rtp.c Wed May 14 03:56:23 2008
@@ -1637,7 +1637,7 @@
 		  *data = 0xBD;
 	}
  
-	if (rtp->f.subclass == AST_FORMAT_RED) {
+	if (rtp->f.subclass == AST_FORMAT_T140RED) {
 		unsigned char *data = rtp->f.data;
 		unsigned char *header_end;
 		int num_generations;
@@ -1751,7 +1751,7 @@
 	{{1, AST_FORMAT_H263_PLUS}, "video", "h263-1998"},
 	{{1, AST_FORMAT_H264}, "video", "H264"},
 	{{1, AST_FORMAT_MP4_VIDEO}, "video", "MP4V-ES"},
-	{{1, AST_FORMAT_RED}, "text", "RED"},
+	{{1, AST_FORMAT_T140RED}, "text", "RED"},
 	{{1, AST_FORMAT_T140}, "text", "T140"},
 };
 
@@ -1793,7 +1793,7 @@
 	[101] = {0, AST_RTP_DTMF},
 	[103] = {1, AST_FORMAT_H263_PLUS},
 	[104] = {1, AST_FORMAT_MP4_VIDEO},
-	[105] = {1, AST_FORMAT_RED},	/* Real time text chat */
+	[105] = {1, AST_FORMAT_T140RED},	/* Real time text chat (with redundancy encoding) */
 	[106] = {1, AST_FORMAT_T140},	/* Real time text chat */
 	[110] = {1, AST_FORMAT_SPEEX},
 	[111] = {1, AST_FORMAT_G726},
@@ -4420,12 +4420,11 @@
 	struct rtp_red *r;
 	int x;
 	
-	if (!(r = ast_malloc(sizeof(struct rtp_red))))
+	if (!(r = ast_calloc(1, sizeof(struct rtp_red))))
 		return -1;
 
-	memset(r, 0, sizeof(struct rtp_red)); 
 	r->t140.frametype = AST_FRAME_TEXT;
-	r->t140.subclass = AST_FORMAT_RED;
+	r->t140.subclass = AST_FORMAT_T140RED;
 	r->t140.data = &r->buf_data; 
 
 	r->t140.ts = 0;




More information about the svn-commits mailing list