-
- /** @return Pieces of content type C that overlap a specified time range in the DCP */
- template<class C>
- std::list<boost::shared_ptr<Piece> >
- overlaps (DCPTime from, DCPTime to)
- {
- if (!_have_valid_pieces) {
- setup_pieces ();
- }
-
- std::list<boost::shared_ptr<Piece> > overlaps;
- for (typename std::list<boost::shared_ptr<Piece> >::const_iterator i = _pieces.begin(); i != _pieces.end(); ++i) {
- if (!boost::dynamic_pointer_cast<C> ((*i)->content)) {
- continue;
- }
-
- if ((*i)->content->position() <= to && (*i)->content->end() >= from) {
- overlaps.push_back (*i);
- }
- }
-
- return overlaps;
- }
+ std::list<boost::shared_ptr<Piece> > overlaps (DCPTime from, DCPTime to, boost::function<bool (Content *)> valid);
+ void video (boost::weak_ptr<Piece>, ContentVideo);
+ void audio (boost::weak_ptr<Piece>, ContentAudio);
+ void image_subtitle (boost::weak_ptr<Piece>, ContentImageSubtitle);
+ void text_subtitle (boost::weak_ptr<Piece>, ContentTextSubtitle);