Close webrtc2sip #122
This commit is contained in:
parent
495a93f06e
commit
9d4090adf9
|
@ -57,7 +57,7 @@ typedef struct tdav_speex_jitterBuffer_s
|
|||
}
|
||||
tdav_speex_jitterbuffer_t;
|
||||
|
||||
TINYDAV_GEXTERN const tmedia_jitterbuffer_plugin_def_t *tdav_speex_jitterbuffer_plugin_def_t;
|
||||
extern const tmedia_jitterbuffer_plugin_def_t *tdav_speex_jitterbuffer_plugin_def_t;
|
||||
|
||||
TDAV_END_DECLS
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
TDAV_BEGIN_DECLS
|
||||
|
||||
const tmedia_resampler_plugin_def_t *tdav_speex_resampler_plugin_def_t;
|
||||
extern const tmedia_resampler_plugin_def_t *tdav_speex_resampler_plugin_def_t;
|
||||
|
||||
TDAV_END_DECLS
|
||||
|
||||
|
|
|
@ -1305,12 +1305,12 @@ static void Schedule(trtp_rtcp_session_t* session, double tn, event_ e)
|
|||
switch(e){
|
||||
case EVENT_BYE:
|
||||
if(!TSK_TIMER_ID_IS_VALID(session->timer.id_bye)){
|
||||
session->timer.id_bye = tsk_timer_mgr_global_schedule((uint64_t)tn, _trtp_rtcp_session_timer_callback, session);
|
||||
session->timer.id_bye = tsk_timer_manager_schedule(session->timer.handle_global, (uint64_t)tn, _trtp_rtcp_session_timer_callback, session);
|
||||
}
|
||||
break;
|
||||
case EVENT_REPORT:
|
||||
if(!TSK_TIMER_ID_IS_VALID(session->timer.id_report)){
|
||||
session->timer.id_report = tsk_timer_mgr_global_schedule((uint64_t)tn, _trtp_rtcp_session_timer_callback, session);
|
||||
session->timer.id_report = tsk_timer_manager_schedule(session->timer.handle_global, (uint64_t)tn, _trtp_rtcp_session_timer_callback, session);
|
||||
}
|
||||
break;
|
||||
default: TSK_DEBUG_ERROR("Unexpected code called"); break;
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
#include "tsk_semaphore.h"
|
||||
#include "tsk_time.h"
|
||||
|
||||
#if TSK_UNDER_WINDOWS
|
||||
# include <windows.h>
|
||||
#endif /* TSK_UNDER_WINDOWS */
|
||||
|
||||
|
||||
/**@defgroup tsk_timer_group Timers Management
|
||||
*/
|
||||
|
@ -324,8 +328,8 @@ peek_first:
|
|||
tsk_timer_t *timer = (tsk_timer_t*)tsk_object_ref(curr);
|
||||
//TSK_DEBUG_INFO("Timer raise %llu", timer->id);
|
||||
|
||||
tsk_mutex_lock(manager->mutex); // must lock() before enqueue()
|
||||
TSK_RUNNABLE_ENQUEUE_OBJECT_SAFE(TSK_RUNNABLE(manager), timer);
|
||||
tsk_mutex_lock(manager->mutex);
|
||||
tsk_list_remove_item_by_data(manager->timers, curr);
|
||||
tsk_mutex_unlock(manager->mutex);
|
||||
TSK_OBJECT_SAFE_FREE(timer);
|
||||
|
@ -477,10 +481,11 @@ const tsk_object_def_t * tsk_timer_manager_def_t = &tsk_timer_manager_def_s;
|
|||
//
|
||||
static tsk_object_t* tsk_timer_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
static tsk_timer_id_t tsk_unique_timer_id = 1;
|
||||
static volatile tsk_timer_id_t __tsk_unique_timer_id = 0;
|
||||
tsk_timer_t *timer = (tsk_timer_t*)self;
|
||||
if(timer){
|
||||
timer->id = tsk_unique_timer_id++;
|
||||
tsk_atomic_inc(&__tsk_unique_timer_id);
|
||||
timer->id = __tsk_unique_timer_id;
|
||||
timer->timeout = va_arg(*app, uint64_t);
|
||||
timer->callback = va_arg(*app, tsk_timer_callback_f);
|
||||
timer->arg = va_arg(*app, const void *);
|
||||
|
|
|
@ -61,7 +61,7 @@ TSK_BEGIN_DECLS
|
|||
* @def tsk_timer_callback
|
||||
*/
|
||||
typedef void tsk_timer_manager_handle_t;
|
||||
typedef uint64_t tsk_timer_id_t;
|
||||
typedef long tsk_timer_id_t;
|
||||
typedef int (*tsk_timer_callback_f)(const void* arg, tsk_timer_id_t timer_id);
|
||||
|
||||
TINYSAK_API tsk_timer_manager_handle_t* tsk_timer_manager_create();
|
||||
|
|
Loading…
Reference in New Issue