From 3617ae6e58623bd259d71b66928dc1ed74a5c822 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 6 May 2025 01:07:21 +0200 Subject: Add Film::reels_for_type(). --- src/lib/film.cc | 11 +++++++++-- src/lib/film.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/lib') 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 -Film::reels() const +Film::reels_for_type(ReelType type) const { vector 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 +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 reels_for_type(ReelType type) const; /** Log to write to */ std::shared_ptr _log; -- cgit v1.2.3