git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@338 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-01-13 02:05:39 +00:00
parent dbbbbcab1d
commit 980a1ec470
5 changed files with 13 additions and 8 deletions

View File

@ -166,14 +166,15 @@ void playback_function(switch_core_session *session, char *data)
switch_core_session_kill_channel(session, SWITCH_SIG_KILL);
/* End the audio absorbing thread */
switch_core_thread_session_end(&thread_session);
switch_core_timer_destroy(&timer);
switch_core_codec_destroy(&codec);
switch_channel_hangup(channel);
/* End the audio absorbing thread */
switch_core_thread_session_end(&thread_session);
}
static const switch_application_interface playback_application_interface = {

View File

@ -1320,7 +1320,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
globals.running = 1;
while (globals.running > 0) {
if (!(event = eXosip_event_wait(0,100))) {
switch_yield(100);
switch_yield(1000);
continue;
}

View File

@ -316,7 +316,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
unsigned short samples = iax_build_codec_rates();
unsigned short mixed = ((tech_pvt->samprate ? tech_pvt->samprate : *samprate) & samples);
printf("\n\n******WTF %u %u %u\n******\n", *samprate, samples, mixed);
//printf("\n\n******WTF %u %u %u\n******\n", *samprate, samples, mixed);
srate = 8000;
if (mixed & IAX_RATE_16KHZ) {

View File

@ -199,7 +199,7 @@ static switch_status channel_on_hangup(switch_core_session *session)
{
switch_channel *channel = NULL;
struct private_object *tech_pvt = NULL;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);

View File

@ -493,6 +493,10 @@ static void *switch_core_service_thread(switch_thread *thread, void *obj)
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
#ifdef WTF
data->running = 0;
return NULL;
#endif
while(data->running > 0) {
switch(switch_core_session_read_frame(session, &read_frame, -1, stream_id)) {
@ -506,7 +510,7 @@ static void *switch_core_service_thread(switch_thread *thread, void *obj)
break;
}
switch_yield(100);
switch_yield(10000);
}
data->running = 0;
@ -1791,7 +1795,7 @@ 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_thread *thread;
switch_threadattr_t *thd_attr;;
switch_threadattr_t *thd_attr = NULL;
switch_threadattr_create(&thd_attr, session->pool);
switch_threadattr_detach_set(thd_attr, 1);