diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-11-17 18:13:36 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-01-08 21:56:47 +0100 |
| commit | 046d84f45621f7e128cb30160a315f98881c6f4b (patch) | |
| tree | b93ced9155c89f1562550bfb49b900018a51c7ca /src/wx/gl_video_view.h | |
| parent | 805487369e57e5eb57911805ba6de78b653d79ad (diff) | |
A little thread safety.
Diffstat (limited to 'src/wx/gl_video_view.h')
| -rw-r--r-- | src/wx/gl_video_view.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h index 4ad4b1283..cf42432a9 100644 --- a/src/wx/gl_video_view.h +++ b/src/wx/gl_video_view.h @@ -19,6 +19,7 @@ */ #include "video_view.h" +#include "lib/signaller.h" #include <wx/wx.h> #include <wx/glcanvas.h> #include <dcp/util.h> @@ -39,6 +40,7 @@ public: } void update (); void start (); + void stop (); bool display_next_frame (bool); @@ -51,6 +53,9 @@ private: void draw (); void thread (); wxGLContext* context () const; + bool one_shot () const; + void set_one_shot (bool s); + dcpomatic::DCPTime one_video_frame () const; wxGLCanvas* _canvas; @@ -61,5 +66,6 @@ private: boost::optional<dcp::Size> _size; bool _vsync_enabled; boost::thread* _thread; + mutable boost::mutex _one_shot_mutex; bool _one_shot; }; |
