Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / lib / image_decoder.cc
index e06f6023d54a8d35b1203f81eef72e823ab9ed0d..8aa3f6a99c2eba0369d3ee6b254e703dab0189e4 100644 (file)
 using std::cout;
 using boost::shared_ptr;
 using dcp::Size;
+using namespace dcpomatic;
 
-ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c, shared_ptr<Log> log)
-       : _image_content (c)
+ImageDecoder::ImageDecoder (shared_ptr<const Film> film, shared_ptr<const ImageContent> c)
+       : Decoder (film)
+       , _image_content (c)
        , _frame_video_position (0)
 {
-       video.reset (new VideoDecoder (this, c, log));
+       video.reset (new VideoDecoder (this, c));
 }
 
 bool
@@ -71,7 +73,7 @@ ImageDecoder::pass ()
                }
        }
 
-       video->emit (_image, _frame_video_position);
+       video->emit (film(), _image, _frame_video_position);
        ++_frame_video_position;
        return false;
 }
@@ -80,5 +82,5 @@ void
 ImageDecoder::seek (ContentTime time, bool accurate)
 {
        Decoder::seek (time, accurate);
-       _frame_video_position = time.frames_round (_image_content->active_video_frame_rate ());
+       _frame_video_position = time.frames_round (_image_content->active_video_frame_rate(film()));
 }