summaryrefslogtreecommitdiff
path: root/include/asterisk/mod_format.h
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2011-02-03 16:22:10 +0000
committerDavid Vossel <dvossel@digium.com>2011-02-03 16:22:10 +0000
commitc26c190711a1bbe3b5fff1a93facae333757c56e (patch)
tree00da0caa5a07b7b25729f089dbcafb08129fa9be /include/asterisk/mod_format.h
parent652fb64a01c7a8656697d07e606620ee0ced6929 (diff)
Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/mod_format.h')
-rw-r--r--include/asterisk/mod_format.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/asterisk/mod_format.h b/include/asterisk/mod_format.h
index 08ee4cc42..ff3ab7bbf 100644
--- a/include/asterisk/mod_format.h
+++ b/include/asterisk/mod_format.h
@@ -37,14 +37,14 @@ extern "C" {
* Not all are necessary, the support routine implement default
* values for some of them.
* A handler typically fills a structure initializing the desired
- * fields, and then calls ast_format_register() with the (readonly)
+ * fields, and then calls ast_format_def_register() with the (readonly)
* structure as an argument.
*/
-struct ast_format {
+struct ast_format_def {
char name[80]; /*!< Name of format */
char exts[80]; /*!< Extensions (separated by | if more than one)
this format can read. First is assumed for writing (e.g. .mp3) */
- format_t format; /*!< Format of frames it uses/provides (one only) */
+ struct ast_format format; /*!< Format of frames it uses/provides (one only) */
/*!
* \brief Prepare an input stream for playback.
* \return 0 on success, -1 on error.
@@ -76,7 +76,7 @@ struct ast_format {
void (*close)(struct ast_filestream *);
char * (*getcomment)(struct ast_filestream *); /*!< Retrieve file comment */
- AST_LIST_ENTRY(ast_format) list; /*!< Link */
+ AST_LIST_ENTRY(ast_format_def) list; /*!< Link */
/*!
* If the handler needs a buffer (for read, typically)
@@ -99,7 +99,7 @@ struct ast_format {
*/
struct ast_filestream {
/*! Everybody reserves a block of AST_RESERVED_POINTERS pointers for us */
- struct ast_format *fmt; /* need to write to the lock and usecnt */
+ struct ast_format_def *fmt; /* need to write to the lock and usecnt */
int flags;
mode_t mode;
char *open_filename;
@@ -110,7 +110,7 @@ struct ast_filestream {
/*! Transparently translate from another format -- just once */
struct ast_trans_pvt *trans;
struct ast_tranlator_pvt *tr;
- int lastwriteformat;
+ struct ast_format lastwriteformat;
int lasttimeout;
struct ast_channel *owner;
FILE *f;
@@ -127,8 +127,8 @@ struct ast_filestream {
* \retval 0 on success
* \retval -1 on failure
*/
-int __ast_format_register(const struct ast_format *f, struct ast_module *mod);
-#define ast_format_register(f) __ast_format_register(f, ast_module_info->self)
+int __ast_format_def_register(const struct ast_format_def *f, struct ast_module *mod);
+#define ast_format_def_register(f) __ast_format_def_register(f, ast_module_info->self)
/*!
* \brief Unregisters a file format
@@ -137,7 +137,7 @@ int __ast_format_register(const struct ast_format *f, struct ast_module *mod);
* \retval 0 on success
* \retval -1 on failure to unregister
*/
-int ast_format_unregister(const char *name);
+int ast_format_def_unregister(const char *name);
#if defined(__cplusplus) || defined(c_plusplus)
}