[asterisk-commits] dvossel: branch dvossel/fixtheworld_phase1_step3 r300564 - in /team/dvossel/f...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 4 23:12:54 UTC 2011


Author: dvossel
Date: Tue Jan  4 17:12:50 2011
New Revision: 300564

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=300564
Log:
changes to callerid.c required for ast_format conversion

Modified:
    team/dvossel/fixtheworld_phase1_step3/include/asterisk/callerid.h
    team/dvossel/fixtheworld_phase1_step3/main/callerid.c

Modified: team/dvossel/fixtheworld_phase1_step3/include/asterisk/callerid.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/include/asterisk/callerid.h?view=diff&rev=300564&r1=300563&r2=300564
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/include/asterisk/callerid.h (original)
+++ team/dvossel/fixtheworld_phase1_step3/include/asterisk/callerid.h Tue Jan  4 17:12:50 2011
@@ -75,8 +75,8 @@
 /*! MWI MDMF format -- generate name, callerid, date and MWI fields */
 #define CID_MWI_TYPE_MDMF_FULL	0x02
 
-#define AST_LIN2X(a) ((codec == AST_FORMAT_ALAW) ? (AST_LIN2A(a)) : (AST_LIN2MU(a)))
-#define AST_XLAW(a) ((codec == AST_FORMAT_ALAW) ? (AST_ALAW(a)) : (AST_MULAW(a)))
+#define AST_LIN2X(a) ((codec->id == AST_FORMAT_ALAW) ? (AST_LIN2A(a)) : (AST_LIN2MU(a)))
+#define AST_XLAW(a) ((codec->id == AST_FORMAT_ALAW) ? (AST_ALAW(a)) : (AST_MULAW(a)))
 
 
 struct callerid_state;

Modified: team/dvossel/fixtheworld_phase1_step3/main/callerid.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step3/main/callerid.c?view=diff&rev=300564&r1=300563&r2=300564
==============================================================================
--- team/dvossel/fixtheworld_phase1_step3/main/callerid.c (original)
+++ team/dvossel/fixtheworld_phase1_step3/main/callerid.c Tue Jan  4 17:12:50 2011
@@ -71,7 +71,7 @@
 
 #define AST_CALLERID_UNKNOWN	"<unknown>"
 
-static inline void gen_tones(unsigned char *buf, int len, format_t codec, float ddr1, float ddi1, float ddr2, float ddi2, float *cr1, float *ci1, float *cr2, float *ci2)
+static inline void gen_tones(unsigned char *buf, int len, struct ast_format *codec, float ddr1, float ddi1, float ddr2, float ddi2, float *cr1, float *ci1, float *cr2, float *ci2)
 {
 	int x;
 	float t;
@@ -93,7 +93,7 @@
 	}
 }
 
-static inline void gen_tone(unsigned char *buf, int len, format_t codec, float ddr1, float ddi1, float *cr1, float *ci1)
+static inline void gen_tone(unsigned char *buf, int len, struct ast_format *codec, float ddr1, float ddi1, float *cr1, float *ci1)
 {
 	int x;
 	float t;
@@ -255,7 +255,7 @@
 	}
 }
 
-int ast_gen_cas(unsigned char *outbuf, int sendsas, int len, format_t codec)
+int ast_gen_cas(unsigned char *outbuf, int sendsas, int len, struct ast_format *codec)
 {
 	int pos = 0;
 	int saslen = 2400;
@@ -300,7 +300,7 @@
    	return crc;
 }
 
-int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, format_t codec)
+int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int len, struct ast_format *codec)
 {
 	int mylen = len;
 	int olen;
@@ -539,7 +539,7 @@
 }
 
 
-int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, format_t codec)
+int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int len, struct ast_format *codec)
 {
 	int mylen = len;
 	int olen;
@@ -791,7 +791,7 @@
 	
 }
 
-int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, format_t codec,
+int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, struct ast_format *codec,
 			       const char* name, const char* number, int flags)
 {
 	char msg[256];
@@ -879,7 +879,7 @@
 	return bytes;
 }
 
-int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, format_t codec)
+int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, struct ast_format *codec)
 {
 	int bytes = 0;
 	int x, sum;
@@ -1038,7 +1038,7 @@
 	return 0;
 }
 
-static int __ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int callwaiting, format_t codec)
+static int __ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int callwaiting, struct ast_format *codec)
 {
 	if (ast_strlen_zero(name))
 		name = NULL;
@@ -1047,12 +1047,12 @@
 	return callerid_generate(buf, number, name, 0, callwaiting, codec);
 }
 
-int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, format_t codec)
+int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, struct ast_format *codec)
 {
 	return __ast_callerid_generate(buf, name, number, 0, codec);
 }
 
-int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, format_t codec)
+int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, struct ast_format *codec)
 {
 	return __ast_callerid_generate(buf, name, number, 1, codec);
 }




More information about the asterisk-commits mailing list