diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-05-09 19:58:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 19f94521139aac13ef8fb4eaa55855b2ada307b4 (patch) | |
| tree | 6e4b457c1fa46c674433fb1a5d2a9cd0f07c5a11 /src/lib/subtitle_content.cc | |
| parent | 0a2d40420813403a96352c6dc895d23fcd9994c0 (diff) | |
Move video frame rate ('prepared-for') into Content.
Diffstat (limited to 'src/lib/subtitle_content.cc')
| -rw-r--r-- | src/lib/subtitle_content.cc | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/lib/subtitle_content.cc b/src/lib/subtitle_content.cc index 2066793fb..228376c34 100644 --- a/src/lib/subtitle_content.cc +++ b/src/lib/subtitle_content.cc @@ -47,10 +47,9 @@ int const SubtitleContentProperty::USE = 504; int const SubtitleContentProperty::BURN = 505; int const SubtitleContentProperty::LANGUAGE = 506; int const SubtitleContentProperty::FONTS = 507; -int const SubtitleContentProperty::VIDEO_FRAME_RATE = 508; -int const SubtitleContentProperty::COLOUR = 509; -int const SubtitleContentProperty::OUTLINE = 510; -int const SubtitleContentProperty::OUTLINE_COLOUR = 511; +int const SubtitleContentProperty::COLOUR = 508; +int const SubtitleContentProperty::OUTLINE = 509; +int const SubtitleContentProperty::OUTLINE_COLOUR = 510; SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film) : ContentPart (parent, film) @@ -86,7 +85,6 @@ SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film, node->optional_number_child<int>("OutlineGreen").get_value_or(255), node->optional_number_child<int>("OutlineBlue").get_value_or(255) ) - , _frame_rate (node->optional_number_child<double>("SubtitleFrameRate")) { if (version >= 32) { _use = node->bool_child ("UseSubtitles"); @@ -316,27 +314,3 @@ SubtitleContent::set_language (string language) { maybe_set (_language, language, SubtitleContentProperty::LANGUAGE); } - -void -SubtitleContent::set_video_frame_rate (double r) -{ - maybe_set (_frame_rate, r, SubtitleContentProperty::VIDEO_FRAME_RATE); -} - -double -SubtitleContent::video_frame_rate () const -{ - { - boost::mutex::scoped_lock lm (_mutex); - if (_frame_rate) { - return _frame_rate.get (); - } - } - - /* No frame rate specified, so assume this content has been - prepared for any concurrent video content. - */ - shared_ptr<const Film> film = _film.lock (); - DCPOMATIC_ASSERT (film); - return film->active_frame_rate_change(_parent->position()).source; -} |
