2 Copyright (C) 2014-2016 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.
24 class TextSubtitleContentProperty
27 static int const TEXT_SUBTITLE_COLOUR;
28 static int const TEXT_SUBTITLE_OUTLINE;
29 static int const TEXT_SUBTITLE_OUTLINE_COLOUR;
32 /** @class TextSubtitleContent
33 * @brief SubRip or SSA subtitles.
35 class TextSubtitleContent : public Content
38 TextSubtitleContent (boost::shared_ptr<const Film>, boost::filesystem::path);
39 TextSubtitleContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
41 boost::shared_ptr<TextSubtitleContent> shared_from_this () {
42 return boost::dynamic_pointer_cast<TextSubtitleContent> (Content::shared_from_this ());
46 void examine (boost::shared_ptr<Job>);
47 std::string summary () const;
48 std::string technical_summary () const;
49 void as_xml (xmlpp::Node *) const;
50 DCPTime full_length () const;
54 bool has_text_subtitles () const {
58 bool has_image_subtitles () const {
62 double subtitle_video_frame_rate () const;
63 void set_subtitle_video_frame_rate (double r);
65 void set_colour (dcp::Colour);
67 dcp::Colour colour () const {
68 boost::mutex::scoped_lock lm (_mutex);
72 void set_outline (bool);
74 bool outline () const {
75 boost::mutex::scoped_lock lm (_mutex);
79 void set_outline_colour (dcp::Colour);
81 dcp::Colour outline_colour () const {
82 boost::mutex::scoped_lock lm (_mutex);
83 return _outline_colour;
86 static std::string const font_id;
90 /** Video frame rate that this content has been prepared for, if known */
91 boost::optional<double> _frame_rate;
94 dcp::Colour _outline_colour;