if (conference->playing_video_file) {
conference->canvases[node->canvas_id]->send_keyframe = 1;
+ conference->canvases[node->canvas_id]->play_file = 0;
conference->playing_video_file = 0;
}
+
+
return switch_core_file_close(&node->fh);
}
}
if (full_screen) {
- canvas->play_file = 1;
+ if (canvas->play_file == 0) {
+ canvas->play_file = 1;
+ }
canvas->conference->playing_video_file = 1;
} else {
conference_video_canvas_set_fnode_layer(canvas, fnode, -1);
if (conference->playing_video_file) {
if (switch_core_file_read_video(&conference->fnode->fh, &write_frame, SVR_FLUSH) == SWITCH_STATUS_SUCCESS) {
- switch_img_free(&file_img);
+ switch_image_t *tmp = NULL;
- if (canvas->play_file) {
+ if (canvas->play_file == 1) {
canvas->send_keyframe = 1;
- canvas->play_file = 0;
+ canvas->play_file = -1;
}
-
+
switch_img_free(&file_img);
- switch_img_fit(&write_frame.img, canvas->img->d_w, canvas->img->d_h, SWITCH_FIT_SIZE);
- file_img = write_img = write_frame.img;
+ switch_img_letterbox(write_frame.img, &tmp, canvas->img->d_w, canvas->img->d_h, "#000000");
+ if (tmp) {
+ switch_img_free(&write_frame.img);
+ file_img = write_img = write_frame.img = tmp;
+ } else {
+ file_img = write_img = write_frame.img;
+ }
+
//switch_core_timer_sync(&canvas->timer);
timestamp = canvas->timer.samplecount;
} else if (file_img) {