Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
Silly application to play an MP3 file – uses mpg123. More...
#include "asterisk.h"
#include <sys/time.h>
#include <sys/types.h>
#include <signal.h>
#include "asterisk/lock.h"
#include "asterisk/file.h"
#include "asterisk/channel.h"
#include "asterisk/frame.h"
#include "asterisk/pbx.h"
#include "asterisk/module.h"
#include "asterisk/translate.h"
#include "asterisk/app.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Macros | |
#define | LOCAL_MPG_123 "/usr/local/bin/mpg123" |
#define | MPG_123 "/usr/bin/mpg123" |
Functions | |
AST_MODULE_INFO_STANDARD_EXTENDED (ASTERISK_GPL_KEY, "Silly MP3 Application") | |
static int | load_module (void) |
static int | mp3_exec (struct ast_channel *chan, const char *data) |
static int | mp3play (const char *filename, unsigned int sampling_rate, int fd) |
static int | timed_read (int fd, void *data, int datalen, int timeout, int pid) |
static int | unload_module (void) |
Variables | |
static char * | app = "MP3Player" |
Silly application to play an MP3 file – uses mpg123.
Definition in file app_mp3.c.
AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
"Silly MP3 Application" | |||
) |
|
static |
Definition at line 307 of file app_mp3.c.
References app, ast_register_application_xml, and mp3_exec().
|
static |
Definition at line 175 of file app_mp3.c.
References ao2_bump, ao2_cleanup, app, ast_channel_nativeformats(), ast_channel_writeformat(), ast_debug, ast_format_cache_get_slin_by_rate(), ast_format_cap_get_format(), ast_format_get_sample_rate(), AST_FRAME_DTMF, AST_FRAME_VOICE, ast_frfree, AST_FRIENDLY_OFFSET, ast_log, ast_read(), ast_samp2tv(), ast_set_write_format(), ast_stopstream(), ast_strlen_zero(), ast_tvadd(), ast_tvdiff_ms(), ast_tvnow(), ast_waitfor(), ast_write(), ast_frame::frametype, LOG_WARNING, mp3play(), NULL, ast_frame::offset, RAII_VAR, and timed_read().
Referenced by load_module().
|
static |
Definition at line 82 of file app_mp3.c.
References ast_close_fds_above_n(), ast_log, ast_opt_high_priority, ast_safe_fork(), ast_set_priority(), LOCAL_MPG_123, LOG_WARNING, MPG_123, and NULL.
Referenced by mp3_exec().
|
static |
Definition at line 143 of file app_mp3.c.
References ast_log, ast_poll, errno, and LOG_NOTICE.
Referenced by mp3_exec().
|
static |
Definition at line 302 of file app_mp3.c.
References app, and ast_unregister_application().
|
static |
Definition at line 80 of file app_mp3.c.
Referenced by load_module(), mp3_exec(), and unload_module().