projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up access to stuff from Film.
[dcpomatic.git]
/
src
/
wx
/
gl_video_view.h
diff --git
a/src/wx/gl_video_view.h
b/src/wx/gl_video_view.h
index cdc9fd530ae3045157cdcf003d19421355df145d..73db3535d2775c7fdc84b46482e7a1143948a4fd 100644
(file)
--- a/
src/wx/gl_video_view.h
+++ b/
src/wx/gl_video_view.h
@@
-19,30
+19,48
@@
*/
#include "video_view.h"
*/
#include "video_view.h"
+#include "lib/signaller.h"
#include <wx/wx.h>
#include <wx/glcanvas.h>
#include <dcp/util.h>
#include <boost/shared_ptr.hpp>
#include <wx/wx.h>
#include <wx/glcanvas.h>
#include <dcp/util.h>
#include <boost/shared_ptr.hpp>
-
+#include <boost/thread.hpp>
#undef None
#undef Success
class GLVideoView : public VideoView
{
public:
#undef None
#undef Success
class GLVideoView : public VideoView
{
public:
- GLVideoView (wxWindow* parent);
+ GLVideoView (
FilmViewer* viewer,
wxWindow* parent);
~GLVideoView ();
void set_image (boost::shared_ptr<const Image> image);
wxWindow* get () const {
return _canvas;
}
~GLVideoView ();
void set_image (boost::shared_ptr<const Image> image);
wxWindow* get () const {
return _canvas;
}
+ void update ();
+ void start ();
+ void stop ();
+
+ bool display_next_frame (bool);
+
+ bool vsync_enabled () const {
+ return _vsync_enabled;
+ }
private:
private:
- void paint (wxPaintEvent& event);
+ void paint ();
+ void draw ();
+ void thread ();
+ wxGLContext* context () const;
wxGLCanvas* _canvas;
wxGLCanvas* _canvas;
- wxGLContext* _context;
- GLuint _id;
- boost::optional<dcp::Size> _size;
+
+ wxGLContext* _context;
+ mutable boost::mutex _context_mutex;
+
+ GLuint _id;
+ boost::optional<dcp::Size> _size;
+ bool _vsync_enabled;
+ boost::thread* _thread;
};
};