try
{
/* XXX_b: check all calls and signal emissions in this method & protect them if necessary */
- {
- boost::mutex::scoped_lock lm (_context_mutex);
- _context = new wxGLContext (_canvas);
- _canvas->SetCurrent (*_context);
- }
+ _context = new wxGLContext (_canvas);
+ _canvas->SetCurrent (*_context);
std::cout << "Here we go " << video_frame_rate() << " " << to_string(length()) << "\n";
dcpomatic_sleep_milliseconds (time_until_next_frame());
}
- {
- boost::mutex::scoped_lock lm (_context_mutex);
- delete _context;
- }
+ delete _context;
}
catch (boost::thread_interrupted& e)
{
return;
}
-wxGLContext *
-GLVideoView::context () const
-{
- boost::mutex::scoped_lock lm (_context_mutex);
- return _context;
-}
-
bool
GLVideoView::display_next_frame (bool non_blocking)
{
void paint ();
void draw ();
void thread ();
- wxGLContext* context () const;
wxGLCanvas* _canvas;
-
wxGLContext* _context;
- mutable boost::mutex _context_mutex;
GLuint _id;
boost::optional<dcp::Size> _size;