FS-7500: add force flag
This commit is contained in:
parent
dbec35e734
commit
78d06832e7
|
@ -1769,7 +1769,8 @@ typedef uint32_t switch_file_flag_t;
|
|||
typedef enum {
|
||||
SWITCH_IO_FLAG_NONE = 0,
|
||||
SWITCH_IO_FLAG_NOBLOCK = (1 << 0),
|
||||
SWITCH_IO_FLAG_SINGLE_READ = (1 << 1)
|
||||
SWITCH_IO_FLAG_SINGLE_READ = (1 << 1),
|
||||
SWITCH_IO_FLAG_FORCE = (1 << 2)
|
||||
} switch_io_flag_enum_t;
|
||||
typedef uint32_t switch_io_flag_t;
|
||||
|
||||
|
|
|
@ -4763,7 +4763,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
|||
switch_mutex_unlock(mh->file_mutex);
|
||||
} else if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
||||
fr.img = blank_img;
|
||||
switch_core_session_write_video_frame(session, &fr, SWITCH_IO_FLAG_NONE, 0);
|
||||
switch_core_session_write_video_frame(session, &fr, SWITCH_IO_FLAG_NONE, SWITCH_IO_FLAG_FORCE);
|
||||
}
|
||||
|
||||
if (read_frame && (switch_channel_test_flag(channel, CF_VIDEO_ECHO))) {
|
||||
|
@ -10037,6 +10037,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_video_frame(switch_cor
|
|||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(switch_channel_test_flag(session->channel, CF_VIDEO_READY) || (flags & SWITCH_IO_FLAG_FORCE))) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!smh->video_init && smh->mparams->video_key_first && (now - smh->video_last_key_time) > smh->mparams->video_key_first) {
|
||||
switch_core_media_gen_key_frame(session);
|
||||
|
||||
|
|
Loading…
Reference in New Issue