#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"
/** @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 ());
(*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 ();
}
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;
-}