#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 ()
}
-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
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.
class Playlist
{
public:
- Playlist ();
+ Playlist() = default;
+
~Playlist ();
Playlist (Playlist const&) = delete;