FS-9610 #resolve [Video keyframe requests not being propagated properly] %backport=1.6

This commit is contained in:
Anthony Minessale committed 2016-10-04 22:34:47 -05:00
1 parent 15a232b5bb
commit 2a3b8a230c
3 files changed
+18 -28

No files matched your search

+3 -13
View File
@@ -99,6 +99,7 @@ static void video_bridge_thread(switch_core_session_t *session, void *obj)
if (switch_channel_test_flag(channel, CF_VIDEO_REFRESH_REQ)) {
switch_channel_clear_flag(channel, CF_VIDEO_REFRESH_REQ);
refresh_timer = refresh_cnt;
}
@@ -126,10 +127,7 @@ static void video_bridge_thread(switch_core_session_t *session, void *obj)
if (refresh_timer) {
if (refresh_timer > 0 && (refresh_timer % 100) == 0) {
switch_core_session_request_video_refresh(vh->session_a);
switch_core_session_request_video_refresh(vh->session_b);
switch_core_media_gen_key_frame(vh->session_a);
switch_core_media_gen_key_frame(vh->session_b);
}
refresh_timer--;
}
@@ -140,20 +138,12 @@ static void video_bridge_thread(switch_core_session_t *session, void *obj)
switch_cond_next();
continue;
}
if (switch_test_flag(read_frame, SFF_CNG)) {
switch_core_session_request_video_refresh(vh->session_a);
continue;
}
}
if (switch_channel_test_flag(channel, CF_LEG_HOLDING) || switch_channel_test_flag(b_channel, CF_VIDEO_READ_FILE_ATTACHED)) {
switch_channel_video_sync(channel);
switch_core_session_write_video_frame(session, read_frame, SWITCH_IO_FLAG_NONE, 0);
if (switch_test_flag(read_frame, SFF_CNG) ||
switch_channel_test_flag(channel, CF_LEG_HOLDING) || switch_channel_test_flag(b_channel, CF_VIDEO_READ_FILE_ATTACHED)) {
continue;
}
if (switch_channel_media_up(b_channel)) {
if (switch_core_session_write_video_frame(vh->session_b, read_frame, SWITCH_IO_FLAG_NONE, 0) != SWITCH_STATUS_SUCCESS) {