提交 29eabfe7 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4459 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 91004a8a
...@@ -1365,13 +1365,8 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v ...@@ -1365,13 +1365,8 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
} }
} }
if (switch_test_flag(member, MFLAG_WASTE_BANDWIDTH) && !talking) {
memset(read_frame->data, 255, read_frame->datalen);
}
/* skip frames that are not actual media or when we are muted or silent */ /* skip frames that are not actual media or when we are muted or silent */
if ((talking || energy_level == 0) && switch_test_flag(member, MFLAG_CAN_SPEAK) || switch_test_flag(member, MFLAG_WASTE_BANDWIDTH)) { if ((talking || energy_level == 0) && switch_test_flag(member, MFLAG_CAN_SPEAK)) {
if (member->read_resampler) { if (member->read_resampler) {
int16_t *bptr = (int16_t *) read_frame->data; int16_t *bptr = (int16_t *) read_frame->data;
int len = (int) read_frame->datalen;; int len = (int) read_frame->datalen;;
...@@ -1644,6 +1639,7 @@ static void conference_loop_output(conference_member_t *member) ...@@ -1644,6 +1639,7 @@ static void conference_loop_output(conference_member_t *member)
switch_buffer_t *use_buffer = NULL; switch_buffer_t *use_buffer = NULL;
uint32_t mux_used = (uint32_t)switch_buffer_inuse(member->mux_buffer) >= bytes ? 1 : 0; uint32_t mux_used = (uint32_t)switch_buffer_inuse(member->mux_buffer) >= bytes ? 1 : 0;
if (mux_used) {
while (mux_used) { while (mux_used) {
/* Flush the output buffer and write all the data (presumably muxed) back to the channel */ /* Flush the output buffer and write all the data (presumably muxed) back to the channel */
switch_mutex_lock(member->audio_out_mutex); switch_mutex_lock(member->audio_out_mutex);
...@@ -1668,7 +1664,18 @@ static void conference_loop_output(conference_member_t *member) ...@@ -1668,7 +1664,18 @@ static void conference_loop_output(conference_member_t *member)
if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) { if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
break; break;
} }
}
} else {
if (switch_test_flag(member, MFLAG_WASTE_BANDWIDTH)) {
memset(write_frame.data, 255, bytes);
write_frame.datalen = bytes;
write_frame.samples = samples;
write_frame.timestamp = timer.samplecount;
switch_core_session_write_frame(member->session, &write_frame, -1, 0);
}
if (switch_core_timer_next(&timer) != SWITCH_STATUS_SUCCESS) {
break;
}
} }
} }
} /* Rinse ... Repeat */ } /* Rinse ... Repeat */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论