X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_examiner.cc;h=8e15a9d4836b8aee38c2eb0c3893587c8eb1be02;hb=c423bc90054e13eea2fc16bae9b6d30afdd361be;hp=6ad32f511e1971ddd8d24123e4bdf0ba2bcfe696;hpb=4a4725e41bf4070969223f9c40885063c50e61d0;p=dcpomatic.git diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc index 6ad32f511..8e15a9d48 100644 --- a/src/lib/image_examiner.cc +++ b/src/lib/image_examiner.cc @@ -24,8 +24,10 @@ #include "exceptions.h" #include "config.h" #include "cross.h" +#include "compose.hpp" #include #include +#include #include #include @@ -68,7 +70,7 @@ ImageExaminer::ImageExaminer (shared_ptr film, shared_ptrstill ()) { - _video_length = Config::instance()->default_still_length() * video_frame_rate().get_value_or (24); + _video_length = Config::instance()->default_still_length() * video_frame_rate().get_value_or (film->video_frame_rate ()); } else { _video_length = _image_content->number_of_paths (); } @@ -83,6 +85,21 @@ ImageExaminer::video_size () const optional ImageExaminer::video_frame_rate () const { + if (_image_content->video->has_own_frame_rate()) { + /* The content already knows what frame rate it should be */ + return _image_content->video->frame_rate(); + } + /* Don't know */ return optional (); } + +bool +ImageExaminer::yuv () const +{ + /* We never convert ImageSource from YUV to RGB (though maybe sometimes we should) + so it makes sense to just say they are never YUV so the option of a conversion + to RGB is not offered. + */ + return false; +}