diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-11 04:51:03 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-11 04:51:03 +0200 |
commit | 89383cff1ba5d8a928262fcb4c40382a981c78c8 (patch) | |
tree | da8b6062cc6770fd37e7a6f7b8c09fb61f46f7b2 /include/AsyncImageLoader.hpp | |
parent | 5b3becc79461d4ecf015e33515871cc09e26e04e (diff) |
Remove dependency on youtube-dl for streaming youtube, resulting in faster video startup
Diffstat (limited to 'include/AsyncImageLoader.hpp')
-rw-r--r-- | include/AsyncImageLoader.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/AsyncImageLoader.hpp b/include/AsyncImageLoader.hpp index 7fe7c07..689ec5f 100644 --- a/include/AsyncImageLoader.hpp +++ b/include/AsyncImageLoader.hpp @@ -3,12 +3,12 @@ #include "../include/Storage.hpp" #include "../include/MessageQueue.hpp" #include "../include/FileAnalyzer.hpp" +#include "../include/AsyncTask.hpp" #include <SFML/System/Vector2.hpp> #include <SFML/Graphics/Texture.hpp> #include <SFML/System/Clock.hpp> #include <string> #include <memory> -#include <thread> #include <unordered_map> namespace QuickMedia { @@ -67,8 +67,8 @@ namespace QuickMedia { private: bool loading_image[NUM_IMAGE_LOAD_THREADS]; // TODO: Use curl single-threaded multi-download feature instead - std::thread download_image_thread[NUM_IMAGE_LOAD_THREADS]; - std::thread load_image_thread; + AsyncTask<void> download_image_thread[NUM_IMAGE_LOAD_THREADS]; + AsyncTask<void> load_image_thread; MessageQueue<ThumbnailLoadData> image_load_queue; std::unordered_map<std::string, std::shared_ptr<ThumbnailData>> thumbnails; size_t counter = 0; |