mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-05 06:58:57 +00:00
FS-7513: fix queued video playbacks
This commit is contained in:
parent
8a0b95115f
commit
74cff6a744
@ -4655,6 +4655,24 @@ static switch_status_t video_thread_callback(switch_core_session_t *session, swi
|
|||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void fnode_check_video(conference_obj_t *conference, conference_file_node_t *fnode) {
|
||||||
|
|
||||||
|
if (switch_core_file_has_video(&fnode->fh)) {
|
||||||
|
int full_screen = 0;
|
||||||
|
|
||||||
|
if (fnode->fh.params) {
|
||||||
|
full_screen = switch_true(switch_event_get_header(fnode->fh.params, "full-screen"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (full_screen) {
|
||||||
|
conference->canvas->play_file = 1;
|
||||||
|
conference->playing_video_file = 1;
|
||||||
|
} else {
|
||||||
|
canvas_set_fnode_layer(conference, fnode, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void conference_command_handler(switch_live_array_t *la, const char *cmd, const char *sessid, cJSON *jla, void *user_data)
|
static void conference_command_handler(switch_live_array_t *la, const char *cmd, const char *sessid, cJSON *jla, void *user_data)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -5105,6 +5123,11 @@ static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, v
|
|||||||
fnode = conference->fnode;
|
fnode = conference->fnode;
|
||||||
conference->fnode = conference->fnode->next;
|
conference->fnode = conference->fnode->next;
|
||||||
|
|
||||||
|
if (conference->fnode) {
|
||||||
|
fnode_check_video(conference, conference->fnode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
pool = fnode->pool;
|
pool = fnode->pool;
|
||||||
fnode = NULL;
|
fnode = NULL;
|
||||||
switch_core_destroy_memory_pool(&pool);
|
switch_core_destroy_memory_pool(&pool);
|
||||||
@ -7158,8 +7181,6 @@ static void canvas_set_fnode_layer(conference_obj_t *conference, conference_file
|
|||||||
switch_mutex_unlock(conference->canvas->mutex);
|
switch_mutex_unlock(conference->canvas->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Play a file in the conference room */
|
/* Play a file in the conference room */
|
||||||
static switch_status_t conference_play_file(conference_obj_t *conference, char *file, uint32_t leadin, switch_channel_t *channel, uint8_t async)
|
static switch_status_t conference_play_file(conference_obj_t *conference, char *file, uint32_t leadin, switch_channel_t *channel, uint8_t async)
|
||||||
{
|
{
|
||||||
@ -7312,20 +7333,9 @@ static switch_status_t conference_play_file(conference_obj_t *conference, char *
|
|||||||
fnode->pool = pool;
|
fnode->pool = pool;
|
||||||
fnode->async = async;
|
fnode->async = async;
|
||||||
fnode->file = switch_core_strdup(fnode->pool, file);
|
fnode->file = switch_core_strdup(fnode->pool, file);
|
||||||
|
|
||||||
if (switch_core_file_has_video(&fnode->fh)) {
|
if (!conference->fnode || (async && !conference->async_fnode)) {
|
||||||
int full_screen = 0;
|
fnode_check_video(conference, fnode);
|
||||||
|
|
||||||
if (fnode->fh.params) {
|
|
||||||
full_screen = switch_true(switch_event_get_header(fnode->fh.params, "full-screen"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (full_screen) {
|
|
||||||
conference->canvas->play_file = 1;
|
|
||||||
conference->playing_video_file = 1;
|
|
||||||
} else {
|
|
||||||
canvas_set_fnode_layer(conference, fnode, -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Queue the node */
|
/* Queue the node */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user