Split playlist files up; fix build.
[dcpomatic.git] / src / lib / video_decoder.cc
index 33dd433eac8e1a6d3484a6ca6be954924727850b..47385cc614c8c1387e756b254edbb85f6c78b333 100644 (file)
@@ -29,7 +29,7 @@
 using boost::shared_ptr;
 using boost::optional;
 
-VideoDecoder::VideoDecoder (shared_ptr<const Film> f, shared_ptr<VideoContent> c)
+VideoDecoder::VideoDecoder (shared_ptr<const Film> f)
        : Decoder (f)
        , _video_frame (0)
        , _last_source_time (0)
@@ -54,6 +54,12 @@ VideoDecoder::emit_video (shared_ptr<Image> image, double t)
        _last_source_time = t;
 }
 
+bool
+VideoDecoder::have_last_video () const
+{
+       return _last_image;
+}
+
 /** Called by subclasses to repeat the last video frame that we
  *  passed to emit_video().  If emit_video hasn't yet been called,
  *  we will generate a black frame.
@@ -106,10 +112,7 @@ VideoDecoder::set_progress (Job* j) const
 {
        assert (j);
 
-#if 0
-       XXX
-       if (_film->length()) {
-               j->set_progress (float (_video_frame) / _film->length().get());
+       if (_film->video_length()) {
+               j->set_progress (float (_video_frame) / _film->video_length());
        }
-#endif 
 }