X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_decoder.cc;h=e06f6023d54a8d35b1203f81eef72e823ab9ed0d;hb=72b11d5eb036651b6ff68edf3ed270e8fc52960f;hp=7270c97829acf218abd0318b53e9e6f21855d869;hpb=24e890682b3f2aa211277ad8b6b3591f2026d4be;p=dcpomatic.git diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc index 7270c9782..e06f6023d 100644 --- a/src/lib/image_decoder.cc +++ b/src/lib/image_decoder.cc @@ -22,12 +22,11 @@ #include "image_decoder.h" #include "video_decoder.h" #include "image.h" -#include "magick_image_proxy.h" +#include "ffmpeg_image_proxy.h" #include "j2k_image_proxy.h" #include "film.h" #include "exceptions.h" #include "video_content.h" -#include #include #include @@ -45,7 +44,7 @@ ImageDecoder::ImageDecoder (shared_ptr c, shared_ptr lo } bool -ImageDecoder::pass (PassReason, bool) +ImageDecoder::pass () { if (_frame_video_position >= _image_content->video->length()) { return true; @@ -68,12 +67,11 @@ ImageDecoder::pass (PassReason, bool) */ _image.reset (new J2KImageProxy (path, _image_content->video->size(), pf)); } else { - _image.reset (new MagickImageProxy (path)); + _image.reset (new FFmpegImageProxy (path)); } } - _video_position = ContentTime::from_frames (_frame_video_position, _image_content->active_video_frame_rate ()); - video->give (_image, _frame_video_position); + video->emit (_image, _frame_video_position); ++_frame_video_position; return false; } @@ -81,6 +79,6 @@ ImageDecoder::pass (PassReason, bool) void ImageDecoder::seek (ContentTime time, bool accurate) { - video->seek (time, accurate); + Decoder::seek (time, accurate); _frame_video_position = time.frames_round (_image_content->active_video_frame_rate ()); }