X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=724cabb6c6ce28f4bf1d5057e08dc062ab07b525;hb=be511f16fa59cb97d0f671546de2055baea1cabf;hp=c8f836d18d5dc8edcc8920f7d75963aa9d54d282;hpb=68808da4a0f8c60ac93cd0bbc3ea776d16503a6a;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index c8f836d18..724cabb6c 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,19 +17,33 @@ */ -#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 "compose.hpp" +#include "raw_convert.h" +#include +#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 boost::lexical_cast; int const ContentProperty::PATH = 400; int const ContentProperty::POSITION = 401; @@ -37,8 +51,18 @@ int const ContentProperty::LENGTH = 402; int const ContentProperty::TRIM_START = 403; int const ContentProperty::TRIM_END = 404; -Content::Content (shared_ptr f, Time p) - : _film (f) +Content::Content (shared_ptr film) + : _film (film) + , _position (0) + , _trim_start (0) + , _trim_end (0) + , _change_signals_frequent (false) +{ + +} + +Content::Content (shared_ptr film, DCPTime p) + : _film (film) , _position (p) , _trim_start (0) , _trim_end (0) @@ -47,8 +71,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) @@ -57,42 +81,72 @@ 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) { - _paths.push_back (node->string_child ("Path")); - _digest = node->string_child ("Digest"); - _position = node->number_child