grr
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@338 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
dbbbbcab1d
commit
980a1ec470
|
@ -166,14 +166,15 @@ void playback_function(switch_core_session *session, char *data)
|
||||||
|
|
||||||
switch_core_session_kill_channel(session, SWITCH_SIG_KILL);
|
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_timer_destroy(&timer);
|
||||||
|
|
||||||
switch_core_codec_destroy(&codec);
|
switch_core_codec_destroy(&codec);
|
||||||
|
|
||||||
switch_channel_hangup(channel);
|
switch_channel_hangup(channel);
|
||||||
|
|
||||||
|
/* End the audio absorbing thread */
|
||||||
|
switch_core_thread_session_end(&thread_session);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const switch_application_interface playback_application_interface = {
|
static const switch_application_interface playback_application_interface = {
|
||||||
|
|
|
@ -1320,7 +1320,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
|
||||||
globals.running = 1;
|
globals.running = 1;
|
||||||
while (globals.running > 0) {
|
while (globals.running > 0) {
|
||||||
if (!(event = eXosip_event_wait(0,100))) {
|
if (!(event = eXosip_event_wait(0,100))) {
|
||||||
switch_yield(100);
|
switch_yield(1000);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 samples = iax_build_codec_rates();
|
||||||
unsigned short mixed = ((tech_pvt->samprate ? tech_pvt->samprate : *samprate) & samples);
|
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;
|
srate = 8000;
|
||||||
|
|
||||||
if (mixed & IAX_RATE_16KHZ) {
|
if (mixed & IAX_RATE_16KHZ) {
|
||||||
|
|
|
@ -493,6 +493,10 @@ static void *switch_core_service_thread(switch_thread *thread, void *obj)
|
||||||
channel = switch_core_session_get_channel(session);
|
channel = switch_core_session_get_channel(session);
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
|
|
||||||
|
#ifdef WTF
|
||||||
|
data->running = 0;
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
while(data->running > 0) {
|
while(data->running > 0) {
|
||||||
switch(switch_core_session_read_frame(session, &read_frame, -1, stream_id)) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_yield(100);
|
switch_yield(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
data->running = 0;
|
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_DECLARE(void) switch_core_session_launch_thread(switch_core_session *session, switch_thread_start_t func, void *obj)
|
||||||
{
|
{
|
||||||
switch_thread *thread;
|
switch_thread *thread;
|
||||||
switch_threadattr_t *thd_attr;;
|
switch_threadattr_t *thd_attr = NULL;
|
||||||
switch_threadattr_create(&thd_attr, session->pool);
|
switch_threadattr_create(&thd_attr, session->pool);
|
||||||
switch_threadattr_detach_set(thd_attr, 1);
|
switch_threadattr_detach_set(thd_attr, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue