Add Film::reels_for_type().
authorCarl Hetherington <cth@carlh.net>
Mon, 5 May 2025 23:07:21 +0000 (01:07 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 7 May 2025 23:29:35 +0000 (01:29 +0200)
src/lib/film.cc
src/lib/film.h

index 5d13713fbda4ccad739511a24fff97d2c5d3973c..f0af131eade7ff28501f5ff564e9e850dc97c9a3 100644 (file)
@@ -1927,12 +1927,12 @@ Film::audio_analysis_finished()
 
 
 vector<DCPTimePeriod>
-Film::reels() const
+Film::reels_for_type(ReelType type) const
 {
        vector<DCPTimePeriod> periods;
        auto const len = length();
 
-       switch (reel_type()) {
+       switch (type) {
        case ReelType::SINGLE:
                periods.emplace_back(DCPTime(), len);
                break;
@@ -2004,6 +2004,13 @@ Film::reels() const
 }
 
 
+vector<DCPTimePeriod>
+Film::reels() const
+{
+       return reels_for_type(reel_type());
+}
+
+
 /** @param period A period within the DCP
  *  @return Name of the content which most contributes to the given period.
  */
index f12d97f12ef3bf1e7a3e6c286657b8ad18273393..2699daa4e37813243daecdefda0045d89aa7cb1b 100644 (file)
@@ -480,6 +480,7 @@ private:
        void set_dirty(bool dirty);
        void write_ui_state() const;
        void check_reel_boundaries_for_atmos();
+       std::vector<dcpomatic::DCPTimePeriod> reels_for_type(ReelType type) const;
 
        /** Log to write to */
        std::shared_ptr<Log> _log;