/*
- Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
-#include "overlaps.h"
-#include "types.h"
+
#include "content.h"
+#include "overlaps.h"
+
-using std::shared_ptr;
using std::function;
+using std::shared_ptr;
using namespace dcpomatic;
+
ContentList overlaps (shared_ptr<const Film> film, ContentList cl, function<bool (shared_ptr<const Content>)> part, DCPTime from, DCPTime to)
{
ContentList overlaps;
DCPTimePeriod period (from, to);
for (auto i: cl) {
- if (part(i) && DCPTimePeriod(i->position(), i->end(film)).overlap(period)) {
+ if (part(i) && i->period(film).overlap(period)) {
overlaps.push_back (i);
}
}