2 Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <boost/shared_ptr.hpp>
21 #include <boost/weak_ptr.hpp>
22 #include <boost/optional.hpp>
23 #include <libdcp/util.h>
35 Subtitle (boost::shared_ptr<const Film>, libdcp::Size, boost::weak_ptr<Piece>, boost::shared_ptr<Image>, dcpomatic::Rect<double>, Time, Time);
37 void update (boost::shared_ptr<const Film>, libdcp::Size);
38 void set_stop (Time t) {
43 bool covers (Time t) const;
44 bool ends_before (Time t) const {
48 boost::shared_ptr<Image> out_image () const {
52 Position<int> out_position () const {
59 boost::weak_ptr<Piece> _piece;
60 boost::shared_ptr<Image> _in_image;
61 dcpomatic::Rect<double> _in_rect;
65 boost::shared_ptr<Image> _out_image;
66 Position<int> _out_position;
70 /** Time at which this subtitle should stop (overriding _out_to) */
71 boost::optional<Time> _stop;