X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=a41261998671d3083f54c3fd5c921ddeba7de89e;hb=cadf2d574d144098fffa3c61e0a2be88f496cac6;hp=0db93d5e358622a33f4aa73127e2e30ff7b5331d;hpb=38fda7888663429d452b9c71902e8bb5239dd720;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index 0db93d5e3..a41261998 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -26,16 +26,22 @@ #include "ui_signaller.h" using std::string; +using std::stringstream; using std::set; using boost::shared_ptr; using boost::lexical_cast; -int const ContentProperty::START = 400; -int const ContentProperty::LENGTH = 401; +int const ContentProperty::PATH = 400; +int const ContentProperty::POSITION = 401; +int const ContentProperty::LENGTH = 402; +int const ContentProperty::TRIM_START = 403; +int const ContentProperty::TRIM_END = 404; -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) { @@ -43,8 +49,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) { @@ -54,25 +62,40 @@ 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