diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/playlist.cc | 39 | ||||
| -rw-r--r-- | src/lib/playlist.h | 9 |
2 files changed, 20 insertions, 28 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index df7c95cc0..80037b575 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -58,10 +58,26 @@ using namespace boost::placeholders; #endif -Playlist::Playlist () +class ContentSorter { +public: + bool operator()(shared_ptr<Content> a, shared_ptr<Content> b) + { + if (a->position() != b->position()) { + return a->position() < b->position(); + } -} + /* Put video before audio if they start at the same time */ + if (a->video && !b->video) { + return true; + } else if (!a->video && b->video) { + return false; + } + + /* Last resort */ + return a->digest() < b->digest(); + } +}; Playlist::~Playlist () @@ -542,25 +558,6 @@ Playlist::set_sequence (bool s) } -bool -ContentSorter::operator() (shared_ptr<Content> a, shared_ptr<Content> b) -{ - if (a->position() != b->position()) { - return a->position() < b->position(); - } - - /* Put video before audio if they start at the same time */ - if (a->video && !b->video) { - return true; - } else if (!a->video && b->video) { - return false; - } - - /* Last resort */ - return a->digest() < b->digest(); -} - - /** @return content in ascending order of position */ ContentList Playlist::content () const diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 2d68d3f39..e2662eb45 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -36,12 +36,6 @@ class Film; -struct ContentSorter -{ - bool operator() (std::shared_ptr<Content> a, std::shared_ptr<Content> b); -}; - - /** @class Playlist * @brief A set of Content objects with knowledge of how they should be arranged into * a DCP. @@ -49,7 +43,8 @@ struct ContentSorter class Playlist { public: - Playlist (); + Playlist() = default; + ~Playlist (); Playlist (Playlist const&) = delete; |
