X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=c4836cfa89a643c1838bc94ef302a99c661d9418;hb=308488324dbc4d8b709d3fb1dc9fee0479346c21;hp=a565edb527c7339096c6accd932289e806e87c45;hpb=ef4cd174472dc1c4694d4451dc60b9292c60666b;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index a565edb52..c4836cfa8 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,20 +17,31 @@ */ +/** @file src/lib/content.cc + * @brief Content class. + */ + #include #include #include +#include #include "content.h" #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; +using dcp::raw_convert; int const ContentProperty::PATH = 400; int const ContentProperty::POSITION = 401; @@ -48,7 +59,7 @@ Content::Content (shared_ptr f) } -Content::Content (shared_ptr f, Time p) +Content::Content (shared_ptr f, DCPTime p) : _film (f) , _position (p) , _trim_start (0) @@ -72,38 +83,60 @@ Content::Content (shared_ptr f, shared_ptr node) : _film (f) , _change_signals_frequent (false) { - _paths.push_back (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