diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-09-04 00:39:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-09-04 00:39:39 +0100 |
| commit | 1938b1b08d38fc199717d1875a61ef05e5b965de (patch) | |
| tree | 3734257f39ea97983c7dc49425ae6d51a596215c /src/lib/empty.cc | |
| parent | a45dd41c4dc7b95b1e3e79640e965ae663e7e680 (diff) | |
Build Empty objects from the presence or absence of decoders in
Pieces, rather than the presence or absence of content. This seems better
because of cases like encrypted DCPs without a a KDM: here we may have content
but no decoder.
Diffstat (limited to 'src/lib/empty.cc')
| -rw-r--r-- | src/lib/empty.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/empty.cc b/src/lib/empty.cc index 68a153b07..1e6e1c3fb 100644 --- a/src/lib/empty.cc +++ b/src/lib/empty.cc @@ -25,6 +25,7 @@ #include "content_part.h" #include "dcp_content.h" #include "dcpomatic_time_coalesce.h" +#include "piece.h" #include <boost/foreach.hpp> #include <iostream> @@ -34,12 +35,12 @@ using boost::shared_ptr; using boost::dynamic_pointer_cast; using boost::function; -Empty::Empty (ContentList content, DCPTime length, function<shared_ptr<ContentPart> (Content *)> part) +Empty::Empty (list<shared_ptr<Piece> > pieces, DCPTime length, function<bool (shared_ptr<Piece>)> part) { list<DCPTimePeriod> full; - BOOST_FOREACH (shared_ptr<Content> i, content) { - if (part (i.get())) { - full.push_back (DCPTimePeriod (i->position(), i->end())); + BOOST_FOREACH (shared_ptr<Piece> i, pieces) { + if (part(i)) { + full.push_back (DCPTimePeriod (i->content->position(), i->content->end())); } } |
