X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplaylist.cc;h=b7b4c20f7fc56b6dc232be8a773360bab0bcee83;hb=a79d78d8bb6d51f6662f1f63b9f8fd19e1a0c5f1;hp=9fc62f8be6e5345a1bebecca6d3cd9293e6712a2;hpb=e0c59417c6a52dbd853114fbc0f88c6d8c1dd276;p=dcpomatic.git diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index 9fc62f8be..b7b4c20f7 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -81,14 +81,14 @@ Playlist::maybe_sequence_video () _sequencing_video = true; ContentList cl = _content; - DCPTime next = 0; + DCPTime next; for (ContentList::iterator i = _content.begin(); i != _content.end(); ++i) { if (!dynamic_pointer_cast (*i)) { continue; } (*i)->set_position (next); - next = (*i)->end() + 1; + next = (*i)->end() + DCPTime::delta (); } /* This won't change order, so it does not need a sort */ @@ -257,9 +257,9 @@ Playlist::best_dcp_frame_rate () const DCPTime Playlist::length () const { - DCPTime len = 0; + DCPTime len; for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { - len = max (len, (*i)->end() + 1); + len = max (len, (*i)->end() + DCPTime::delta ()); } return len; @@ -282,7 +282,7 @@ Playlist::reconnect () DCPTime Playlist::video_end () const { - DCPTime end = 0; + DCPTime end; for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { if (dynamic_pointer_cast (*i)) { end = max (end, (*i)->end ()); @@ -331,7 +331,7 @@ Playlist::content () const void Playlist::repeat (ContentList c, int n) { - pair range (TIME_MAX, 0); + pair range (DCPTime::max (), DCPTime ()); for (ContentList::iterator i = c.begin(); i != c.end(); ++i) { range.first = min (range.first, (*i)->position ()); range.second = max (range.second, (*i)->position ()); @@ -406,15 +406,3 @@ Playlist::move_later (shared_ptr c) Changed (); } - -bool -Playlist::content_paths_valid () const -{ - for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) { - if (!(*i)->path_valid ()) { - return false; - } - } - - return true; -}