Replace aligned bool with enum Alignment.
[dcpomatic.git] / src / wx / simple_video_view.cc
index 5dd47ce4c2d545d8716a541b35156e733d00c606..e54c8390e78ea9cd56483c159c214c21a16d536d 100644 (file)
@@ -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.
 
 
 */
 
-#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");