Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Macros | Functions | Variables
format_mp3.c File Reference

MP3 Format Handler. More...

#include "asterisk.h"
#include "mp3/mpg123.h"
#include "mp3/mpglib.h"
#include "asterisk/module.h"
#include "asterisk/mod_format.h"
#include "asterisk/logger.h"
#include "asterisk/format_cache.h"

Go to the source code of this file.

Data Structures

struct  mp3_private
 

Macros

#define BLOCKSIZE   160
 
#define GAIN   -4 /* 2^GAIN is the multiple to increase the volume by */
 
#define MP3_BUFLEN   320
 
#define MP3_DCACHE   8192
 
#define MP3_SCACHE   16384
 
#define OUTSCALE   4096
 

Functions

 AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY,"MP3 format [Any rate but 8000hz mono is optimal]")
 
static int load_module (void)
 
static void mp3_close (struct ast_filestream *s)
 
static int mp3_dqueue (struct ast_filestream *s)
 
static char * mp3_getcomment (struct ast_filestream *s)
 
static int mp3_open (struct ast_filestream *s)
 
static int mp3_queue (struct ast_filestream *s)
 
static struct ast_framemp3_read (struct ast_filestream *s, int *whennext)
 
static int mp3_rewrite (struct ast_filestream *s, const char *comment)
 
static int mp3_seek (struct ast_filestream *s, off_t sample_offset, int whence)
 
static int mp3_squeue (struct ast_filestream *s)
 
static off_t mp3_tell (struct ast_filestream *s)
 
static int mp3_trunc (struct ast_filestream *s)
 
static int mp3_write (struct ast_filestream *fs, struct ast_frame *f)
 
static int unload_module (void)
 

Variables

static struct ast_format_def mp3_f
 
static const char name [] = "mp3"
 

Detailed Description

MP3 Format Handler.

Definition in file format_mp3.c.