diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-06 01:07:21 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-08 01:29:35 +0200 |
| commit | 3617ae6e58623bd259d71b66928dc1ed74a5c822 (patch) | |
| tree | dcc182de525790732ce9027ee0683bd42bee6414 /src/lib | |
| parent | 1473b29c1ad13024baebf9e8a63024f6484610e8 (diff) | |
Add Film::reels_for_type().
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/film.cc | 11 | ||||
| -rw-r--r-- | src/lib/film.h | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 5d13713fb..f0af131ea 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -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. */ diff --git a/src/lib/film.h b/src/lib/film.h index f12d97f12..2699daa4e 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -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; |
