spring cleaning, lose some pointless code

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8310 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-05-08 19:19:47 +00:00
1 parent 1a0a6a714d
commit c4a18a09c2
29 files changed
+154 -388

No files matched your search

@@ -783,7 +783,7 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
}
if (switch_channel_test_flag(switch_core_session_get_channel(conference->floor_holder->session), CF_VIDEO)) {
status = switch_core_session_read_video_frame(conference->floor_holder->session, &vid_frame, -1, 0);
status = switch_core_session_read_video_frame(conference->floor_holder->session, &vid_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
conference->floor_holder = NULL;
@@ -835,7 +835,7 @@ static void *SWITCH_THREAD_FUNC conference_video_thread_run(switch_thread_t *thr
for (imember = conference->members; imember; imember = imember->next) {
if (switch_channel_test_flag(switch_core_session_get_channel(imember->session), CF_VIDEO)) {
has_vid++;
switch_core_session_write_video_frame(imember->session, vid_frame, -1, 0);
switch_core_session_write_video_frame(imember->session, vid_frame, SWITCH_IO_FLAG_NONE, 0);
}
}
switch_mutex_unlock(conference->member_mutex);
@@ -1497,7 +1497,7 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t * thread,
while (switch_test_flag(member, MFLAG_RUNNING) && switch_channel_ready(channel)) {
/* Read a frame. */
status = switch_core_session_read_frame(member->session, &read_frame, -1, 0);
status = switch_core_session_read_frame(member->session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
/* end the loop, if appropriate */
if (!SWITCH_READ_ACCEPTABLE(status) || !switch_test_flag(member, MFLAG_RUNNING)) {
@@ -1890,7 +1890,7 @@ static void conference_loop_output(conference_member_t * member)
switch_change_sln_volume(write_frame.data, write_frame.samples, member->volume_out_level);
}
write_frame.timestamp = timer.samplecount;
switch_core_session_write_frame(member->session, &write_frame, -1, 0);
switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
switch_core_timer_next(&timer);
@@ -1933,7 +1933,7 @@ static void conference_loop_output(conference_member_t * member)
switch_change_sln_volume(write_frame.data, write_frame.samples, member->volume_out_level);
}
write_frame.timestamp = timer.samplecount;
switch_core_session_write_frame(member->session, &write_frame, -1, 0);
switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
}
}
@@ -1948,7 +1948,7 @@ static void conference_loop_output(conference_member_t * member)
write_frame.datalen = bytes;
write_frame.samples = samples;
write_frame.timestamp = timer.samplecount;
switch_core_session_write_frame(member->session, &write_frame, -1, 0);
switch_core_session_write_frame(member->session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
}
}
}
@@ -3961,7 +3961,7 @@ static switch_status_t conference_local_play_file(conference_obj_t * conference,
/* generate some space infront of the file to be played */
for (x = 0; x < leadin; x++) {
switch_frame_t *read_frame;
status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@@ -1714,11 +1714,11 @@ SWITCH_STANDARD_APP(audio_bridge_function)
/* SIP won't let us redir media until the call has been answered #$^#%& so we will proxy any early media until they do */
while (switch_channel_ready(caller_channel) && switch_channel_ready(peer_channel)
&& !switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
switch_status_t status = switch_core_session_read_frame(peer_session, &read_frame, -1, 0);
switch_status_t status = switch_core_session_read_frame(peer_session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
uint8_t bad = 1;
if (SWITCH_READ_ACCEPTABLE(status)
&& switch_core_session_write_frame(session, read_frame, -1, 0) == SWITCH_STATUS_SUCCESS) {
&& switch_core_session_write_frame(session, read_frame, SWITCH_IO_FLAG_NONE, 0) == SWITCH_STATUS_SUCCESS) {
bad = 0;
}
if (bad) {
+2 -2
View File
@@ -130,7 +130,7 @@ SWITCH_STANDARD_APP(bcast_function)
while(!ready) {
status = switch_core_session_read_frame(session, &read_frame, -1, 0);
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (read_frame && switch_test_flag(read_frame, SFF_CNG)) {
continue;
}
@@ -206,7 +206,7 @@ SWITCH_STANDARD_APP(bcast_function)
for(;;) {
status = switch_core_session_read_frame(session, &read_frame, -1, 0);
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
+2 -2
View File
@@ -804,7 +804,7 @@ SWITCH_STANDARD_APP(fifo_function)
break;
}
status = switch_core_session_read_frame(session, &read_frame, -1, 0);
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@@ -854,7 +854,7 @@ SWITCH_STANDARD_APP(fifo_function)
switch_channel_set_flag(other_channel, CF_BREAK);
while (switch_channel_ready(channel) && switch_channel_ready(other_channel) && switch_channel_test_flag(other_channel, CF_TAGGED)) {
status = switch_core_session_read_frame(session, &read_frame, -1, 0);
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
+5 -5
View File
@@ -64,7 +64,7 @@ static void *SWITCH_THREAD_FUNC record_video_thread(switch_thread_t *thread, voi
eh->up = 1;
while(switch_channel_ready(channel)) {
status = switch_core_session_read_video_frame(session, &read_frame, -1, 0);
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@@ -90,7 +90,7 @@ static void *SWITCH_THREAD_FUNC record_video_thread(switch_thread_t *thread, voi
switch_mutex_unlock(eh->mutex);
switch_core_session_write_video_frame(session, read_frame, -1, 0);
switch_core_session_write_video_frame(session, read_frame, SWITCH_IO_FLAG_NONE, 0);
}
eh->up = 0;
return NULL;
@@ -165,7 +165,7 @@ SWITCH_STANDARD_APP(record_fsv_function)
while(switch_channel_ready(channel)) {
status = switch_core_session_read_frame(session, &read_frame, -1, 0);
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@@ -315,7 +315,7 @@ SWITCH_STANDARD_APP(play_fsv_function)
hdr->pt = pt;
}
if (switch_channel_test_flag(channel, CF_VIDEO)) {
switch_core_session_write_video_frame(session, &vid_frame, -1, 0);
switch_core_session_write_video_frame(session, &vid_frame, SWITCH_IO_FLAG_NONE, 0);
}
if (ts && last && last != ts) {
switch_yield(1000);
@@ -328,7 +328,7 @@ SWITCH_STANDARD_APP(play_fsv_function)
if ((write_frame.datalen = read(fd, write_frame.data, bytes)) <= 0) {
break;
}
switch_core_session_write_frame(session, &write_frame, -1, 0);
switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0);
switch_core_timer_next(&timer);
}
+1 -4
View File
@@ -171,7 +171,6 @@ SWITCH_STANDARD_APP(rss_function)
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
switch_core_thread_session_t thread_session;
uint32_t rate, interval = 20;
int stream_id = 0;
switch_timer_t timer = { 0 }, *timerp = NULL;
uint32_t last;
char *mydata = NULL;
@@ -292,9 +291,7 @@ SWITCH_STANDARD_APP(rss_function)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "setup timer success %u bytes per %d ms!\n", (rate / 50) * 2, interval);
/* start a thread to absorb incoming audio */
for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
switch_core_service_session(session, &thread_session, stream_id);
}
switch_core_service_session(session, &thread_session, 0);
timerp = &timer;
}