/* This frame already has J2K data, so just write it */
_writer->write (pv->j2k(), position, pv->eyes ());
frame_done ();
- } else if (_last_player_video[static_cast<int>(pv->eyes())] && _writer->can_repeat(position) && pv->same (_last_player_video[static_cast<int>(pv->eyes())])) {
+ } else if (_last_player_video[pv->eyes()] && _writer->can_repeat(position) && pv->same(_last_player_video[pv->eyes()])) {
LOG_DEBUG_ENCODE("Frame @ %1 REPEAT", to_string(time));
_writer->repeat (position, pv->eyes ());
} else {
_empty_condition.notify_all ();
}
- _last_player_video[static_cast<int>(pv->eyes())] = pv;
+ _last_player_video[pv->eyes()] = pv;
_last_player_video_time = time;
}
#include "cross.h"
+#include "enum_indexed_vector.h"
#include "event_history.h"
#include "exception_store.h"
#include "util.h"
std::shared_ptr<Writer> _writer;
Waker _waker;
- std::shared_ptr<PlayerVideo> _last_player_video[static_cast<int>(Eyes::COUNT)];
+ EnumIndexedVector<std::shared_ptr<PlayerVideo>, Eyes> _last_player_video;
boost::optional<dcpomatic::DCPTime> _last_player_video_time;
boost::signals2::scoped_connection _server_found_connection;