X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=ccca46bc02fbedd91e79b6665f6d7858736cb788;hb=86214f4619476b1a4951e15f002a93743b5f7a1e;hp=e3ad42560edf82ef0e1870003f46eaa04c5cbfad;hpb=5d65df7ebdc96c658a6b7042e639cb395f91bfeb;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index e3ad42560..ccca46bc0 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -24,10 +24,17 @@ #include "util.h" #include "content_factory.h" #include "ui_signaller.h" +#include "exceptions.h" +#include "film.h" + +#include "i18n.h" using std::string; using std::stringstream; using std::set; +using std::list; +using std::cout; +using std::vector; using boost::shared_ptr; using boost::lexical_cast; @@ -37,6 +44,16 @@ int const ContentProperty::LENGTH = 402; int const ContentProperty::TRIM_START = 403; int const ContentProperty::TRIM_END = 404; +Content::Content (shared_ptr f) + : _film (f) + , _position (0) + , _trim_start (0) + , _trim_end (0) + , _change_signals_frequent (false) +{ + +} + Content::Content (shared_ptr f, Time p) : _film (f) , _position (p) @@ -49,32 +66,58 @@ Content::Content (shared_ptr f, Time p) Content::Content (shared_ptr f, boost::filesystem::path p) : _film (f) - , _path (p) , _position (0) , _trim_start (0) , _trim_end (0) , _change_signals_frequent (false) { - + _paths.push_back (p); } Content::Content (shared_ptr f, shared_ptr node) : _film (f) , _change_signals_frequent (false) { - _path = node->string_child ("Path"); + list path_children = node->node_children ("Path"); + for (list::const_iterator i = path_children.begin(); i != path_children.end(); ++i) { + _paths.push_back ((*i)->content ()); + } _digest = node->string_child ("Digest"); _position = node->number_child