RTS API Documentation
1.10.11
|
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(), SWITCH_STATUS_GENERR, switch_timer_interface::timer_check, and switch_timer::timer_interface.
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 switch_timer::memory_pool, 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, switch_timer_interface::timer_destroy, switch_timer::timer_interface, and UNPROTECT_INTERFACE.
Referenced by audio_write_thread(), 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_text_factory_destroy(), switch_rtp_udptl_mode(), video_bug_thread(), 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 switch_timer::interval, switch_timer::memory_pool, memset(), pool, switch_timer::samplecount, switch_timer::samples, 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, switch_timer::timer_interface, and UNPROTECT_INTERFACE.
Referenced by audio_write_thread(), switch_core_session_write_video_frame(), switch_ivr_play_file(), switch_ivr_speak_text(), switch_rtp_change_interval(), switch_rtp_create(), switch_rtp_text_factory_create(), video_bug_thread(), 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, SWITCH_STATUS_SUCCESS, switch_timer::timer_interface, and switch_timer_interface::timer_next.
Referenced by audio_write_thread(), get_next_write_ts(), rtp_common_read(), switch_ivr_play_file(), switch_ivr_speak_text_handle(), video_bug_thread(), 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(), SWITCH_STATUS_GENERR, switch_timer::timer_interface, and switch_timer_interface::timer_step.
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(), SWITCH_STATUS_GENERR, switch_timer::timer_interface, and switch_timer_interface::timer_sync.
Referenced by read_rtp_packet(), rtp_common_read(), switch_core_session_write_text_frame(), switch_core_session_write_video_frame(), switch_ivr_play_file(), switch_ivr_speak_text(), switch_rtp_get_media_timer(), and video_write_thread().
void switch_time_calibrate_clock | ( | void | ) |
Definition at line 208 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().