X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=f0d35186abde70627236c808658a4126f70aa1b0;hb=7ff262bc7a3e5ac16feab2fe7a0afbbe14c33896;hp=1ec607d394896b8ec0dbdc7ad1dbeacb7cfb7393;hpb=df085fc0ea4f1a3f009de5a7a5bf9f241173bcba;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index 1ec607d39..f0d35186a 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2015 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,27 +17,31 @@ */ -#include -#include -#include -#include +/** @file src/lib/content.cc + * @brief Content class. + */ + #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 "raw_convert.h" +#include +#include +#include #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 std::pair; using boost::shared_ptr; -using libdcp::raw_convert; int const ContentProperty::PATH = 400; int const ContentProperty::POSITION = 401; @@ -45,8 +49,8 @@ int const ContentProperty::LENGTH = 402; int const ContentProperty::TRIM_START = 403; int const ContentProperty::TRIM_END = 404; -Content::Content (shared_ptr f) - : _film (f) +Content::Content (shared_ptr film) + : _film (film) , _position (0) , _trim_start (0) , _trim_end (0) @@ -55,8 +59,8 @@ Content::Content (shared_ptr f) } -Content::Content (shared_ptr f, Time p) - : _film (f) +Content::Content (shared_ptr film, DCPTime p) + : _film (film) , _position (p) , _trim_start (0) , _trim_end (0) @@ -65,8 +69,8 @@ Content::Content (shared_ptr f, Time p) } -Content::Content (shared_ptr f, boost::filesystem::path p) - : _film (f) +Content::Content (shared_ptr film, boost::filesystem::path p) + : _film (film) , _position (0) , _trim_start (0) , _trim_end (0) @@ -75,33 +79,33 @@ Content::Content (shared_ptr f, boost::filesystem::path p) _paths.push_back (p); } -Content::Content (shared_ptr f, shared_ptr node) - : _film (f) +Content::Content (shared_ptr film, cxml::ConstNodePtr node) + : _film (film) , _change_signals_frequent (false) { 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