#include <sys/time.h>
-using std::pair;
using std::shared_ptr;
using boost::optional;
do {
Butler::Error e;
- auto pv = butler->get_video (!non_blocking, &e);
- if (e.code == Butler::Error::DIED) {
+ auto pv = butler->get_video (non_blocking ? Butler::Behaviour::NON_BLOCKING : Butler::Behaviour::BLOCKING, &e);
+ if (e.code == Butler::Error::Code::DIED) {
LOG_ERROR ("Butler died with %1", e.summary());
}
if (!pv.first) {
- return e.code == Butler::Error::AGAIN ? AGAIN : FAIL;
+ return e.code == Butler::Error::Code::AGAIN ? AGAIN : FAIL;
}
_player_video = pv;
} while (
{
if (length() == dcpomatic::DCPTime()) {
/* There's no content, so this doesn't matter */
- return optional<int>();
+ return {};
}
auto const next = position() + one_video_frame();
emit (boost::bind(boost::ref(TooManyDropped)));
}
}
+
+
+wxColour
+VideoView::pad_colour () const
+{
+ if (_viewer->pad_black()) {
+ return wxColour(0, 0, 0);
+ } else if (gui_is_dark()) {
+ return wxColour(50, 50, 50);
+ } else {
+ return wxColour(240, 240, 240);
+ }
+}