Asterisk - The Open Source Telephony Project
18.5.0
|
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.
#define LOCAL_MPG_123 "/usr/local/bin/mpg123" |
AST_MODULE_INFO_STANDARD_EXTENDED | ( | ASTERISK_GPL_KEY | , |
"Silly MP3 Application" | |||
) |
Referenced by load_module().
|
static |
Definition at line 296 of file app_mp3.c.
References app, AST_MODULE_INFO_STANDARD_EXTENDED(), ast_register_application_xml, ASTERISK_GPL_KEY, and mp3_exec().
|
static |
Definition at line 172 of file app_mp3.c.
References ao2_bump, ao2_cleanup, 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, timed_read(), and timeout.
Referenced by load_module().
|
static |
Definition at line 79 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 140 of file app_mp3.c.
References ast_log, ast_poll, errno, LOG_NOTICE, and timeout.
Referenced by mp3_exec().
|
static |
Definition at line 291 of file app_mp3.c.
References app, and ast_unregister_application().
|
static |
Definition at line 77 of file app_mp3.c.
Referenced by load_module(), and unload_module().