/*
- 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
_timer.Bind (wxEVT_TIMER, boost::bind(&SimpleVideoView::timer, this));
}
+
void
SimpleVideoView::paint ()
{
_state_timer.unset();
}
+
void
SimpleVideoView::refresh_panel ()
{
_state_timer.unset ();
}
+
void
SimpleVideoView::timer ()
{
}
}
+
void
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).
return SUCCESS;
}
+
void
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");