2 Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
4 This file is part of libdcp.
6 libdcp is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 libdcp is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with libdcp. If not, see <http://www.gnu.org/licenses/>.
26 #include <boost/shared_ptr.hpp>
27 #include <boost/function.hpp>
42 class ReelPictureAsset;
44 class ReelSubtitleAsset;
48 /** @brief A reel within a DCP; the part which actually refers to picture, sound and subtitle data */
49 class Reel : public Object
55 boost::shared_ptr<ReelPictureAsset> picture,
56 boost::shared_ptr<ReelSoundAsset> sound = boost::shared_ptr<ReelSoundAsset> (),
57 boost::shared_ptr<ReelSubtitleAsset> subtitle = boost::shared_ptr<ReelSubtitleAsset> (),
58 boost::shared_ptr<ReelAtmosAsset> atmos = boost::shared_ptr<ReelAtmosAsset> ()
60 : _main_picture (picture)
62 , _main_subtitle (subtitle)
66 explicit Reel (boost::shared_ptr<const cxml::Node>);
68 boost::shared_ptr<ReelPictureAsset> main_picture () const {
72 boost::shared_ptr<ReelSoundAsset> main_sound () const {
76 boost::shared_ptr<ReelSubtitleAsset> main_subtitle () const {
77 return _main_subtitle;
80 boost::shared_ptr<ReelAtmosAsset> atmos () const {
84 int64_t duration () const;
86 void add (boost::shared_ptr<ReelAsset> asset);
88 void write_to_cpl (xmlpp::Element* node, Standard standard) const;
90 bool encrypted () const;
92 bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler notes) const;
94 void add (DecryptedKDM const &);
96 void resolve_refs (std::list<boost::shared_ptr<Asset> >);
99 boost::shared_ptr<ReelPictureAsset> _main_picture;
100 boost::shared_ptr<ReelSoundAsset> _main_sound;
101 boost::shared_ptr<ReelSubtitleAsset> _main_subtitle;
102 boost::shared_ptr<ReelAtmosAsset> _atmos;