mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10447 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -754,7 +754,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_add_crypto_key(switch_rtp_t *rtp_sess
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_rtp_change_interval(switch_rtp_t *rtp_session, uint32_t ms_per_packet, uint32_t samples_per_interval)
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_change_interval(switch_rtp_t *rtp_session, uint32_t ms_per_packet, uint32_t samples_per_interval)
|
||||
{
|
||||
rtp_session->ms_per_packet = ms_per_packet;
|
||||
rtp_session->samples_per_interval = rtp_session->conf_samples_per_interval = samples_per_interval;
|
||||
@@ -764,11 +764,19 @@ SWITCH_DECLARE(void) switch_rtp_change_interval(switch_rtp_t *rtp_session, uint3
|
||||
if (rtp_session->timer.timer_interface) {
|
||||
switch_core_timer_destroy(&rtp_session->timer);
|
||||
}
|
||||
switch_core_timer_init(&rtp_session->timer, rtp_session->timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||
"RE-Starting timer [%s] %d bytes per %dms\n", rtp_session->timer_name, samples_per_interval, ms_per_packet);
|
||||
if (switch_core_timer_init(&rtp_session->timer,
|
||||
rtp_session->timer_name, ms_per_packet / 1000, samples_per_interval, rtp_session->pool) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
|
||||
"RE-Starting timer [%s] %d bytes per %dms\n", rtp_session->timer_name, samples_per_interval, ms_per_packet);
|
||||
} else {
|
||||
memset(&rtp_session->timer, 0, sizeof(rtp_session->timer));
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
|
||||
"Problem RE-Starting timer [%s] %d bytes per %dms\n", rtp_session->timer_name, samples_per_interval, ms_per_packet);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session,
|
||||
|
Reference in New Issue
Block a user