aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-12-15 00:59:47 +0100
committerdec05eba <dec05eba@protonmail.com>2020-12-15 00:59:47 +0100
commit86db163a96e0471c6f49da7c1250cc9bde48fdfb (patch)
treea98195eb604b6572cab3c8f61d1ca5ca302c3def /src/VideoPlayer.cpp
parentc4c4366947e4df1502032b3814ef736faa1ae540 (diff)
Matrix: keep image/video open. Need to manually close. Fixes auto close of images
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 0510a4c..c6f5a36 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -18,12 +18,13 @@ const int MAX_RETRIES_CONNECT = 20;
const int READ_TIMEOUT_MS = 200;
namespace QuickMedia {
- VideoPlayer::VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, bool resume_playback, EventCallbackFunc _event_callback, VideoPlayerWindowCreateCallback _window_create_callback, const std::string &resource_root) :
+ VideoPlayer::VideoPlayer(bool use_tor, bool no_video, bool use_system_mpv_config, bool resume_playback, bool keep_open, EventCallbackFunc _event_callback, VideoPlayerWindowCreateCallback _window_create_callback, const std::string &resource_root) :
exit_status(0),
use_tor(use_tor),
no_video(no_video),
use_system_mpv_config(use_system_mpv_config),
resume_playback(resume_playback),
+ keep_open(keep_open),
video_process_id(-1),
ipc_socket(-1),
connected_to_ipc(false),
@@ -104,6 +105,9 @@ namespace QuickMedia {
wid_arg.c_str()
});
+ if(keep_open)
+ args.push_back("--keep-open=yes");
+
if(!resume_playback)
args.push_back("--no-resume-playback");