X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=ec16b961015ee19a8eb6d1b487e297879adf53e5;hb=51cc8f575b55f2a21d8503965b628c0f59f1ed33;hp=8294682475a65b30ceb6717f5eea37b1dff33fba;hpb=816b3c2dda2c5e33900f5d90a001284045040b5f;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index 829468247..ec16b9610 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,26 +17,33 @@ */ +/** @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 "safe_stringstream.h" +#include "job.h" #include "i18n.h" using std::string; -using std::stringstream; using std::set; using std::list; using std::cout; using std::vector; +using std::max; using boost::shared_ptr; -using boost::lexical_cast; +using dcp::raw_convert; int const ContentProperty::PATH = 400; int const ContentProperty::POSITION = 401; @@ -54,7 +61,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) @@ -74,7 +81,7 @@ Content::Content (shared_ptr f, boost::filesystem::path p) _paths.push_back (p); } -Content::Content (shared_ptr f, shared_ptr node) +Content::Content (shared_ptr f, cxml::ConstNodePtr node) : _film (f) , _change_signals_frequent (false) { @@ -82,10 +89,10 @@ Content::Content (shared_ptr f, shared_ptr node) 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