From 608a24a42836dd1b5dfa43c1607b41170242d864 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 28 Feb 2022 07:42:02 +0100 Subject: Use custom mpv osd script to change mpv ui --- src/VideoPlayer.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 3e336fb..2c0fe44 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -153,7 +153,6 @@ namespace QuickMedia { fcntl(ipc_socket, F_SETFL, flags | O_NONBLOCK); const std::string ipc_fd = std::to_string(fd[1]); - std::string input_conf = "--input-conf=" + startup_args.resource_root + "input.conf"; std::string cache_dir = "--cache-dir=" + std::move(get_cache_dir().join("media").data); std::string wid_arg = "--wid="; @@ -170,6 +169,8 @@ namespace QuickMedia { if(get_file_type(video_player_filepath.c_str()) != FileType::REGULAR) video_player_filepath = "/usr/bin/quickmedia-video-player"; + std::string config_dir = "--config-dir=" + startup_args.resource_root + "mpv"; + std::vector args; // TODO: Resume playback if the last video played matches the first video played next time QuickMedia is launched args.insert(args.end(), { @@ -184,13 +185,12 @@ namespace QuickMedia { "--cache=yes", "--cache-on-disk=yes", "--cache-secs=86400", // 24 hours - "--sub-font-size=60", + "--sub-font-size=50", "--sub-margin-y=60", - "--sub-border-size=1.95", + "--sub-border-size=2.0", + "--sub-bold=yes", "--input-default-bindings=yes", "--input-vo-keyboard=yes", - "--osc=yes", - //"--force_all_formats=no", cache_dir.c_str(), wid_arg.c_str(), "--ipc-fd", @@ -204,9 +204,6 @@ namespace QuickMedia { args.push_back("--save-position-on-quit=no"); args.push_back("--resume-playback=no"); } - - if(!startup_args.use_system_input_config) - args.push_back(input_conf.c_str()); if(is_running_wayland()) { args.push_back("--gpu-context=x11egl"); @@ -235,13 +232,11 @@ namespace QuickMedia { if(startup_args.use_system_mpv_config) { args.push_back("--config=yes"); args.push_back("--load-scripts=yes"); + args.push_back("--osc=yes"); } else { args.insert(args.end(), { - "--config=no", - "--load-scripts=no", - "--profile=gpu-hq", - "--vo=gpu,vdpau,x11", - "--hwdec=auto" + config_dir.c_str(), + "--config=yes" }); if(!mpris_arg.empty()) -- cgit v1.2.3