diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-11-04 14:05:12 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-11-04 14:05:12 +0000 |
commit | d8e0c584372c51b585a52efbe2375861bc09bdcf (patch) | |
tree | dd3bc244b8a45aacb932109dc8c12d1f21769d55 /include/asterisk/translate.h | |
parent | 6a50e7a031f4d424aa8bd3293aa48501f7b96652 (diff) |
Expand codec bitfield from 32 bits to 64 bits.
Reviewboard: https://reviewboard.asterisk.org/r/416/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/translate.h')
-rw-r--r-- | include/asterisk/translate.h | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/include/asterisk/translate.h b/include/asterisk/translate.h index 0e0eae1ec..8a5ac2106 100644 --- a/include/asterisk/translate.h +++ b/include/asterisk/translate.h @@ -24,8 +24,8 @@ #ifndef _ASTERISK_TRANSLATE_H #define _ASTERISK_TRANSLATE_H -#define MAX_AUDIO_FORMAT 15 /* Do not include video here */ -#define MAX_FORMAT 32 /* Do include video here */ +#define MAX_AUDIO_FORMAT 47 /* Do not include video here */ +#define MAX_FORMAT 64 /* Do include video here */ #if defined(__cplusplus) || defined(c_plusplus) extern "C" { @@ -69,51 +69,51 @@ struct ast_trans_pvt; /* declared below */ * Generic plc is only available for dstfmt = SLINEAR */ struct ast_translator { - const char name[80]; /*!< Name of translator */ - int srcfmt; /*!< Source format (note: bit position, - converted to index during registration) */ - int dstfmt; /*!< Destination format (note: bit position, - converted to index during registration) */ + const char name[80]; /*!< Name of translator */ + format_t srcfmt; /*!< Source format (note: bit position, + * converted to index during registration) */ + format_t dstfmt; /*!< Destination format (note: bit position, + * converted to index during registration) */ int (*newpvt)(struct ast_trans_pvt *); /*!< initialize private data - associated with the translator */ + * associated with the translator */ int (*framein)(struct ast_trans_pvt *pvt, struct ast_frame *in); - /*!< Input frame callback. Store - (and possibly convert) input frame. */ + /*!< Input frame callback. Store + * (and possibly convert) input frame. */ struct ast_frame * (*frameout)(struct ast_trans_pvt *pvt); - /*!< Output frame callback. Generate a frame - with outbuf content. */ + /*!< Output frame callback. Generate a frame + * with outbuf content. */ void (*destroy)(struct ast_trans_pvt *pvt); - /*!< cleanup private data, if needed - (often unnecessary). */ + /*!< cleanup private data, if needed + * (often unnecessary). */ - struct ast_frame * (*sample)(void); /*!< Generate an example frame */ + struct ast_frame * (*sample)(void); /*!< Generate an example frame */ - /*! \brief size of outbuf, in samples. Leave it 0 if you want the framein + /*!\brief size of outbuf, in samples. Leave it 0 if you want the framein * callback deal with the frame. Set it appropriately if you * want the code to checks if the incoming frame fits the * outbuf (this is e.g. required for plc). */ - int buffer_samples; /*< size of outbuf, in samples */ + int buffer_samples; /*< size of outbuf, in samples */ /*! \brief size of outbuf, in bytes. Mandatory. The wrapper code will also * allocate an AST_FRIENDLY_OFFSET space before. */ int buf_size; - int desc_size; /*!< size of private descriptor in pvt->pvt, if any */ - int plc_samples; /*!< set to the plc block size if used, 0 otherwise */ - int useplc; /*!< current status of plc, changed at runtime */ - int native_plc; /*!< true if the translator can do native plc */ + int desc_size; /*!< size of private descriptor in pvt->pvt, if any */ + int plc_samples; /*!< set to the plc block size if used, 0 otherwise */ + int useplc; /*!< current status of plc, changed at runtime */ + int native_plc; /*!< true if the translator can do native plc */ - struct ast_module *module; /* opaque reference to the parent module */ + struct ast_module *module; /*!< opaque reference to the parent module */ - int cost; /*!< Cost in milliseconds for encoding/decoding 1 second of sound */ - int active; /*!< Whether this translator should be used or not */ - AST_LIST_ENTRY(ast_translator) list; /*!< link field */ + int cost; /*!< Cost in milliseconds for encoding/decoding 1 second of sound */ + int active; /*!< Whether this translator should be used or not */ + AST_LIST_ENTRY(ast_translator) list; /*!< link field */ }; /*! \brief @@ -205,7 +205,7 @@ void ast_translator_deactivate(struct ast_translator *t); * \return Returns 0 on success, -1 if no path could be found. * \note Modifies dests and srcs in place */ -int ast_translator_best_choice(int *dsts, int *srcs); +format_t ast_translator_best_choice(format_t *dsts, format_t *srcs); /*! * \brief Builds a translator path @@ -214,7 +214,7 @@ int ast_translator_best_choice(int *dsts, int *srcs); * \param source source format * \return ast_trans_pvt on success, NULL on failure * */ -struct ast_trans_pvt *ast_translator_build_path(int dest, int source); +struct ast_trans_pvt *ast_translator_build_path(format_t dest, format_t source); /*! * \brief Frees a translator path @@ -240,7 +240,7 @@ struct ast_frame *ast_translate(struct ast_trans_pvt *tr, struct ast_frame *f, i * \param src source format * \return the number of translation steps required, or -1 if no path is available */ -unsigned int ast_translate_path_steps(unsigned int dest, unsigned int src); +unsigned int ast_translate_path_steps(format_t dest, format_t src); /*! * \brief Mask off unavailable formats from a format bitmask @@ -254,7 +254,7 @@ unsigned int ast_translate_path_steps(unsigned int dest, unsigned int src); * \note Only a single audio format and a single video format can be * present in 'src', or the function will produce unexpected results. */ -unsigned int ast_translate_available_formats(unsigned int dest, unsigned int src); +format_t ast_translate_available_formats(format_t dest, format_t src); #if defined(__cplusplus) || defined(c_plusplus) } |