FS-10097: [mod_conference] Add fgimg to conference video layouts

This commit is contained in:
Anthony Minessale 2017-03-06 14:39:27 -06:00 committed by Mike Jerris
parent a81a4c6abe
commit c421b82c17
2 changed files with 9 additions and 10 deletions

View File

@ -11938,7 +11938,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
switch_io_event_hook_video_read_frame_t *ptr;
uint32_t loops = 0;
switch_media_handle_t *smh;
int patchers = 0;
switch_assert(session != NULL);
@ -12094,10 +12093,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
if (bp->callback && switch_test_flag(bp, SMBF_READ_VIDEO_PING)) {
if (switch_test_flag(bp, SMBF_READ_VIDEO_PATCH)) {
patchers++;
}
bp->video_ping_frame = *frame;
if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ_VIDEO_PING) == SWITCH_FALSE
@ -12126,11 +12121,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
}
if ((*frame) && (*frame)->codec) {
if (patchers) {
switch_set_flag((*frame)->codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
} else {
switch_clear_flag((*frame)->codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
}
(*frame)->pmap = NULL;
}
if (status == SWITCH_STATUS_SUCCESS) {

View File

@ -845,6 +845,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
switch_clear_flag(session, SSF_MEDIA_BUG_TAP_ONLY);
}
if (switch_test_flag(bug, SMBF_READ_VIDEO_PATCH) && session->video_read_codec) {
switch_set_flag(session->video_read_codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
}
if (switch_event_create(&event, SWITCH_EVENT_MEDIA_BUG_START) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Media-Bug-Function", "%s", bug->function);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Media-Bug-Target", "%s", bug->target);
@ -1186,6 +1190,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_close(switch_media_bug_t *
switch_thread_join(&st, bp->video_bug_thread);
}
if (switch_test_flag(bp, SMBF_READ_VIDEO_PATCH) && bp->session->video_read_codec) {
switch_clear_flag(bp->session->video_read_codec, SWITCH_CODEC_FLAG_VIDEO_PATCHING);
}
switch_core_media_bug_destroy(bp);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(switch_core_media_bug_get_session(*bug)), SWITCH_LOG_DEBUG, "Removing BUG from %s\n",
switch_channel_get_name(bp->session->channel));