#include "subrip_content.h"
#include "util.h"
+#include "subrip.h"
#include "i18n.h"
SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int version)
: Content (film, node)
- , SubtitleContent (film, node)
+ , SubtitleContent (film, node, version)
{
}
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
SubtitleContent::as_xml (node);
}
-Time
+DCPTime
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
stringstream s;
s << Content::identifier()
<< "_" << subtitle_scale()
- << "_" << subtitle_offset();
+ << "_" << subtitle_x_offset()
+ << "_" << subtitle_y_offset();
return s.str ();
}
-