Add Piece::pass().
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Apr 2021 23:02:39 +0000 (01:02 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 7 May 2021 07:29:59 +0000 (09:29 +0200)
src/lib/piece.cc
src/lib/piece.h
src/lib/player.cc

index c1034a6fe5c8b9a71c76a08ad1943b910cdd2dba..0dad2517830209863d65c553d53d5331036870c1 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "audio_content.h"
 #include "content.h"
+#include "dcpomatic_log.h"
 #include "decoder.h"
 #include "film.h"
 #include "piece.h"
@@ -191,3 +192,11 @@ Piece::decoder_position () const
        return content_time_to_dcp(std::max(decoder->position(), content->trim_start()));
 }
 
+
+void
+Piece::pass ()
+{
+       LOG_DEBUG_PLAYER ("Calling pass() on %1", content->path(0));
+       done = decoder->pass();
+}
+
index f78a4f5527160fb829eb50b8a345bae5c5f70ab7..7379a5c3f76091fb24cdb7a02e7145323b49ebfa 100644 (file)
@@ -49,6 +49,8 @@ public:
        dcpomatic::ContentTime dcp_to_content_time (dcpomatic::DCPTime t, std::shared_ptr<const Film> film) const;
        dcpomatic::DCPTime content_time_to_dcp (dcpomatic::ContentTime t) const;
 
+       void pass ();
+
        bool use_video () const;
        VideoFrameType video_frame_type () const;
 
index ae36984e832d17dfc87e1d7768e64a7c27347094..c9526411cf26c3c08c892afb355eb5c0c4d13639 100644 (file)
@@ -626,8 +626,7 @@ Player::pass ()
        switch (which) {
        case CONTENT:
        {
-               LOG_DEBUG_PLAYER ("Calling pass() on %1", earliest_content->content->path(0));
-               earliest_content->done = earliest_content->decoder->pass ();
+               earliest_content->pass();
                auto dcp = dynamic_pointer_cast<DCPContent>(earliest_content->content);
                if (dcp && !_play_referenced && dcp->reference_audio()) {
                        /* We are skipping some referenced DCP audio content, so we need to update _last_audio_time