| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Work with WAV in the proprietary Microsoft format. Microsoft WAV format (8000hz Signed Linear) More...
#include "asterisk.h"#include "asterisk/mod_format.h"#include "asterisk/module.h"#include "asterisk/endian.h"#include "asterisk/format_cache.h"#include "asterisk/format.h"#include "asterisk/codec.h"
Go to the source code of this file.
| Data Structures | |
| struct | wav_desc | 
| Macros | |
| #define | BLOCKSIZE 160 | 
| #define | htoll(b) (b) | 
| #define | htols(b) (b) | 
| #define | ltohl(b) (b) | 
| #define | ltohs(b) (b) | 
| #define | WAV_BUF_SIZE 320 | 
| #define | WAV_HEADER_SIZE 44 | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static int | check_header (FILE *f, int hz) | 
| static int | check_header_fmt (FILE *f, int hsize, int hz) | 
| static int | load_module (void) | 
| static int | unload_module (void) | 
| static int | update_header (FILE *f) | 
| static void | wav_close (struct ast_filestream *s) | 
| static int | wav_open (struct ast_filestream *s) | 
| static struct ast_frame * | wav_read (struct ast_filestream *s, int *whennext) | 
| static int | wav_rewrite (struct ast_filestream *s, const char *comment) | 
| static int | wav_seek (struct ast_filestream *fs, off_t sample_offset, int whence) | 
| static off_t | wav_tell (struct ast_filestream *fs) | 
| static int | wav_trunc (struct ast_filestream *fs) | 
| static int | wav_write (struct ast_filestream *fs, struct ast_frame *f) | 
| static int | write_header (FILE *f, int writehz) | 
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Microsoft WAV/WAV16 format (8kHz/16kHz Signed Linear)" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND } | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static struct ast_format_def | wav16_f | 
| static struct ast_format_def | wav_f | 
Work with WAV in the proprietary Microsoft format. Microsoft WAV format (8000hz Signed Linear)
Definition in file format_wav.c.
| #define BLOCKSIZE 160 | 
Definition at line 56 of file format_wav.c.
Definition at line 59 of file format_wav.c.
Definition at line 60 of file format_wav.c.
Definition at line 61 of file format_wav.c.
Definition at line 62 of file format_wav.c.
| #define WAV_BUF_SIZE 320 | 
Definition at line 44 of file format_wav.c.
| #define WAV_HEADER_SIZE 44 | 
Definition at line 46 of file format_wav.c.
| 
 | static | 
Definition at line 572 of file format_wav.c.
| 
 | static | 
Definition at line 572 of file format_wav.c.
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
Definition at line 572 of file format_wav.c.
| 
 | static | 
Definition at line 140 of file format_wav.c.
References ast_debug, ast_log, buf, check_header_fmt(), LOG_WARNING, ltohl, and type.
Referenced by wav_open().
| 
 | static | 
Definition at line 81 of file format_wav.c.
References ast_log, LOG_WARNING, ltohl, and ltohs.
Referenced by check_header().
| 
 | static | 
Definition at line 555 of file format_wav.c.
References ast_format_def_register, ast_format_slin, ast_format_slin16, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_format_def::format, unload_module(), wav16_f, and wav_f.
| 
 | static | 
Definition at line 549 of file format_wav.c.
References ast_format_def_unregister(), ast_format_def::name, wav16_f, and wav_f.
Referenced by load_module().
| 
 | static | 
Definition at line 207 of file format_wav.c.
References ast_log, end, htoll, and LOG_WARNING.
Referenced by wav_close(), and wav_trunc().
| 
 | static | 
Definition at line 349 of file format_wav.c.
References ast_filestream::_private, ast_log, wav_desc::bytes, errno, ast_filestream::f, ast_filestream::filename, LOG_WARNING, ast_filestream::mode, and update_header().
| 
 | static | 
Definition at line 319 of file format_wav.c.
References ast_filestream::_private, ast_format_get_sample_rate(), check_header(), ast_filestream::f, ast_filestream::fmt, ast_format_def::format, wav_desc::hz, and wav_desc::maxlen.
| 
 | static | 
Definition at line 370 of file format_wav.c.
References ast_filestream::_private, ast_format_get_name(), AST_FRAME_SET_BUFFER, AST_FRIENDLY_OFFSET, ast_log, ast_filestream::buf, wav_desc::bytes, ast_frame::data, ast_frame::datalen, errno, ast_filestream::f, ast_frame_subclass::format, ast_filestream::fr, wav_desc::hz, LOG_WARNING, wav_desc::maxlen, NULL, ast_frame::ptr, ast_frame::samples, ast_frame::subclass, and WAV_BUF_SIZE.
| 
 | static | 
Definition at line 336 of file format_wav.c.
References ast_filestream::_private, ast_format_get_sample_rate(), ast_filestream::f, ast_filestream::fmt, ast_format_def::format, wav_desc::hz, and write_header().
| 
 | static | 
Definition at line 453 of file format_wav.c.
References ast_log, AST_LOG_WARNING, errno, ast_filestream::f, max, min, SEEK_FORCECUR, and WAV_HEADER_SIZE.
| 
 | static | 
Definition at line 509 of file format_wav.c.
References ast_filestream::f.
| 
 | static | 
Definition at line 489 of file format_wav.c.
References ast_log, AST_LOG_WARNING, errno, ast_filestream::f, and update_header().
| 
 | static | 
Definition at line 416 of file format_wav.c.
References ast_filestream::_private, ast_log, wav_desc::bytes, ast_frame::data, ast_frame::datalen, errno, ast_filestream::f, LOG_WARNING, and ast_frame::ptr.
| 
 | static | 
Definition at line 248 of file format_wav.c.
References ast_log, htoll, htols, and LOG_WARNING.
Referenced by wav_rewrite().
| 
 | static | 
Definition at line 572 of file format_wav.c.
| 
 | static | 
Definition at line 572 of file format_wav.c.
| 
 | static | 
Definition at line 517 of file format_wav.c.
Referenced by load_module(), and unload_module().
| 
 | static | 
Definition at line 533 of file format_wav.c.
Referenced by load_module(), and unload_module().