diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-12 22:10:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 6f344b876689a1234a5eb75041882f06f5d9fe5c (patch) | |
| tree | 3a51f17cab8b8f31b21661b643aaed6a53326031 /src/lib/image_decoder.cc | |
| parent | 36774ee2b48f0bfde43b743592e5816ff58bb7d2 (diff) | |
Reasonably straightforward stuff; main things are adding
a _parent to VideoContent (mainly, but not only, for signalling)
and moving the video shared_ptr into Content, which makes much
more sense to replace dynamic_cast tests for whether something
has video or whatever. Nearly builds.
Diffstat (limited to 'src/lib/image_decoder.cc')
| -rw-r--r-- | src/lib/image_decoder.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc index 2291daecd..e26574f61 100644 --- a/src/lib/image_decoder.cc +++ b/src/lib/image_decoder.cc @@ -34,8 +34,8 @@ using std::cout; using boost::shared_ptr; using dcp::Size; -ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c) - : VideoDecoder (c) +ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c, shared_ptr<Log> log) + : VideoDecoder (c->video, log) , _image_content (c) , _video_position (0) { @@ -45,7 +45,7 @@ ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c) bool ImageDecoder::pass (PassReason, bool) { - if (_video_position >= _image_content->video_length()) { + if (_video_position >= _image_content->video->video_length()) { return true; } @@ -56,7 +56,7 @@ ImageDecoder::pass (PassReason, bool) /* We can't extract image size from a JPEG2000 codestream without decoding it, so pass in the image content's size here. */ - _image.reset (new J2KImageProxy (path, _image_content->video_size ())); + _image.reset (new J2KImageProxy (path, _image_content->video->video_size ())); } else { _image.reset (new MagickImageProxy (path)); } @@ -71,5 +71,5 @@ void ImageDecoder::seek (ContentTime time, bool accurate) { VideoDecoder::seek (time, accurate); - _video_position = time.frames_round (_image_content->video_frame_rate ()); + _video_position = time.frames_round (_image_content->video->video_frame_rate ()); } |
