X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcontent.cc;h=40f74fe9aae75866aa146286541e5847ca6dcaaf;hb=4542d9e7c510ba91e1b9b056536a2bc4a18ecf32;hp=4cdb23e83e0662ec46c5c898df80068cc6d290a3;hpb=d39e59cbfff3b886af7a7d9c9c48f3f7f5928e43;p=dcpomatic.git diff --git a/src/lib/content.cc b/src/lib/content.cc index 4cdb23e83..40f74fe9a 100644 --- a/src/lib/content.cc +++ b/src/lib/content.cc @@ -1,53 +1,65 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + DCP-o-matic is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with DCP-o-matic. If not, see . */ -#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 "video_content.h" +#include "audio_content.h" +#include "subtitle_content.h" #include "exceptions.h" #include "film.h" +#include "job.h" +#include "compose.hpp" +#include +#include +#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 libdcp::raw_convert; +using dcp::raw_convert; +using dcp::locale_convert; 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; +int const ContentProperty::VIDEO_FRAME_RATE = 405; -Content::Content (shared_ptr f) - : _film (f) +Content::Content (shared_ptr film) + : _film (film) , _position (0) , _trim_start (0) , _trim_end (0) @@ -56,8 +68,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) @@ -66,8 +78,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) @@ -76,36 +88,49 @@ 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