diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-02-28 07:42:02 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-02-28 16:36:42 +0100 |
commit | 608a24a42836dd1b5dfa43c1607b41170242d864 (patch) | |
tree | 85b05100fbebb8215dbf4ed3c024ece8fb10d931 /src | |
parent | 871b12196b4b4ed0a2be0d2579203e5511197768 (diff) |
Use custom mpv osd script to change mpv ui
Diffstat (limited to 'src')
-rw-r--r-- | src/VideoPlayer.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
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<const char*> 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()) |