Asterisk - The Open Source Telephony Project
18.5.0
|
Go to the source code of this file.
Macros | |
#define | BUFFSIZE 50000 /* How many samples to read in one go (preferred) */ |
#define | DEFAULTFREQ 44100 |
#define | FALSE (0==1) |
#define | INBIN (1+2) |
#define | INTEXT (1+0) |
#define | IOBIN (32) |
#define | MINBUFFSIZE 5000 /* How many samples to read in one go (minimum) */ |
#define | NOCOMPLAIN (16) |
#define | NOFILES (0) |
#define | OUTBIN (4+8) |
#define | OUTTEXT (4) |
#define | TRUE (0==0) |
Enumerations | |
enum | Errornum { ME_NOINT, ME_NODOUBLE, ME_NOTIME, ME_NOVOL, ME_NOSWITCH, ME_TOOMANYFILES, ME_HEADERONTEXTFILE, ME_NOINFILE, ME_NOOUTFILE, ME_NOIOFILE, ME_NOSTDIN, ME_NOSTDOUT, ME_NOSTDIO, ME_NOTENOUGHFILES, ME_THISCANTHAPPEN } |
Functions | |
void | argerror (char *s) |
void | argerrornum (char *s, Errornum code) |
void | argerrortxt (char *s, char *message) |
int | chat (const char *format,...) |
void | checknoargs (int argcount, char *args[]) |
double | double2db (double value) |
int | error (const char *format,...) |
void | fatalerror (const char *format,...) |
void | fatalperror (const char *string) |
int | findoption (int argcount, char *args[], char *s) |
int | getremainingfilelength (FILE *anyin, long *result) |
int | inform (const char *format,...) |
int | isoptionchar (char coal) |
void | makewavheader (void) |
char * | mallocconcat (char *one, char *two) |
char * | malloccopy (char *string) |
int | myexit (int value) |
void | parseargs (int argcount, char *args[], int fileswitch) |
int | parsedoublearg (int argcount, char *args[], char *string, double *result) |
char * | parsefilearg (int argcount, char *args[]) |
int | parsefreq (char *string, double *result) |
int | parseintarg (int argcount, char *args[], char *string, int *result) |
int | parseswitch (char *found, char *wanted) |
int | parseswitcharg (int argcount, char *args[], char *string) |
int | parsetime (char *string, int *result) |
int | parsetimearg (int argcount, char *args[], char *string, int *result) |
int | parsevolarg (int argcount, char *args[], char *string, double *result) |
int | parsevolume (char *s, double *result) |
void | readawaysamples (FILE *in, size_t size) |
void | readpkheader (FILE *anyin) |
void | readwavheader (FILE *anyin) |
int | say (const char *format,...) |
void | startstopwatch (void) |
int | workloop (FILE *theinfile, FILE *theoutfile, int(*work)(short *buffer, int length)) |
Variables | |
unsigned short | channels |
FILE * | in |
char * | infilename |
int | iswav |
FILE * | out |
char * | outfilename |
int | samplefrequency |
unsigned short | samplewidth |
char * | usage |
int | verboselevel |
char * | version |
int | wavout |
#define BUFFSIZE 50000 /* How many samples to read in one go (preferred) */ |
Definition at line 54 of file utils/frame.h.
Referenced by main(), readawaysamples(), and workloop().
#define DEFAULTFREQ 44100 |
Definition at line 53 of file utils/frame.h.
Referenced by parseargs().
#define FALSE (0==1) |
Definition at line 36 of file utils/frame.h.
#define INBIN (1+2) |
Definition at line 28 of file utils/frame.h.
#define INTEXT (1+0) |
Definition at line 27 of file utils/frame.h.
#define IOBIN (32) |
Definition at line 33 of file utils/frame.h.
#define MINBUFFSIZE 5000 /* How many samples to read in one go (minimum) */ |
Definition at line 55 of file utils/frame.h.
#define NOCOMPLAIN (16) |
Definition at line 32 of file utils/frame.h.
Referenced by main().
#define NOFILES (0) |
Definition at line 31 of file utils/frame.h.
Referenced by main().
#define OUTBIN (4+8) |
Definition at line 30 of file utils/frame.h.
#define OUTTEXT (4) |
Definition at line 29 of file utils/frame.h.
#define TRUE (0==0) |
Definition at line 37 of file utils/frame.h.
enum Errornum |
Definition at line 60 of file utils/frame.h.
void argerror | ( | char * | s | ) |
void argerrornum | ( | char * | s, |
Errornum | code | ||
) |
Definition at line 635 of file utils/frame.c.
References error(), fatalerror(), ME_HEADERONTEXTFILE, ME_NODOUBLE, ME_NOINFILE, ME_NOINT, ME_NOIOFILE, ME_NOOUTFILE, ME_NOSTDIN, ME_NOSTDIO, ME_NOSTDOUT, ME_NOSWITCH, ME_NOTENOUGHFILES, ME_NOTIME, ME_NOVOL, ME_THISCANTHAPPEN, ME_TOOMANYFILES, and NULL.
Referenced by main(), parseargs(), parsedoublearg(), parsefreq(), parseintarg(), parseswitch(), parseswitcharg(), parsetime(), parsetimearg(), and parsevolarg().
void argerrortxt | ( | char * | s, |
char * | message | ||
) |
Definition at line 704 of file utils/frame.c.
References error(), fatalerror(), and NULL.
Referenced by main(), and parseargs().
int chat | ( | const char * | format, |
... | |||
) |
Definition at line 971 of file utils/frame.c.
References result, and verboselevel.
Referenced by makewavheader(), myexit(), and readwavheader().
void checknoargs | ( | int | argcount, |
char * | args[] | ||
) |
Definition at line 717 of file utils/frame.c.
References error(), and fatalerror().
Referenced by main().
double double2db | ( | double | value | ) |
Definition at line 1062 of file utils/frame.c.
References value.
int error | ( | const char * | format, |
... | |||
) |
Definition at line 999 of file utils/frame.c.
References result.
Referenced by __ast_pbx_run(), __rtp_recvfrom(), acl_handler(), acl_handler_fn(), aco_info_init(), aco_process_ast_config(), append_string(), apply_general_options(), argerror(), argerrornum(), argerrortxt(), ast_channel_internal_errno_set(), ast_iostream_printf(), ast_json_vpack(), ast_odbc_find_table(), ast_parse_arg(), ast_tcptls_client_create(), ast_tcptls_server_start(), AST_TEST_DEFINE(), ast_unload_resource(), authenticate(), build_callno_limits(), build_expression_queue(), build_peer(), cdr_handler(), checknoargs(), conf_load_config(), confbridge_cfg_alloc(), config_handler(), deliver_file(), endpoint_acl_handler(), evaluate_history_entry(), exec(), fax_gateway_attach(), fax_gateway_detect_t38(), fax_gateway_framehook(), fax_gateway_start(), generic_fax_exec(), handle_cli_agi_show(), handle_cli_queue_test(), handle_incoming(), handle_request_invite(), handler_wait_for_message(), http_callback(), ip_identify_match_handler(), ip_identify_match_host_lookup(), jingle_outgoing_hook(), jingle_send_error_response(), keypad_cfg_read(), load_config(), load_module(), load_or_reload_lua_stuff(), load_pjsip(), load_values_config(), logged_dlclose(), lua_get_state(), message_template_build(), mgcp_devicestate(), minivm_accmess_exec(), mysql_log(), named_acl_config_alloc(), ogg_speex_open(), osp_check_destination(), osp_create_provider(), osp_create_transaction(), osp_finish(), osp_load(), osp_lookup(), osp_next(), osp_validate_token(), parse_uri_full(), pjsip_enable_logger_host(), pubsub_on_rx_mwi_notify_request(), realtime_destroy_handler(), realtime_handler(), realtime_multi_handler(), realtime_store_handler(), realtime_update2_handler(), realtime_update_handler(), receivefax_exec(), refer_progress_alloc(), reload_config(), rtcp_debug_test_addr(), sendfax_exec(), setup_filestack(), skel_config_alloc(), store_config(), sub_persistence_recreate(), t30_phase_e_handler(), test_config_alloc(), transport_localnet_handler(), unbound_config_alloc(), update2_ldap(), user_event_wait_for_events(), verify_user_event_fields(), wait_for_channel_callback(), wait_for_device_state_updates(), write_cel(), xmpp_component_register_get_hook(), xmpp_config_alloc(), and xmpp_pubsub_handle_error().
void fatalerror | ( | const char * | format, |
... | |||
) |
Definition at line 1010 of file utils/frame.c.
References myexit().
Referenced by argerror(), argerrornum(), argerrortxt(), checknoargs(), main(), and parseargs().
void fatalperror | ( | const char * | string | ) |
Definition at line 1020 of file utils/frame.c.
References myexit().
Referenced by main(), parsefilearg(), readawaysamples(), and workloop().
int findoption | ( | int | argcount, |
char * | args[], | ||
char * | s | ||
) |
Definition at line 900 of file utils/frame.c.
References isoptionchar(), and test_usage.
Referenced by parsedoublearg(), parseintarg(), parseswitcharg(), parsetimearg(), and parsevolarg().
int getremainingfilelength | ( | FILE * | anyin, |
long * | result | ||
) |
int inform | ( | const char * | format, |
... | |||
) |
Definition at line 985 of file utils/frame.c.
References result, and verboselevel.
Referenced by main(), parseargs(), and statistics().
int isoptionchar | ( | char | coal | ) |
Definition at line 319 of file utils/frame.c.
Referenced by findoption(), and parsefilearg().
void makewavheader | ( | void | ) |
Definition at line 219 of file utils/frame.c.
References channels, chat(), out, and samplefrequency.
Referenced by main(), myexit(), and parseargs().
char* mallocconcat | ( | char * | one, |
char * | two | ||
) |
Definition at line 1049 of file utils/frame.c.
References malloc(), NULL, and result.
char* malloccopy | ( | char * | string | ) |
Definition at line 1038 of file utils/frame.c.
References malloc(), NULL, and result.
int myexit | ( | int | value | ) |
Definition at line 922 of file utils/frame.c.
References chat(), makewavheader(), and wavout.
Referenced by fatalerror(), fatalperror(), and main().
void parseargs | ( | int | argcount, |
char * | args[], | ||
int | fileswitch | ||
) |
Definition at line 744 of file utils/frame.c.
References argerrornum(), argerrortxt(), channels, DEFAULTFREQ, errno, FALSE, fatalerror(), in, infilename, inform(), makewavheader(), ME_HEADERONTEXTFILE, ME_NOINFILE, ME_NOIOFILE, ME_NOOUTFILE, ME_NOSTDIN, ME_TOOMANYFILES, NULL, out, outfilename, parsefilearg(), parseintarg(), parseswitcharg(), readwavheader(), samplefrequency, samplewidth, standardusage, standardversion, test_usage, usage, verboselevel, version, and wavout.
Referenced by main().
int parsedoublearg | ( | int | argcount, |
char * | args[], | ||
char * | string, | ||
double * | result | ||
) |
Definition at line 505 of file utils/frame.c.
References argerrornum(), end, FALSE, findoption(), ME_NODOUBLE, say(), and TRUE.
char* parsefilearg | ( | int | argcount, |
char * | args[] | ||
) |
Definition at line 419 of file utils/frame.c.
References fatalperror(), isoptionchar(), malloc(), NULL, and result.
Referenced by main(), and parseargs().
int parsefreq | ( | char * | string, |
double * | result | ||
) |
Definition at line 393 of file utils/frame.c.
References argerrornum(), end, FALSE, ME_THISCANTHAPPEN, NULL, samplefrequency, and TRUE.
int parseintarg | ( | int | argcount, |
char * | args[], | ||
char * | string, | ||
int * | result | ||
) |
Definition at line 471 of file utils/frame.c.
References argerrornum(), c, FALSE, findoption(), ME_NOINT, say(), and TRUE.
Referenced by parseargs().
int parseswitch | ( | char * | found, |
char * | wanted | ||
) |
Definition at line 445 of file utils/frame.c.
References argerrornum(), FALSE, ME_NOSWITCH, and TRUE.
int parseswitcharg | ( | int | argcount, |
char * | args[], | ||
char * | string | ||
) |
Definition at line 457 of file utils/frame.c.
References argerrornum(), FALSE, findoption(), ME_NOSWITCH, and TRUE.
Referenced by parseargs().
int parsetime | ( | char * | string, |
int * | result | ||
) |
Definition at line 352 of file utils/frame.c.
References argerrornum(), end, FALSE, ME_THISCANTHAPPEN, NULL, samplefrequency, and TRUE.
Referenced by parsetimearg().
int parsetimearg | ( | int | argcount, |
char * | args[], | ||
char * | string, | ||
int * | result | ||
) |
Definition at line 332 of file utils/frame.c.
References argerrornum(), FALSE, findoption(), ME_NOTIME, parsetime(), and TRUE.
int parsevolarg | ( | int | argcount, |
char * | args[], | ||
char * | string, | ||
double * | result | ||
) |
Definition at line 539 of file utils/frame.c.
References argerrornum(), end, FALSE, findoption(), ME_NOVOL, say(), and TRUE.
int parsevolume | ( | char * | s, |
double * | result | ||
) |
void readawaysamples | ( | FILE * | in, |
size_t | size | ||
) |
Definition at line 1069 of file utils/frame.c.
References BUFFSIZE, fatalperror(), free(), malloc(), and NULL.
void readpkheader | ( | FILE * | anyin | ) |
Definition at line 76 of file utils/frame.c.
void readwavheader | ( | FILE * | anyin | ) |
Definition at line 126 of file utils/frame.c.
References channels, chat(), FALSE, iswav, samplefrequency, str, and TRUE.
Referenced by main(), and parseargs().
int say | ( | const char * | format, |
... | |||
) |
Definition at line 1026 of file utils/frame.c.
References result.
Referenced by parsedoublearg(), parseintarg(), parsevolarg(), and parsevolume().
void startstopwatch | ( | void | ) |
Definition at line 307 of file utils/frame.c.
References NULL, statistics(), and stopwatch.
Referenced by main().
int workloop | ( | FILE * | theinfile, |
FILE * | theoutfile, | ||
int(*)(short *buffer, int length) | work | ||
) |
Definition at line 943 of file utils/frame.c.
References BUFFSIZE, FALSE, fatalperror(), malloc(), NULL, and TRUE.
unsigned short channels |
Definition at line 30 of file utils/frame.c.
Referenced by makewavheader(), parseargs(), and readwavheader().
FILE* in |
Definition at line 33 of file utils/frame.c.
Referenced by __rtp_recvfrom(), __stub__ast_aes_set_decrypt_key(), ast_aes_decrypt(), ast_aes_encrypt(), AST_TEST_DEFINE(), do_forward(), fast_originate(), get_comma(), json_escape(), osp_choose_timelimit(), parseargs(), resampler_basic_direct_single(), resampler_basic_interpolate_single(), and wait_for_answer().
char* infilename |
Definition at line 34 of file utils/frame.c.
Referenced by parseargs().
int iswav |
Definition at line 32 of file utils/frame.c.
Referenced by main(), and readwavheader().
FILE * out |
Definition at line 33 of file utils/frame.c.
Referenced by __ast_frdup(), __ast_frisolate(), __queues_show(), __stub__ast_aes_set_decrypt_key(), _macro_exec(), acf_escape(), action_agents(), agent_handle_show_specific(), agent_show_requested(), ast_aes_decrypt(), ast_aes_encrypt(), ast_escape_quoted(), ast_escape_semicolons(), ast_fax_caps_to_str(), ast_http_create_response(), ast_manager_build_bridge_state_string_prefix(), ast_manager_build_channel_state_string_prefix(), AST_TEST_DEFINE(), ast_translate(), ast_uri_encode(), ast_var_channels_table(), attended_transfer_to_json(), auth_http_callback(), blind_transfer_to_json(), custom_log(), dahdi_create_channel_range(), dahdi_digit_begin(), dahdi_digit_end(), dial_exec_full(), function_realtime_read(), function_realtime_readdestroy(), generic_http_callback(), get_in_brackets(), handle_show_translation_table(), httpstatus_callback(), is_zero_or_null(), keypad_cfg_read(), main(), makewavheader(), manager_build_parked_call_string(), multi_user_event_to_json(), my_conf_add(), osp_choose_timelimit(), parse_sip_options(), parseargs(), print_queue(), print_uptimestr(), process_token(), record_exec(), resampler_basic_direct_single(), resampler_basic_interpolate_single(), sendmail(), sendurl_exec(), sip_rtp_read(), transmit_notify_with_mwi(), try_calling(), and vm_execmain().
char * outfilename |
Definition at line 34 of file utils/frame.c.
Referenced by main(), and parseargs().
int samplefrequency |
Definition at line 28 of file utils/frame.c.
Referenced by makewavheader(), parseargs(), parsefreq(), parsetime(), and readwavheader().
unsigned short samplewidth |
Definition at line 29 of file utils/frame.c.
Referenced by getremainingfilelength(), and parseargs().
char* usage |
Definition at line 37 of file utils/frame.c.
Referenced by main(), parseargs(), pbx_builtin_execiftime(), and vm_allocate_dh().
int verboselevel |
Definition at line 35 of file utils/frame.c.
Referenced by chat(), inform(), and parseargs().
char* version |
Definition at line 502 of file main/security_events.c.
Referenced by parseargs().
int wavout |
Definition at line 31 of file utils/frame.c.
Referenced by main(), myexit(), and parseargs().