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)
{
bool
ImageDecoder::pass (PassReason, bool)
{
- if (_video_position >= _image_content->video_length()) {
+ if (_video_position >= _image_content->video->video_length()) {
return true;
}
/* 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));
}
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 ());
}