From 3b21eda9ad3b2ece9c6e5472eb419fb4d88424bd Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 17 Sep 2020 19:20:36 +0200 Subject: Add image upscaling with waifu2x-ncnn-vulkan, async load images in scroll image view mode --- include/QuickMedia.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/QuickMedia.hpp') diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index b2c499c..d3bff47 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -11,7 +11,11 @@ #include #include #include +#include +#include +#include #include +#include #include #include @@ -23,6 +27,11 @@ namespace QuickMedia { SINGLE, SCROLL }; + + struct CopyOp { + Path source; + Path destination; + }; class Program { public: @@ -94,12 +103,18 @@ namespace QuickMedia { std::future search_suggestion_future; std::future autocomplete_future; std::future image_download_future; + std::thread image_upscale_thead; + std::mutex image_upscale_mutex; + std::deque images_to_upscale; + std::condition_variable image_upscale_cv; std::string downloading_chapter_url; bool image_download_cancel = false; int exit_code = 0; std::string resources_root; bool use_tor = false; bool use_system_mpv_config = false; + bool upscale_images = false; + bool running = false; // TODO: Save this to config file when switching modes ImageViewMode image_view_mode = ImageViewMode::SINGLE; Body *related_media_body; -- cgit v1.2.3