Make some verb tenses more consistent.
[dcpomatic.git] / src / lib / player.cc
index 283a641d9ac178fabd890f23e710e00b4d878614..ae16290f57d7343297bde3e3a5ed9c307991f3be 100644 (file)
@@ -60,8 +60,6 @@
 
 #include "i18n.h"
 
-#define LOG_GENERAL(...) dcpomatic_log->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
-
 using std::list;
 using std::cout;
 using std::min;
@@ -156,7 +154,7 @@ Player::setup_pieces_unlocked ()
                }
 
                shared_ptr<Decoder> decoder = decoder_factory (_film, i, _fast);
-               FrameRateChange frc (i->active_video_frame_rate(_film), _film->video_frame_rate());
+               FrameRateChange frc (_film, i);
 
                if (!decoder) {
                        /* Not something that we can decode; e.g. Atmos content */
@@ -480,7 +478,7 @@ Player::get_reel_assets ()
 
                scoped_ptr<DCPDecoder> decoder;
                try {
-                       decoder.reset (new DCPDecoder (j, false));
+                       decoder.reset (new DCPDecoder (_film, j, false));
                } catch (...) {
                        return a;
                }
@@ -570,7 +568,7 @@ Player::pass ()
                        continue;
                }
 
-               DCPTime const t = content_time_to_dcp (i, max(i->decoder->position(_film), i->content->trim_start()));
+               DCPTime const t = content_time_to_dcp (i, max(i->decoder->position(), i->content->trim_start()));
                if (t > i->content->end(_film)) {
                        i->done = true;
                } else {
@@ -610,7 +608,7 @@ Player::pass ()
 
        switch (which) {
        case CONTENT:
-               earliest_content->done = earliest_content->decoder->pass (_film);
+               earliest_content->done = earliest_content->decoder->pass ();
                break;
        case BLACK:
                emit_video (black_player_video_frame(EYES_BOTH), _black.position());
@@ -735,7 +733,7 @@ Player::video (weak_ptr<Piece> wp, ContentVideo video)
                return;
        }
 
-       FrameRateChange frc(piece->content->active_video_frame_rate(_film), _film->video_frame_rate());
+       FrameRateChange frc (_film, piece->content);
        if (frc.skip && (video.frame % 2) == 1) {
                return;
        }
@@ -1024,11 +1022,11 @@ Player::seek (DCPTime time, bool accurate)
        BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
                if (time < i->content->position()) {
                        /* Before; seek to the start of the content */
-                       i->decoder->seek (_film, dcp_to_content_time (i, i->content->position()), accurate);
+                       i->decoder->seek (dcp_to_content_time (i, i->content->position()), accurate);
                        i->done = false;
                } else if (i->content->position() <= time && time < i->content->end(_film)) {
                        /* During; seek to position */
-                       i->decoder->seek (_film, dcp_to_content_time (i, time), accurate);
+                       i->decoder->seek (dcp_to_content_time (i, time), accurate);
                        i->done = false;
                } else {
                        /* After; this piece is done */