|
VLC
2.1.0-git
|

Data Structures | |
| struct | vlc_timer |
Functions | |
| static void * | vlc_timer_thread (void *data) |
| int | vlc_timer_create (vlc_timer_t *id, void(*func)(void *), void *data) |
| Initializes an asynchronous timer. | |
| void | vlc_timer_destroy (vlc_timer_t timer) |
| Destroys an initialized timer. | |
| void | vlc_timer_schedule (vlc_timer_t timer, bool absolute, mtime_t value, mtime_t interval) |
| Arm or disarm an initialized timer. | |
| unsigned | vlc_timer_getoverrun (vlc_timer_t timer) |
| Fetch and reset the overrun counter for a timer. | |
| int vlc_timer_create | ( | vlc_timer_t * | id, |
| void(*)(void *) | func, | ||
| void * | data | ||
| ) |
Initializes an asynchronous timer.
| id | pointer to timer to be initialized |
| func | function that the timer will call |
| data | parameter for the timer function |
References atomic_init, vlc_timer::data, vlc_timer::func, vlc_timer::interval, vlc_timer::lock, vlc_timer::overruns, vlc_timer::reschedule, vlc_timer::thread, unlikely, vlc_timer::value, vlc_clone(), vlc_cond_destroy(), vlc_cond_init(), vlc_mutex_destroy(), vlc_mutex_init(), VLC_THREAD_PRIORITY_INPUT, and vlc_timer_thread().
| void vlc_timer_destroy | ( | vlc_timer_t | timer | ) |
Destroys an initialized timer.
If needed, the timer is first disarmed. This function is undefined if the specified timer is not initialized.
| timer | timer to destroy |
References vlc_timer::lock, vlc_timer::reschedule, vlc_timer::thread, vlc_cancel(), vlc_cond_destroy(), vlc_join(), and vlc_mutex_destroy().
| unsigned vlc_timer_getoverrun | ( | vlc_timer_t | timer | ) |
Fetch and reset the overrun counter for a timer.
| timer | initialized timer |
References vlc_timer::overruns.
| void vlc_timer_schedule | ( | vlc_timer_t | timer, |
| bool | absolute, | ||
| mtime_t | value, | ||
| mtime_t | interval | ||
| ) |
Arm or disarm an initialized timer.
This functions overrides any previous call to itself.
| timer | initialized timer |
| absolute | the timer value origin is the same as mdate() if true, the timer value is relative to now if false. |
| value | zero to disarm the timer, otherwise the initial time to wait before firing the timer. |
| interval | zero to fire the timer just once, otherwise the timer repetition interval. |
References vlc_timer::interval, vlc_timer::lock, mdate(), vlc_timer::reschedule, vlc_timer::value, vlc_cond_signal(), vlc_mutex_lock(), and vlc_mutex_unlock().
|
static |
References vlc_timer::data, vlc_timer::func, vlc_timer::interval, vlc_timer::lock, mdate(), mutex_cleanup_push, vlc_timer::overruns, vlc_timer::reschedule, vlc_timer::value, vlc_cleanup_pop, vlc_cond_timedwait(), vlc_cond_wait(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_restorecancel(), and vlc_savecancel().
Referenced by vlc_timer_create().
1.8.1.2