X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_decoder.cc;h=ecbbd5134adc7298ed2c48717151af4b25c0e66e;hb=0303a96b66eaf85060ce02d85cc36067f34b1051;hp=2f7416c62630eaf740e4039532d71fb87e9d6ea4;hpb=e52d9526f0a49acb72e8b4aa980399b119171ba5;p=dcpomatic.git diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc index 2f7416c62..ecbbd5134 100644 --- a/src/lib/image_decoder.cc +++ b/src/lib/image_decoder.cc @@ -18,35 +18,38 @@ */ + +#include "exceptions.h" +#include "ffmpeg_image_proxy.h" +#include "film.h" +#include "frame_interval_checker.h" +#include "image.h" #include "image_content.h" #include "image_decoder.h" -#include "video_decoder.h" -#include "image.h" -#include "ffmpeg_image_proxy.h" #include "j2k_image_proxy.h" -#include "film.h" -#include "exceptions.h" #include "video_content.h" -#include "frame_interval_checker.h" +#include "video_decoder.h" #include #include #include "i18n.h" + using std::cout; using std::make_shared; using std::shared_ptr; using dcp::Size; using namespace dcpomatic; + ImageDecoder::ImageDecoder (shared_ptr film, shared_ptr c) : Decoder (film) , _image_content (c) - , _frame_video_position (0) { video = make_shared(this, c); } + bool ImageDecoder::pass () { @@ -71,15 +74,16 @@ ImageDecoder::pass () */ _image = make_shared(path, _image_content->video->size(), pf); } else { - _image = make_shared(path, _image_content->video->range()); + _image = make_shared(path); } } - video->emit (film(), _image, _frame_video_position); + video->emit(film(), _image, dcpomatic::ContentTime::from_frames(_frame_video_position, _image_content->video_frame_rate().get_value_or(24))); ++_frame_video_position; return false; } + void ImageDecoder::seek (ContentTime time, bool accurate) {