mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-04 14:38:35 +00:00
git-svn-id: http://svn.freeswitch.org/svn/local/src/freeswitch@20 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f5497f6f2e
commit
7362b108db
@ -72,6 +72,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "osipparser2", "..\..\..\osi
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eXosip", "..\..\..\eXosip\platform\vsnet\eXosip.vcproj", "{4EA67539-9EE9-4065-BD39-87E517FD8262}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eXosip", "..\..\..\eXosip\platform\vsnet\eXosip.vcproj", "{4EA67539-9EE9-4065-BD39-87E517FD8262}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ccrtp4c", "..\..\..\ccrtp4c\w32\msvc\ccrtp4c.vcproj", "{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug IPv6 MSR|Win32 = Debug IPv6 MSR|Win32
|
Debug IPv6 MSR|Win32 = Debug IPv6 MSR|Win32
|
||||||
@ -279,6 +281,20 @@ Global
|
|||||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release|Win32.ActiveCfg = Release|Win32
|
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release|Win32.Build.0 = Release|Win32
|
{4EA67539-9EE9-4065-BD39-87E517FD8262}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug IPv6 MSR|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug IPv6 MSR|Win32.Build.0 = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug IPv6 Musica|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug IPv6 Musica|Win32.Build.0 = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug IPv6 Win2000|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug IPv6 Win2000|Win32.Build.0 = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Release IPv6 Win2000|Win32.ActiveCfg = Release|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Release IPv6 Win2000|Win32.Build.0 = Release|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Release IPv6 XP|Win32.ActiveCfg = Release|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Release IPv6 XP|Win32.Build.0 = Release|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{9ACCBFFD-390A-42F9-BD50-FF84A17A093A}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
@ -79,7 +79,7 @@ static void *audio_bridge_thread(switch_thread *thread, void *obj)
|
|||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Frame....Bubye!\n");
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bad Frame....Bubye!\n");
|
||||||
data->running = -1;
|
data->running = -1;
|
||||||
}
|
}
|
||||||
switch_yield(100);
|
//switch_yield(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_channel_hangup(chan_b);
|
switch_channel_hangup(chan_b);
|
||||||
|
@ -471,11 +471,12 @@ static void activate_rtp(struct private_object *tech_pvt)
|
|||||||
tech_pvt->remote_sdp_audio_port,
|
tech_pvt->remote_sdp_audio_port,
|
||||||
tech_pvt->read_codec.codec_interface->ianacode,
|
tech_pvt->read_codec.codec_interface->ianacode,
|
||||||
ms,
|
ms,
|
||||||
ms * 20);
|
ms * 15);
|
||||||
|
|
||||||
if (tech_pvt->rtp_session) {
|
if (tech_pvt->rtp_session) {
|
||||||
tech_pvt->ssrc = ccrtp4c_get_ssrc(tech_pvt->rtp_session);
|
tech_pvt->ssrc = ccrtp4c_get_ssrc(tech_pvt->rtp_session);
|
||||||
ccrtp4c_start(tech_pvt->rtp_session);
|
ccrtp4c_start(tech_pvt->rtp_session);
|
||||||
|
tech_pvt->timestamp_recv = tech_pvt->timestamp_send = ccrtp4c_current_timestamp(tech_pvt->rtp_session);
|
||||||
switch_set_flag(tech_pvt, TFLAG_RTP);
|
switch_set_flag(tech_pvt, TFLAG_RTP);
|
||||||
} else {
|
} else {
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Oh oh?\n");
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Oh oh?\n");
|
||||||
@ -522,7 +523,7 @@ static switch_status exosip_read_frame(switch_core_session *session, switch_fram
|
|||||||
size_t bytes = 0, samples = 0, frames=0, ms=0;
|
size_t bytes = 0, samples = 0, frames=0, ms=0;
|
||||||
switch_channel *channel = NULL;
|
switch_channel *channel = NULL;
|
||||||
switch_time_t reference, now;
|
switch_time_t reference, now;
|
||||||
int mult = 2;
|
int mult = 1;
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
@ -567,12 +568,12 @@ static switch_status exosip_read_frame(switch_core_session *session, switch_fram
|
|||||||
|
|
||||||
now = switch_time_now();
|
now = switch_time_now();
|
||||||
if (now >= reference) {
|
if (now >= reference) {
|
||||||
printf("TO\n");
|
//printf("TO\n");
|
||||||
//memset(tech_pvt->read_buf, 0, bytes *2);
|
memset(tech_pvt->read_buf, 0, bytes * mult);
|
||||||
//tech_pvt->timestamp_recv += (samples * mult);
|
tech_pvt->timestamp_recv += (samples * mult);
|
||||||
//reference += (ms * mult);
|
reference += (ms * mult);
|
||||||
//tech_pvt->read_frame.datalen = bytes *2;
|
tech_pvt->read_frame.datalen = bytes *2;
|
||||||
//break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_yield(100);
|
switch_yield(100);
|
||||||
@ -644,11 +645,9 @@ static switch_status exosip_write_frame(switch_core_session *session, switch_fra
|
|||||||
|
|
||||||
//printf("%s %s->%s send %d bytes %d samples in %d frames taking up %d ms ts=%d\n", switch_channel_get_name(channel), tech_pvt->local_sdp_audio_ip, tech_pvt->remote_sdp_audio_ip, frame->datalen, samples, frames, ms, tech_pvt->timestamp_send);
|
//printf("%s %s->%s send %d bytes %d samples in %d frames taking up %d ms ts=%d\n", switch_channel_get_name(channel), tech_pvt->local_sdp_audio_ip, tech_pvt->remote_sdp_audio_ip, frame->datalen, samples, frames, ms, tech_pvt->timestamp_send);
|
||||||
|
|
||||||
tech_pvt->timestamp_send += (int)samples;
|
|
||||||
ccrtp4c_write(tech_pvt->rtp_session, frame->data, frame->datalen, &tech_pvt->timestamp_send);
|
ccrtp4c_write(tech_pvt->rtp_session, frame->data, frame->datalen, &tech_pvt->timestamp_send);
|
||||||
|
tech_pvt->timestamp_send += (int)samples;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch_clear_flag(tech_pvt, TFLAG_WRITING);
|
switch_clear_flag(tech_pvt, TFLAG_WRITING);
|
||||||
//switch_mutex_unlock(tech_pvt->rtp_lock);
|
//switch_mutex_unlock(tech_pvt->rtp_lock);
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
static const char modname[] = "mod_softtimer";
|
static const char modname[] = "mod_softtimer";
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define WINTIMER
|
//#define WINTIMER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct timer_private {
|
struct timer_private {
|
||||||
@ -82,7 +82,7 @@ static switch_status soft_timer_next(switch_timer *timer)
|
|||||||
private->reference += timer->interval * 1000;
|
private->reference += timer->interval * 1000;
|
||||||
|
|
||||||
while (switch_time_now() < private->reference) {
|
while (switch_time_now() < private->reference) {
|
||||||
switch_yield(100);
|
switch_yield(1000);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1268,10 +1268,12 @@ SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash *hash, char *key)
|
|||||||
SWITCH_DECLARE(void) switch_core_launch_module_thread(switch_thread_start_t func, void *obj)
|
SWITCH_DECLARE(void) switch_core_launch_module_thread(switch_thread_start_t func, void *obj)
|
||||||
{
|
{
|
||||||
switch_thread *thread;
|
switch_thread *thread;
|
||||||
|
apr_threadattr_t *thd_attr;;
|
||||||
|
apr_threadattr_create(&thd_attr, runtime.memory_pool);
|
||||||
|
apr_threadattr_detach_set(thd_attr, 1);
|
||||||
|
|
||||||
/* The 2nd needs to be a thread attr soon */
|
|
||||||
switch_thread_create(&thread,
|
switch_thread_create(&thread,
|
||||||
NULL,
|
thd_attr,
|
||||||
func,
|
func,
|
||||||
obj,
|
obj,
|
||||||
runtime.memory_pool
|
runtime.memory_pool
|
||||||
@ -1305,8 +1307,6 @@ SWITCH_DECLARE(void) switch_core_session_thread_launch(switch_core_session *sess
|
|||||||
{
|
{
|
||||||
switch_thread *thread;
|
switch_thread *thread;
|
||||||
apr_threadattr_t *thd_attr;;
|
apr_threadattr_t *thd_attr;;
|
||||||
|
|
||||||
/* The 2nd needs to be a thread attr soon */
|
|
||||||
apr_threadattr_create(&thd_attr, session->pool);
|
apr_threadattr_create(&thd_attr, session->pool);
|
||||||
apr_threadattr_detach_set(thd_attr, 1);
|
apr_threadattr_detach_set(thd_attr, 1);
|
||||||
|
|
||||||
@ -1324,10 +1324,12 @@ SWITCH_DECLARE(void) switch_core_session_thread_launch(switch_core_session *sess
|
|||||||
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session *session, switch_thread_start_t func, void *obj)
|
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session *session, switch_thread_start_t func, void *obj)
|
||||||
{
|
{
|
||||||
switch_thread *thread;
|
switch_thread *thread;
|
||||||
|
apr_threadattr_t *thd_attr;;
|
||||||
|
apr_threadattr_create(&thd_attr, session->pool);
|
||||||
|
apr_threadattr_detach_set(thd_attr, 1);
|
||||||
|
|
||||||
/* The 2nd needs to be a thread attr soon */
|
|
||||||
switch_thread_create(&thread,
|
switch_thread_create(&thread,
|
||||||
NULL,
|
thd_attr,
|
||||||
func,
|
func,
|
||||||
obj,
|
obj,
|
||||||
session->pool
|
session->pool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user