diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-17 01:49:10 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-17 01:49:10 +0000 |
| commit | 27a6832bb66ff9b9cebf4cbd1abcd374bad48c8c (patch) | |
| tree | a8e9041ce4a2130fe6f6cf21a0dd9e19bd3bc97c /src/lib | |
| parent | 0a63f7e9dd20f804a625b7f4fcbaa0cedc4619df (diff) | |
Update for libsub1 API changes.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/subrip.cc | 2 | ||||
| -rw-r--r-- | src/lib/subrip_decoder.cc | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/subrip.cc b/src/lib/subrip.cc index d622235eb..f19867952 100644 --- a/src/lib/subrip.cc +++ b/src/lib/subrip.cc @@ -47,5 +47,5 @@ SubRip::length () const return ContentTime (); } - return ContentTime::from_seconds (_subtitles.back().to.metric().get().all_as_seconds ()); + return ContentTime::from_seconds (_subtitles.back().to.all_as_seconds ()); } diff --git a/src/lib/subrip_decoder.cc b/src/lib/subrip_decoder.cc index 22f7b6ba4..694b22157 100644 --- a/src/lib/subrip_decoder.cc +++ b/src/lib/subrip_decoder.cc @@ -42,7 +42,7 @@ SubRipDecoder::seek (ContentTime time, bool accurate) SubtitleDecoder::seek (time, accurate); _next = 0; - while (_next < _subtitles.size() && ContentTime::from_seconds (_subtitles[_next].from.metric().get().all_as_seconds ()) < time) { + while (_next < _subtitles.size() && ContentTime::from_seconds (_subtitles[_next].from.all_as_seconds ()) < time) { ++_next; } } @@ -65,8 +65,8 @@ SubRipDecoder::pass () j->italic, dcp::Colour (255, 255, 255), j->font_size.points (72 * 11), - dcp::Time (rint (_subtitles[_next].from.metric().get().all_as_seconds())), - dcp::Time (rint (_subtitles[_next].to.metric().get().all_as_seconds())), + dcp::Time (rint (_subtitles[_next].from.all_as_seconds())), + dcp::Time (rint (_subtitles[_next].to.all_as_seconds())), i->vertical_position.line.get() * (1.5 / 22) + 0.8, dcp::TOP, j->text, @@ -94,8 +94,8 @@ SubRipDecoder::subtitles_during (ContentTimePeriod p, bool starting) const for (vector<sub::Subtitle>::const_iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) { ContentTimePeriod t ( - ContentTime::from_seconds (i->from.metric().get().all_as_seconds()), - ContentTime::from_seconds (i->to.metric().get().all_as_seconds()) + ContentTime::from_seconds (i->from.all_as_seconds()), + ContentTime::from_seconds (i->to.all_as_seconds()) ); if ((starting && p.contains (t.from)) || (!starting && p.overlaps (t))) { |
