X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=d2a07f79523f0e052b649a0d64425af9941b62d7;hb=406ddd165456ad769b4109535530d408a4221077;hp=c12a8a16655d309cf23cd4880eec7e9a5ffb8310;hpb=ebd495da2fe5be8c07cf7fb52e8283bb7f4113c1;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index c12a8a166..d2a07f795 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -1,5 +1,3 @@ -/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */ - /* Copyright (C) 2013 Carl Hetherington @@ -24,79 +22,155 @@ #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) { } 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) { } 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