X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fwx%2Fgl_video_view.h;h=84d97c751f859bf3f24a7e08fffa9b5a1f9cae54;hb=9834d1033dc5cf23b185a3ef14a2ecb673af157e;hp=42a3f89ba8236ae6b88407c876fd9b53a094d310;hpb=ec1df37a1940063dc0dbc45ad2dab638bdc92c0d;p=dcpomatic.git diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h index 42a3f89ba..84d97c751 100644 --- a/src/wx/gl_video_view.h +++ b/src/wx/gl_video_view.h @@ -19,11 +19,14 @@ */ #include "video_view.h" +#include "lib/signaller.h" +#include "lib/position.h" #include #include #include #include - +#include +#include #undef None #undef Success @@ -38,13 +41,39 @@ public: return _canvas; } void update (); + void start (); + void stop (); + + bool display_next_frame (bool); + + bool vsync_enabled () const { + return _vsync_enabled; + } private: - void paint (); - void draw (); + void draw (Position inter_position, dcp::Size inter_size); + void thread (); + void request_one_shot (); + void create (); + void check_for_butler_errors (); + /* Mutex for use of _canvas; it's only contended when our ::thread + is started up so this may be overkill. + */ + boost::mutex _canvas_mutex; wxGLCanvas* _canvas; - wxGLContext* _context; - GLuint _id; - boost::optional _size; + wxGLContext* _context; + + GLuint _id; + boost::optional _size; + bool _have_storage; + bool _vsync_enabled; + boost::thread _thread; + + boost::mutex _playing_mutex; + boost::condition _playing_condition; + bool _playing; + bool _one_shot; + + boost::shared_ptr _timer; };