FS-7679 #resolve #comment please test, also added some cases of calling a file with no video as well
This commit is contained in:
parent
5efc9714ee
commit
6a102816f6
|
@ -4967,7 +4967,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||
|
||||
//if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
|
||||
|
||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||
switch_cond_next();
|
||||
continue;
|
||||
|
@ -5014,7 +5014,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||
} else if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
||||
send_blank = 1;
|
||||
}
|
||||
|
||||
send_blank = 1;
|
||||
if ((send_blank || switch_channel_test_flag(channel, CF_VIDEO_BLANK)) &&
|
||||
!session->video_read_callback && !switch_channel_test_flag(session->channel, CF_BRIDGED)) {
|
||||
fr.img = blank_img;
|
||||
|
|
|
@ -2683,6 +2683,7 @@ SWITCH_DECLARE(void) switch_core_session_video_reset(switch_core_session_t *sess
|
|||
//switch_channel_clear_flag(session->channel, CF_VIDEO_DECODED_READ);
|
||||
switch_channel_clear_flag(session->channel, CF_VIDEO_DEBUG_READ);
|
||||
switch_channel_clear_flag(session->channel, CF_VIDEO_DEBUG_WRITE);
|
||||
switch_channel_clear_flag(session->channel, CF_VIDEO_BLANK);
|
||||
switch_core_session_request_video_refresh(session);
|
||||
}
|
||||
|
||||
|
|
|
@ -478,6 +478,13 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
|
|||
vh.session_a = session_a;
|
||||
vh.session_b = session_b;
|
||||
launch_video(&vh);
|
||||
} else {
|
||||
if (switch_channel_test_flag(chan_a, CF_VIDEO)) {
|
||||
switch_channel_set_flag(chan_a, CF_VIDEO_BLANK);
|
||||
}
|
||||
if (switch_channel_test_flag(chan_b, CF_VIDEO)) {
|
||||
switch_channel_set_flag(chan_b, CF_VIDEO_BLANK);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -751,6 +758,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
|
|||
switch_channel_set_flag(chan_b, CF_INTERCEPT);
|
||||
}
|
||||
|
||||
switch_channel_clear_flag(chan_a, CF_VIDEO_BLANK);
|
||||
switch_channel_clear_flag(chan_b, CF_VIDEO_BLANK);
|
||||
|
||||
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
|
||||
data->done = 1;
|
||||
|
|
|
@ -550,6 +550,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
|||
if (switch_core_file_has_video(fh)) {
|
||||
switch_channel_set_flag(channel, CF_VIDEO_ECHO);
|
||||
switch_core_media_set_video_file(session, fh, SWITCH_RW_READ);
|
||||
} else if (switch_channel_test_flag(channel, CF_VIDEO)) {
|
||||
switch_channel_set_flag(channel, CF_VIDEO_BLANK);
|
||||
}
|
||||
|
||||
if (sample_start > 0) {
|
||||
|
@ -624,6 +626,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
|||
switch_channel_clear_flag_recursive(channel, CF_VIDEO_DECODED_READ);
|
||||
switch_core_media_set_video_file(session, NULL, SWITCH_RW_READ);
|
||||
}
|
||||
switch_channel_clear_flag(channel, CF_VIDEO_BLANK);
|
||||
switch_core_file_close(fh);
|
||||
|
||||
switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
|
||||
|
@ -801,6 +804,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
|||
switch_channel_clear_flag_recursive(channel, CF_VIDEO_DECODED_READ);
|
||||
switch_core_media_set_video_file(session, NULL, SWITCH_RW_READ);
|
||||
}
|
||||
switch_channel_clear_flag(channel, CF_VIDEO_BLANK);
|
||||
switch_core_file_close(fh);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue