aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-08-25 10:55:08 +0200
committerdec05eba <dec05eba@protonmail.com>2023-08-25 10:55:08 +0200
commitce5c0ef8aa8eec45e31ad6697f5d94dd1727a984 (patch)
tree901e1ec6fba926f1cd9b26d0265c33359d783f68
parent0c2a740f885527fc06240536549f02e796e5968b (diff)
Reduce latency (in mglpp, opengl hack)
m---------depends/mglpp0
-rw-r--r--include/QuickMedia.hpp2
-rw-r--r--src/QuickMedia.cpp17
-rw-r--r--src/VideoPlayer.cpp1
4 files changed, 7 insertions, 13 deletions
diff --git a/depends/mglpp b/depends/mglpp
-Subproject f91ac8b0fcc801bc6b2d04ebaeffe1feee4437f
+Subproject bca32ff4b62dde07063546c5998bf4281269083
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 0a21e07..0f8837d 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -242,7 +242,5 @@ namespace QuickMedia {
int video_max_height = 0;
std::mutex login_inputs_mutex;
const char *yt_dl_name = nullptr;
-
- int monitor_max_fps = 0;
};
}
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 04ba62f..14efedb 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -803,12 +803,6 @@ namespace QuickMedia {
XSetErrorHandler(x_error_handler);
XSetIOErrorHandler(x_io_error_handler);
- monitor_max_fps = 0;
- for_each_active_monitor_output(disp, [&](const XRRCrtcInfo*, const XRRModeInfo *mode_info) {
- monitor_max_fps = std::max(monitor_max_fps, monitor_info_get_fps(mode_info));
- });
-
- window.set_framerate_limit(monitor_max_fps);
idle = false;
if(create_directory_recursive(get_cache_dir().join("media")) != 0) {
@@ -1466,7 +1460,7 @@ namespace QuickMedia {
void Program::idle_active_handler() {
if(idle)
- window.set_framerate_limit(monitor_max_fps);
+ window.set_framerate_limit(0);
idle = false;
idle_timer.restart();
@@ -3274,10 +3268,11 @@ namespace QuickMedia {
redirect_focus_to_video_player_window(video_player_window);
XSync(disp, False);
- SubtitleData subtitle_data;
- video_page->get_subtitles(subtitle_data);
- if(!subtitle_data.url.empty())
- video_player->add_subtitle(subtitle_data.url, subtitle_data.title, "eng");
+ // TODO: Readd when we no longer depend on yt-dlp
+ //SubtitleData subtitle_data;
+ //video_page->get_subtitles(subtitle_data);
+ //if(!subtitle_data.url.empty())
+ // video_player->add_subtitle(subtitle_data.url, subtitle_data.title, "eng");
update_time_pos = true;
update_window_focus_timer = true;
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 9036155..26946fc 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -235,6 +235,7 @@ namespace QuickMedia {
if(startup_args.use_youtube_dl) {
args.push_back("--ytdl=yes");
args.push_back(ytdl_format.c_str());
+ //args.push_back("--ytdl-raw-options=sub-lang=\"en,eng,enUS,en-US\",write-sub=");
} else {
args.push_back("--ytdl=no");
}