diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-20 00:53:21 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-07-20 00:53:21 +0000 |
commit | 000130b1d3cd30b4e007969098fbda821d28d89f (patch) | |
tree | 56647b2721ff9f4f4491bfdc2b945618860a2f25 /include | |
parent | 7428435033ff215dbc6b157a696e604d0bad9c61 (diff) |
add slinfactory object, and change app_chanspy to use it (bug #4724)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6177 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/slinfactory.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/asterisk/slinfactory.h b/include/asterisk/slinfactory.h new file mode 100755 index 000000000..95c655cb2 --- /dev/null +++ b/include/asterisk/slinfactory.h @@ -0,0 +1,47 @@ +/* + * Asterisk -- A telephony toolkit for Linux. + * + * A machine to gather up arbitrary frames and convert them + * to raw slinear on demand. + * + * Copyright (C) 2005, Anthony Minessale II. + * + * Anthony Minessale <anthmct@yahoo.com> + * + * This program is free software, distributed under the terms of + * the GNU General Public License + */ + +#ifndef _ASTERISK_SLINFACTORY_H +#define _ASTERISK_SLINFACTORY_H +#include <stdlib.h> +#include <unistd.h> +#include <string.h> + + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +struct ast_slinfactory { + struct ast_frame *queue; + struct ast_trans_pvt *trans; + short hold[1280]; + short *offset; + size_t holdlen; + int size; + int format; +}; + +void ast_slinfactory_init(struct ast_slinfactory *sf); +void ast_slinfactory_destroy(struct ast_slinfactory *sf); +int ast_slinfactory_feed(struct ast_slinfactory *sf, struct ast_frame *f); +int ast_slinfactory_read(struct ast_slinfactory *sf, short *buf, size_t bytes); + + + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif + +#endif |