From 86db163a96e0471c6f49da7c1250cc9bde48fdfb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 15 Dec 2020 00:59:47 +0100 Subject: Matrix: keep image/video open. Need to manually close. Fixes auto close of images --- src/VideoPlayer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/VideoPlayer.cpp') 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"); -- cgit v1.2.3