Fix crash on emitting a signal during a constructor.
[dcpomatic.git] / src / lib / image_examiner.cc
index 376491738ef7b004fb2dd5d8dd37ef0c5bf9a96b..8e15a9d4836b8aee38c2eb0c3893587c8eb1be02 100644 (file)
@@ -27,6 +27,7 @@
 #include "compose.hpp"
 #include <dcp/openjpeg_image.h>
 #include <dcp/exceptions.h>
+#include <dcp/j2k.h>
 #include <Magick++.h>
 #include <iostream>
 
@@ -84,11 +85,21 @@ ImageExaminer::video_size () const
 optional<double>
 ImageExaminer::video_frame_rate () const
 {
-       if (_image_content->has_own_video_frame_rate()) {
+       if (_image_content->video->has_own_frame_rate()) {
                /* The content already knows what frame rate it should be */
-               return _image_content->video_frame_rate();
+               return _image_content->video->frame_rate();
        }
 
        /* Don't know */
        return optional<double> ();
 }
+
+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;
+}