X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fgl_video_view.h;h=4ad4b1283abd042a849bf52f7fa600002aa9c9e4;hp=54c64e4eae7c80c7ce31e441535a16a10ea0cca5;hb=805487369e57e5eb57911805ba6de78b653d79ad;hpb=e153d7f5dc128d97160e41bdda3c4e4a05c7140b diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h index 54c64e4ea..4ad4b1283 100644 --- a/src/wx/gl_video_view.h +++ b/src/wx/gl_video_view.h @@ -23,14 +23,14 @@ #include #include #include - +#include #undef None #undef Success class GLVideoView : public VideoView { public: - GLVideoView (wxWindow* parent); + GLVideoView (FilmViewer* viewer, wxWindow* parent); ~GLVideoView (); void set_image (boost::shared_ptr image); @@ -38,13 +38,28 @@ public: return _canvas; } void update (); + void start (); + + bool display_next_frame (bool); + + bool vsync_enabled () const { + return _vsync_enabled; + } private: - void paint (); - void draw (); + void paint (); + void draw (); + void thread (); + wxGLContext* context () const; wxGLCanvas* _canvas; - wxGLContext* _context; - GLuint _id; - boost::optional _size; + + wxGLContext* _context; + mutable boost::mutex _context_mutex; + + GLuint _id; + boost::optional _size; + bool _vsync_enabled; + boost::thread* _thread; + bool _one_shot; };