diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-04 15:53:47 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-08-04 15:53:50 +0200 |
commit | 2a78b5b047a753874ca1e499f79d5f9fbb1699d5 (patch) | |
tree | 2aa693b3d6a6c0f54d5d2a9541d1d2579bac417c /include | |
parent | 62a29abd372a39a413e43a8f75146af823fe7bb3 (diff) |
Move video player to main thread (it's still processed in another thread), fix crash, fix scaling
Diffstat (limited to 'include')
-rw-r--r-- | include/VideoPlayer.hpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index 9fbad33..df08339 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -29,7 +29,7 @@ namespace QuickMedia { ~VideoPlayer(); void setPosition(float x, float y); - bool resize(const sf::Vector2i &size); + void resize(const sf::Vector2i &size); void draw(sf::RenderWindow &window); void load_file(const std::string &path); @@ -41,12 +41,9 @@ namespace QuickMedia { private: mpv_handle *mpv; mpv_opengl_cb_context *mpvGl; - std::thread renderThread; - std::mutex renderMutex; sf::Sprite sprite; sf::Texture texture; sf::Uint8 *textureBuffer; - bool alive; sf::Vector2i video_size; sf::Vector2i desired_size; sf::RectangleShape seekbar; |