summaryrefslogtreecommitdiff
path: root/src/lib/subrip_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-12 22:55:02 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-12 22:55:02 +0000
commitc943bc82e8d585d85ca1b4832e258436fa7615ce (patch)
tree395b66bf9560dc4e4e20ab7219c005f5078bf4cb /src/lib/subrip_content.cc
parent7e2cf1a4a04828b5a57d5eb6869475a819005602 (diff)
Some work on SubRip content length.
Diffstat (limited to 'src/lib/subrip_content.cc')
-rw-r--r--src/lib/subrip_content.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/subrip_content.cc b/src/lib/subrip_content.cc
index 79a1d4999..74bba33ba 100644
--- a/src/lib/subrip_content.cc
+++ b/src/lib/subrip_content.cc
@@ -41,9 +41,12 @@ SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml
}
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
@@ -75,7 +78,10 @@ SubRipContent::as_xml (xmlpp::Node* node)
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