diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-01 20:27:37 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-12-01 20:27:37 +0000 |
commit | f4d89e410ae1f1df4247b72ed19a97222113e8e7 (patch) | |
tree | 72344fb3a18484772df8f496cc1f9be6e902c64f /include | |
parent | f925470a1b0577798cad89472fbc14657a6a4d58 (diff) |
More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we
found several unhandled cases, where a 32-bit integer was still being used to
handle a codec field. Most of these have been fixed with this commit, although
there is at least one case (codec_dahdi) which depends upon outside headers to
be altered before a conversion can be made.
(Fixes AST-278, SWP-459)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231850 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/callerid.h | 16 | ||||
-rw-r--r-- | include/asterisk/rtp_engine.h | 4 |
2 files changed, 11 insertions, 9 deletions
diff --git a/include/asterisk/callerid.h b/include/asterisk/callerid.h index 717248c12..c5e24a30a 100644 --- a/include/asterisk/callerid.h +++ b/include/asterisk/callerid.h @@ -45,6 +45,8 @@ #ifndef _ASTERISK_CALLERID_H #define _ASTERISK_CALLERID_H +#include "asterisk/frame_defs.h" + #define MAX_CALLERID_SIZE 32000 #define CID_PRIVATE_NAME (1 << 0) @@ -99,7 +101,7 @@ void callerid_init(void); * \return It returns the size * (in bytes) of the data (if it returns a size of 0, there is probably an error) */ -int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, int codec); +int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, format_t codec); /*! \brief Create a callerID state machine * \param cid_signalling Type of signalling in use @@ -122,7 +124,7 @@ struct callerid_state *callerid_new(int cid_signalling); * \retval 0 for "needs more samples" * \retval 1 if the CallerID spill reception is complete. */ -int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec); +int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, format_t codec); /*! \brief Read samples into the state machine. * \param cid Which state machine to act upon @@ -136,7 +138,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, * \retval 0 for "needs more samples" * \retval 1 if the CallerID spill reception is complete. */ -int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec); +int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, format_t codec); /*! \brief Extract info out of callerID state machine. Flags are listed above * \param cid Callerid state machine to act upon @@ -175,7 +177,7 @@ void callerid_free(struct callerid_state *cid); * \details * Acts like callerid_generate except uses an asterisk format callerid string. */ -int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int codec); +int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, format_t codec); /*! * \brief Generate message waiting indicator @@ -185,13 +187,13 @@ int ast_callerid_generate(unsigned char *buf, const char *name, const char *numb * \see callerid_generate() for more info as it uses the same encoding * \version 1.6.1 changed mdmf parameter to type, added name, number and flags for caller id message generation */ -int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, int codec, const char *name, +int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, format_t codec, const char *name, const char *number, int flags); /*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm) * \see ast_callerid_generate() for other details */ -int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, int codec); +int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, format_t codec); /*! \brief Destructively parse inbuf into name and location (or number) * \details @@ -216,7 +218,7 @@ int ast_callerid_parse(char *instr, char **name, char **location); * \param codec Which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW) * \return Returns -1 on error (if len is less than 2400), 0 on success. */ -int ast_gen_cas(unsigned char *outbuf, int sas, int len, int codec); +int ast_gen_cas(unsigned char *outbuf, int sas, int len, format_t codec); /*! * \brief Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s... diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 731c807ed..4aeea3478 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -364,7 +364,7 @@ struct ast_rtp_engine { /*! Callback to request that the RTP engine send a STUN BIND request */ void (*stun_request)(struct ast_rtp_instance *instance, struct sockaddr_in *suggestion, const char *username); /*! Callback to get the transcodeable formats supported */ - int (*available_formats)(struct ast_rtp_instance *instance, int to_endpoint, int to_asterisk); + int (*available_formats)(struct ast_rtp_instance *instance, format_t to_endpoint, format_t to_asterisk); /*! Linked list information */ AST_RWLIST_ENTRY(ast_rtp_engine) entry; }; @@ -1527,7 +1527,7 @@ int ast_rtp_instance_make_compatible(struct ast_channel *chan, struct ast_rtp_in * * \since 1.6.3 */ -format_t ast_rtp_instance_available_formats(struct ast_rtp_instance *instance, int to_endpoint, int to_asterisk); +format_t ast_rtp_instance_available_formats(struct ast_rtp_instance *instance, format_t to_endpoint, format_t to_asterisk); /*! * \brief Indicate to the RTP engine that packets are now expected to be sent/received on the RTP instance |