diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-11-21 02:45:30 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-11-21 02:45:30 +0000 |
| commit | 84012cdd64f451891febd36154b7226ea21a899b (patch) | |
| tree | 096fb898aa14d936dfc8f8598a6908337508233c /src/lib/image_decoder.cc | |
| parent | 254b3044d72de6b033d7c584f5abd2b9aa70aad5 (diff) | |
Put Film pointer into Decoder.
Diffstat (limited to 'src/lib/image_decoder.cc')
| -rw-r--r-- | src/lib/image_decoder.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc index ce8843b0d..a9e473f25 100644 --- a/src/lib/image_decoder.cc +++ b/src/lib/image_decoder.cc @@ -36,15 +36,16 @@ using std::cout; using boost::shared_ptr; using dcp::Size; -ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c) - : _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)); } bool -ImageDecoder::pass (boost::shared_ptr<const Film> film) +ImageDecoder::pass () { if (_frame_video_position >= _image_content->video->length()) { return true; @@ -71,14 +72,15 @@ ImageDecoder::pass (boost::shared_ptr<const Film> film) } } - video->emit (film, _image, _frame_video_position); + video->emit (film(), _image, _frame_video_position); ++_frame_video_position; return false; } void -ImageDecoder::seek (shared_ptr<const Film> film, ContentTime time, bool accurate) +ImageDecoder::seek (ContentTime time, bool accurate) { - Decoder::seek (film, time, accurate); - _frame_video_position = time.frames_round (_image_content->active_video_frame_rate(film)); + Decoder::seek ( + time, accurate); + _frame_video_position = time.frames_round (_image_content->active_video_frame_rate(film())); } |
