Merge branch '2.0' of ssh://main.carlh.net/home/carl/git/dcpomatic into 2.0
authorCarl Hetherington <cth@carlh.net>
Sat, 17 Jan 2015 01:49:17 +0000 (01:49 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 17 Jan 2015 01:49:17 +0000 (01:49 +0000)
src/lib/subrip.cc
src/lib/subrip_decoder.cc
src/lib/types.h

index d622235ebc6eaf1f198b8b4f04e8c1900aea938d..f1986795270c4cf2b8680cd4145035abaadf5aa8 100644 (file)
@@ -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 ());
 }
index 22f7b6ba4b27ac23fc1b94a4b53214b9e82bd8a8..694b2215725b2a17070256f2f28a3d3b404f905f 100644 (file)
@@ -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))) {
index c069944fe35a07fba6236d7f4787134adc6bb519..f554c4dd9ad1f72dc0094fb625eed35c116e0aad 100644 (file)
@@ -57,22 +57,6 @@ typedef std::vector<boost::shared_ptr<FFmpegContent> > FFmpegContentList;
 typedef int64_t VideoFrame;
 typedef int64_t AudioFrame;
 
-/* XXX -> DCPAudio */
-struct TimedAudioBuffers
-{
-       TimedAudioBuffers ()
-               : time (0)
-       {}
-       
-       TimedAudioBuffers (boost::shared_ptr<AudioBuffers> a, DCPTime t)
-               : audio (a)
-               , time (t)
-       {}
-       
-       boost::shared_ptr<AudioBuffers> audio;
-       DCPTime time;
-};
-
 enum VideoFrameType
 {
        VIDEO_FRAME_TYPE_2D,