diff options
author | (no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-23 23:57:41 +0000 |
---|---|---|
committer | (no author) <(no author)@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-23 23:57:41 +0000 |
commit | 7d97c27137f894688512e675a70cdf81d467e1c7 (patch) | |
tree | 352cc78f938b7c42f5489f0f3a890daa6c4a87d9 /include/asterisk | |
parent | 27a9c96742202c8188b53a0173649de479256b69 (diff) |
This commit was manufactured by cvs2svn to create tag 'v1-0-5'.
git-svn-id: http://svn.digium.com/svn/asterisk/tags/v1-0-5@4884 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk')
-rwxr-xr-x | include/asterisk/cdr.h | 2 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 4 | ||||
-rwxr-xr-x | include/asterisk/frame.h | 38 |
3 files changed, 40 insertions, 4 deletions
diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h index 90d9433e3..c274d8a81 100755 --- a/include/asterisk/cdr.h +++ b/include/asterisk/cdr.h @@ -254,6 +254,6 @@ extern char ast_default_accountcode[20]; #define ast_cdr_add_flag(cdr, flag) ((cdr)->flags |= (flag)) #define ast_cdr_del_flag(cdr, flag) ((cdr)->flags &= ~(flag)) -extern void ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr); +extern struct ast_cdr *ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr); #endif /* _CDR_H */ diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 75627cda7..516e3a9a8 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -19,7 +19,11 @@ #include <asterisk/chanvars.h> #include <unistd.h> #include <setjmp.h> +#if defined(__APPLE__) +#include <asterisk/poll-compat.h> +#else #include <sys/poll.h> +#endif #if defined(__cplusplus) || defined(c_plusplus) extern "C" { diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h index c80ca72f5..c97973226 100755 --- a/include/asterisk/frame.h +++ b/include/asterisk/frame.h @@ -58,6 +58,11 @@ extern "C" { #error Need to know endianess #endif /* __BYTE_ORDER */ +struct ast_codec_pref { + char order[32]; +}; + + //! Data structure associated with a single frame of data /* A frame of data read used to communicate between between channels and applications */ @@ -337,11 +342,10 @@ extern char* ast_getformatname(int format); * \param n size of buf (bytes) * \param format the format (combined IDs of codecs) * Prints a list of readable codec names corresponding to "format". - * ex: for format=AST_FORMAT_GSM|AST_FORMAT_SPEEX|AST_FORMAT_ILBC it will return "0x602(GSM|SPEEX|ILBC)" + * ex: for format=AST_FORMAT_GSM|AST_FORMAT_SPEEX|AST_FORMAT_ILBC it will return "0x602 (GSM|SPEEX|ILBC)" * \return The return value is buf. */ -extern char* ast_getformatname_multiple(char *buf, unsigned n, int format); - +extern char* ast_getformatname_multiple(char *buf, size_t size, int format); /*! * \param name string of format @@ -364,6 +368,8 @@ extern int ast_best_codec(int fmts); struct ast_smoother; +extern struct ast_format_list *ast_get_format_list_index(int index); +extern struct ast_format_list *ast_get_format_list(size_t *size); extern struct ast_smoother *ast_smoother_new(int bytes); extern void ast_smoother_set_flags(struct ast_smoother *smoother, int flags); extern int ast_smoother_get_flags(struct ast_smoother *smoother); @@ -374,6 +380,32 @@ extern struct ast_frame *ast_smoother_read(struct ast_smoother *s); extern void ast_frame_dump(char *name, struct ast_frame *f, char *prefix); +/* Initialize a codec preference to "no preference" */ +extern void ast_codec_pref_init(struct ast_codec_pref *pref); + +/* Codec located at a particular place in the preference index */ +extern int ast_codec_pref_index(struct ast_codec_pref *pref, int index); + +/* Remove a codec from a preference list */ +extern void ast_codec_pref_remove(struct ast_codec_pref *pref, int format); + +/* Append a codec to a preference list, removing it first if it was already there */ +extern int ast_codec_pref_append(struct ast_codec_pref *pref, int format); + +/* Select the best format according to preference list from supplied options. + If "find_best" is non-zero then if nothing is found, the "Best" format of + the format list is selected, otherwise 0 is returned. */ +extern int ast_codec_choose(struct ast_codec_pref *pref, int formats, int find_best); + +/* Parse an "allow" or "deny" line and update the mask and pref if provided */ +extern void ast_parse_allow_disallow(struct ast_codec_pref *pref, int *mask, char *list, int allowing); + +/* Dump codec preference list into a string */ +extern int ast_codec_pref_string(struct ast_codec_pref *pref, char *buf, size_t size); + +/* Shift a codec preference list up or down 65 bytes so that it becomes an ASCII string */ +extern void ast_codec_pref_shift(struct ast_codec_pref *pref, char *buf, size_t size, int right); + #if defined(__cplusplus) || defined(c_plusplus) } #endif |