Don't flush audio if Player is not supposed to be playing it.
[dcpomatic.git] / src / lib / playlist.cc
index fc06ea9b959ce934cff7cdbcbe37787773435acb..daa82cb94a56e305dc3420424f15e2d7a4f1cf41 100644 (file)
@@ -26,8 +26,7 @@
 #include "video_content.h"
 #include "ffmpeg_decoder.h"
 #include "ffmpeg_content.h"
-#include "still_image_decoder.h"
-#include "still_image_content.h"
+#include "image_decoder.h"
 #include "content_factory.h"
 #include "job.h"
 #include "config.h"
@@ -114,11 +113,11 @@ Playlist::video_identifier () const
 
 /** @param node <Playlist> node */
 void
-Playlist::set_from_xml (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node)
+Playlist::set_from_xml (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int version)
 {
        list<cxml::NodePtr> c = node->node_children ("Content");
        for (list<cxml::NodePtr>::iterator i = c.begin(); i != c.end(); ++i) {
-               _content.push_back (content_factory (film, *i));
+               _content.push_back (content_factory (film, *i, version));
        }
 
        sort (_content.begin(), _content.end(), ContentSorter ());
@@ -360,10 +359,6 @@ Playlist::move_earlier (shared_ptr<Content> c)
        (*previous)->set_position (p + c->length_after_trim ());
        c->set_position (p);
        sort (_content.begin(), _content.end(), ContentSorter ());
-
-       for (i = _content.begin(); i != _content.end(); ++i) {
-               cout << (*i)->position() << " " << (*i)->path() << "\n";
-       }
        
        Changed ();
 }
@@ -394,15 +389,3 @@ Playlist::move_later (shared_ptr<Content> 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;
-}