return pieces;
}
+
+Time
+SubRip::length () const
+{
+ boost::mutex::scoped_lock lm (_mutex);
+ if (_subtitles.empty ()) {
+ return 0;
+ }
+
+ return _subtitles.back().to;
+}
public:
SubRip (boost::shared_ptr<SubRipContent>);
+ Time length () const;
+
private:
friend class subrip_time_test;
friend class subrip_coordinate_test;
}
void
-SubRipContent::examine (boost::shared_ptr<Job>)
+SubRipContent::examine (boost::shared_ptr<Job> job)
{
-
+ Content::examine (job);
+ SubRip s (shared_from_this ());
+ boost::mutex::scoped_lock lm (_mutex);
+ _length = s.length ();
}
string
Time
SubRipContent::full_length () const
{
-
+ /* XXX: this assumes that the timing of the SubRip file is appropriate
+ for the DCP's frame rate.
+ */
+ return _length;
}
string