X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fcontent.cc;h=d2a07f79523f0e052b649a0d64425af9941b62d7;hb=19dc3455d7112427e0470e58133d25bcb031e9f1;hp=49c579fb618dac4a3672b3568263f8b1b91b6232;hpb=d5085584d82c021e924cec6ce00e682a8e63d800;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index 49c579fb6..d2a07f795 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -22,18 +22,24 @@ #include #include "content.h" #include "util.h" +#include "content_factory.h" +#include "ui_signaller.h" using std::string; using std::set; using boost::shared_ptr; using boost::lexical_cast; -int const ContentProperty::START = 400; +int const ContentProperty::POSITION = 400; int const ContentProperty::LENGTH = 401; +int const ContentProperty::TRIM_START = 402; +int const ContentProperty::TRIM_END = 403; -Content::Content (shared_ptr f, Time s) +Content::Content (shared_ptr f, Time p) : _film (f) - , _start (s) + , _position (p) + , _trim_start (0) + , _trim_end (0) , _change_signals_frequent (false) { @@ -41,8 +47,10 @@ Content::Content (shared_ptr f, Time s) Content::Content (shared_ptr f, boost::filesystem::path p) : _film (f) - , _file (p) - , _start (0) + , _path (p) + , _position (0) + , _trim_start (0) + , _trim_end (0) , _change_signals_frequent (false) { @@ -52,52 +60,117 @@ Content::Content (shared_ptr f, shared_ptr node) : _film (f) , _change_signals_frequent (false) { - _file = node->string_child ("File"); + _path = node->string_child ("Path"); _digest = node->string_child ("Digest"); - _start = node->number_child