2 Copyright (C) 2014-2015 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 "subtitle_content.h"
22 class SubRipContentProperty
25 static int const SUBTITLE_COLOUR;
26 static int const SUBTITLE_OUTLINE;
27 static int const SUBTITLE_OUTLINE_COLOUR;
31 class SubRipContent : public SubtitleContent
34 SubRipContent (boost::shared_ptr<const Film>, boost::filesystem::path);
35 SubRipContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
37 boost::shared_ptr<SubRipContent> shared_from_this () {
38 return boost::dynamic_pointer_cast<SubRipContent> (Content::shared_from_this ());
42 void examine (boost::shared_ptr<Job>);
43 std::string summary () const;
44 std::string technical_summary () const;
45 void as_xml (xmlpp::Node *) const;
46 DCPTime full_length () const;
50 bool has_text_subtitles () const {
54 bool has_image_subtitles () const {
58 double subtitle_video_frame_rate () const;
59 void set_subtitle_video_frame_rate (int r);
61 void set_colour (dcp::Colour);
63 dcp::Colour colour () const {
64 boost::mutex::scoped_lock lm (_mutex);
68 void set_outline (bool);
70 bool outline () const {
71 boost::mutex::scoped_lock lm (_mutex);
75 void set_outline_colour (dcp::Colour);
77 dcp::Colour outline_colour () const {
78 boost::mutex::scoped_lock lm (_mutex);
79 return _outline_colour;
82 static std::string const font_id;
86 /** Video frame rate that this content has been prepared for, if known */
87 boost::optional<double> _frame_rate;
90 dcp::Colour _outline_colour;