From d44c2609e73c0a9f6030b62a6b39399bf1db1fd4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 25 Nov 2023 09:46:29 +0100 Subject: Add --mpv-profile option, force libmpv (fixes custom system profile option) --- include/mpv.hpp | 2 +- src/main.cpp | 10 +++++++--- src/mpv.cpp | 7 ++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/mpv.hpp b/include/mpv.hpp index 09ba2c1..29817c8 100644 --- a/include/mpv.hpp +++ b/include/mpv.hpp @@ -11,7 +11,7 @@ public: Mpv() = default; ~Mpv(); - bool create(bool use_system_mpv_config); + bool create(bool use_system_mpv_config, const char *profile = "gpu-hq"); bool destroy(); bool load_file(const char *path); diff --git a/src/main.cpp b/src/main.cpp index 501e43a..7c6f944 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -344,6 +344,7 @@ private: // X compositor bool focused_window_changed = true; bool focused_window_set = false; const char *mpv_file = nullptr; + const char *mpv_profile = "gpu-hq"; Mpv mpv; std::mutex mpv_render_update_mutex; std::condition_variable mpv_render_update_condition; @@ -484,7 +485,7 @@ void dprintf( const char *fmt, ... ) } static void usage() { - fprintf(stderr, "usage: vr-video-player [--sphere|--sphere360|--flat|--plane] [--left-right|--right-left] [--stretch|--no-stretch] [--zoom zoom-level] [--cursor-scale scale] [--cursor-wrap|--no-cursor-wrap] [--follow-focused|--video video|] [--use-system-mpv-config] [--free-camera] [--reduce-flicker]\n"); + fprintf(stderr, "usage: vr-video-player [--sphere|--sphere360|--flat|--plane] [--left-right|--right-left] [--stretch|--no-stretch] [--zoom zoom-level] [--cursor-scale scale] [--cursor-wrap|--no-cursor-wrap] [--follow-focused|--video video|] [--use-system-mpv-config] [--mpv-profile ] [--free-camera] [--reduce-flicker]\n"); fprintf(stderr, "\n"); fprintf(stderr, "OPTIONS\n"); fprintf(stderr, " --sphere View the window as a stereoscopic 180 degrees screen (half sphere). The view will be attached to your head in vr. This is recommended for 180 degrees videos. This is the default value\n"); @@ -504,6 +505,7 @@ static void usage() { fprintf(stderr, " --follow-focused If this option is set, then the selected window will be the focused window. vr-video-player will automatically update when the focused window changes. Either this option, --video or window_id should be used\n"); fprintf(stderr, " --video