提交 58ba3348 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-7500: add video_decoded_echo var to make the echo app decode and re-encode…

FS-7500: add video_decoded_echo var to make the echo app decode and re-encode video frames for testing
上级 5dcd98d6
...@@ -637,7 +637,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s ...@@ -637,7 +637,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s
switch_status_t status; switch_status_t status;
switch_frame_t *read_frame; switch_frame_t *read_frame;
switch_channel_t *channel = switch_core_session_get_channel(session); switch_channel_t *channel = switch_core_session_get_channel(session);
int orig_vid = switch_channel_test_flag(channel, CF_VIDEO);
if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) { if (switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
...@@ -645,7 +644,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s ...@@ -645,7 +644,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s
arg_recursion_check_start(args); arg_recursion_check_start(args);
restart: if (switch_true(switch_channel_get_variable(channel, "video_decoded_echo"))) {
switch_channel_set_flag(channel, CF_VIDEO_DECODED_READ);
}
while (switch_channel_ready(channel)) { while (switch_channel_ready(channel)) {
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0); status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
...@@ -653,12 +654,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s ...@@ -653,12 +654,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s
break; break;
} }
if (!orig_vid && switch_channel_test_flag(channel, CF_VIDEO)) {
orig_vid = 1;
goto restart;
}
switch_ivr_parse_all_events(session); switch_ivr_parse_all_events(session);
if (args && (args->input_callback || args->buf || args->buflen)) { if (args && (args->input_callback || args->buf || args->buflen)) {
...@@ -719,6 +714,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s ...@@ -719,6 +714,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s
} }
} }
switch_core_session_video_reset(session);
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论