summaryrefslogtreecommitdiff
path: root/src/wx/simple_video_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-15 23:36:21 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-27 13:41:46 +0200
commit3799e91d126d243d41c44dcb0ca1bfa66b53a57e (patch)
tree74348b18d5ac0ef81bbebb27fe32862b22baa0b2 /src/wx/simple_video_view.cc
parent9bfa07293928c371d59db2091ba2b7e715ce5994 (diff)
Replace aligned bool with enum Alignment.
Diffstat (limited to 'src/wx/simple_video_view.cc')
-rw-r--r--src/wx/simple_video_view.cc22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc
index 5dd47ce4c..e54c8390e 100644
--- a/src/wx/simple_video_view.cc
+++ b/src/wx/simple_video_view.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2019-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -18,21 +18,23 @@
*/
-#include "simple_video_view.h"
+
+#include "closed_captions_dialog.h"
#include "film_viewer.h"
+#include "simple_video_view.h"
#include "wx_util.h"
-#include "closed_captions_dialog.h"
-#include "lib/image.h"
-#include "lib/dcpomatic_log.h"
#include "lib/butler.h"
+#include "lib/dcpomatic_log.h"
+#include "lib/image.h"
#include <dcp/util.h>
#include <wx/wx.h>
#include <boost/bind/bind.hpp>
+
using std::max;
+using std::shared_ptr;
using std::string;
using boost::optional;
-using std::shared_ptr;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
@@ -57,6 +59,7 @@ SimpleVideoView::SimpleVideoView (FilmViewer* viewer, wxWindow* parent)
_timer.Bind (wxEVT_TIMER, boost::bind(&SimpleVideoView::timer, this));
}
+
void
SimpleVideoView::paint ()
{
@@ -113,6 +116,7 @@ SimpleVideoView::paint ()
_state_timer.unset();
}
+
void
SimpleVideoView::refresh_panel ()
{
@@ -122,6 +126,7 @@ SimpleVideoView::refresh_panel ()
_state_timer.unset ();
}
+
void
SimpleVideoView::timer ()
{
@@ -145,6 +150,7 @@ SimpleVideoView::timer ()
}
}
+
void
SimpleVideoView::start ()
{
@@ -152,6 +158,7 @@ SimpleVideoView::start ()
timer ();
}
+
/** Try to get a frame from the butler and display it.
* @param non_blocking true to return false quickly if no video is available quickly (i.e. we are waiting for the butler).
* false to ask the butler to block until it has video (unless it is suspended).
@@ -176,6 +183,7 @@ SimpleVideoView::display_next_frame (bool non_blocking)
return SUCCESS;
}
+
void
SimpleVideoView::update ()
{
@@ -214,7 +222,7 @@ SimpleVideoView::update ()
_state_timer.set ("get image");
set_image (
- player_video().first->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, false, true)
+ player_video().first->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::COMPACT, true)
);
_state_timer.set ("ImageChanged");