FreeSWITCH API Documentation
1.7.0
|
Functions | |
switch_status_t | switch_core_timer_init (switch_timer_t *timer, const char *timer_name, int interval, int samples, switch_memory_pool_t *pool) |
Request a timer handle using given time module. More... | |
void | switch_time_calibrate_clock (void) |
switch_status_t | switch_core_timer_next (switch_timer_t *timer) |
Wait for one cycle on an existing timer. More... | |
switch_status_t | switch_core_timer_step (switch_timer_t *timer) |
Step the timer one step. More... | |
switch_status_t | switch_core_timer_sync (switch_timer_t *timer) |
switch_status_t | switch_core_timer_check (switch_timer_t *timer, switch_bool_t step) |
Check if the current step has been exceeded. More... | |
switch_status_t | switch_core_timer_destroy (switch_timer_t *timer) |
Destroy an allocated timer. More... | |
switch_status_t switch_core_timer_check | ( | switch_timer_t * | timer, |
switch_bool_t | step | ||
) |
Check if the current step has been exceeded.
timer | the timer to wait on |
step | increment timer if a tick was detected |
Definition at line 103 of file switch_core_timer.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), and SWITCH_STATUS_GENERR.
switch_status_t switch_core_timer_destroy | ( | switch_timer_t * | timer | ) |
Destroy an allocated timer.
timer | timer to destroy |
Definition at line 114 of file switch_core_timer.c.
References memset(), SWITCH_CHANNEL_LOG, switch_core_destroy_memory_pool, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, SWITCH_TIMER_FLAG_FREE_POOL, and UNPROTECT_INTERFACE.
Referenced by switch_ivr_clear_speech_cache(), switch_ivr_play_file(), switch_ivr_speak_text(), switch_media_handle_destroy(), switch_rtp_change_interval(), switch_rtp_destroy(), switch_rtp_udptl_mode(), and video_write_thread().
switch_status_t switch_core_timer_init | ( | switch_timer_t * | timer, |
const char * | timer_name, | ||
int | interval, | ||
int | samples, | ||
switch_memory_pool_t * | pool | ||
) |
Request a timer handle using given time module.
timer | a timer object to allocate to |
timer_name | the name of the timer module to use |
interval | desired interval |
samples | the number of samples to increment on each cycle |
pool | the memory pool to use for allocation |
Definition at line 38 of file switch_core_timer.c.
References memset(), pool, SWITCH_CHANNEL_LOG, switch_core_new_memory_pool, switch_loadable_module_get_timer_interface(), SWITCH_LOG_ERROR, switch_log_printf(), switch_set_flag, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, SWITCH_TIMER_FLAG_FREE_POOL, switch_timer_interface::timer_init, and UNPROTECT_INTERFACE.
Referenced by switch_core_session_write_video_frame(), switch_ivr_play_file(), switch_ivr_speak_text(), switch_rtp_change_interval(), switch_rtp_create(), and video_write_thread().
switch_status_t switch_core_timer_next | ( | switch_timer_t * | timer | ) |
Wait for one cycle on an existing timer.
timer | the timer to wait on |
Definition at line 67 of file switch_core_timer.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_GENERR, and SWITCH_STATUS_SUCCESS.
Referenced by rtp_common_read(), switch_ivr_play_file(), switch_ivr_speak_text_handle(), and video_write_thread().
switch_status_t switch_core_timer_step | ( | switch_timer_t * | timer | ) |
Step the timer one step.
timer | the timer to wait on |
Definition at line 82 of file switch_core_timer.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), and SWITCH_STATUS_GENERR.
switch_status_t switch_core_timer_sync | ( | switch_timer_t * | timer | ) |
Definition at line 93 of file switch_core_timer.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), and SWITCH_STATUS_GENERR.
Referenced by read_rtp_packet(), rtp_common_read(), rtp_common_write(), switch_core_session_write_video_frame(), switch_ivr_play_file(), switch_ivr_speak_text(), and switch_rtp_get_media_timer().
void switch_time_calibrate_clock | ( | void | ) |
Definition at line 207 of file switch_time.c.
References average_time(), calc_step, do_sleep(), switch_runtime::microseconds_per_tick, OFFSET, runtime, SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, switch_log_printf(), SWITCH_LOG_WARNING, switch_time_set_cond_yield(), and SWITCH_TRUE.
Referenced by switch_core_session_ctl(), and SWITCH_MODULE_LOAD_FUNCTION().