X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=21e49a2c955ae7e74091ec5c1a43f4e9e238b857;hb=f90d74f7a0382f0dc63eef81bd553d7a7b38edb2;hp=d835a5b0573fd263c6e46f0be4073d830bccde06;hpb=af3e8ed8382cdc35e361cdca1f735a379fce1317;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index d835a5b05..21e49a2c9 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,32 @@ */ +/** @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 "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 +60,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 +80,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) { @@ -83,9 +89,9 @@ Content::Content (shared_ptr f, shared_ptr node) _paths.push_back ((*i)->content ()); } _digest = node->string_child ("Digest"); - _position = node->number_child