summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-10 12:51:04 +0100
committerCarl Hetherington <cth@carlh.net>2026-03-10 12:51:04 +0100
commit106446156b74a9f69f3f05724d2051704d166dfc (patch)
tree79c954712cb84da4b2b385e13f0d14c98e138f35 /src
parent514f4ca9dd4c559123593df57c1f729176591c44 (diff)
Rename one_shot stuff to better reflect what it actually does.
Diffstat (limited to 'src')
-rw-r--r--src/wx/gl_video_view.cc16
-rw-r--r--src/wx/gl_video_view.h4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 773d4e1ed..67d508100 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -74,7 +74,7 @@ GLVideoView::GLVideoView(FilmViewer* viewer, wxWindow *parent, bool wake)
, _rec2020(false)
, _vsync_enabled(false)
, _playing(false)
- , _one_shot(false)
+ , _request_set_image_and_draw(false)
{
wxGLAttributes attributes;
/* We don't need a depth buffer, and indeed there is apparently a bug with Windows/Intel HD 630
@@ -161,7 +161,7 @@ GLVideoView::update()
_thread = boost::thread(boost::bind(&GLVideoView::thread, this));
}
- request_one_shot();
+ request_set_image_and_draw();
rethrow();
}
@@ -934,15 +934,15 @@ try
while (true) {
boost::mutex::scoped_lock lm(_playing_mutex);
- while (!_playing && !_one_shot) {
+ while (!_playing && !_request_set_image_and_draw) {
_thread_work_condition.wait(lm);
}
lm.unlock();
if (_playing) {
thread_playing();
- } else if (_one_shot) {
- _one_shot = false;
+ } else if (_request_set_image_and_draw) {
+ _request_set_image_and_draw = false;
set_image_and_draw();
}
@@ -964,16 +964,16 @@ VideoView::NextFrameResult
GLVideoView::display_next_frame(bool non_blocking)
{
NextFrameResult const r = get_next_frame(non_blocking);
- request_one_shot();
+ request_set_image_and_draw();
return r;
}
void
-GLVideoView::request_one_shot()
+GLVideoView::request_set_image_and_draw()
{
boost::mutex::scoped_lock lm(_playing_mutex);
- _one_shot = true;
+ _request_set_image_and_draw = true;
_thread_work_condition.notify_all();
}
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h
index dde9e65d4..e78d449b2 100644
--- a/src/wx/gl_video_view.h
+++ b/src/wx/gl_video_view.h
@@ -99,7 +99,7 @@ private:
void draw();
void thread();
void thread_playing();
- void request_one_shot();
+ void request_set_image_and_draw();
void check_for_butler_errors();
void ensure_context();
void size_changed(wxSizeEvent const &);
@@ -150,7 +150,7 @@ private:
boost::mutex _playing_mutex;
boost::condition _thread_work_condition;
boost::atomic<bool> _playing;
- boost::atomic<bool> _one_shot;
+ boost::atomic<bool> _request_set_image_and_draw;
GLuint _vao;
dcpomatic::gl::Uniform1i _fragment_type;