Move luminance to Interop/SMPTE metadata and remove the ISDCF metadata dialogue.
[dcpomatic.git] / src / lib / video_mxf_decoder.cc
index 3c4002ca2b6d9acbbe20079627ebd5f3f39f0c94..6e194a6dfe5488c00f134b4b388479ff9518356e 100644 (file)
 #include "video_decoder.h"
 #include "video_mxf_content.h"
 #include "j2k_image_proxy.h"
+#include "frame_interval_checker.h"
 #include <dcp/mono_picture_asset.h>
 #include <dcp/mono_picture_asset_reader.h>
 #include <dcp/stereo_picture_asset.h>
 #include <dcp/stereo_picture_asset_reader.h>
 #include <dcp/exceptions.h>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::optional;
+using namespace dcpomatic;
 
 VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const VideoMXFContent> content)
        : Decoder (film)
@@ -42,7 +44,7 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const
                mono.reset (new dcp::MonoPictureAsset (_content->path(0)));
        } catch (dcp::MXFFileError& e) {
                /* maybe it's stereo */
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
                /* maybe it's stereo */
        }
 
@@ -53,7 +55,7 @@ VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const
                if (!mono) {
                        throw;
                }
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
                if (!mono) {
                        throw;
                }
@@ -74,7 +76,6 @@ VideoMXFDecoder::pass ()
        double const vfr = _content->active_video_frame_rate (film());
        int64_t const frame = _next.frames_round (vfr);
 
-
        if (frame >= _content->video->length()) {
                return true;
        }
@@ -91,14 +92,14 @@ VideoMXFDecoder::pass ()
                video->emit (
                        film(),
                        shared_ptr<ImageProxy> (
-                               new J2KImageProxy (_stereo_reader->get_frame(frame), _size, dcp::EYE_LEFT, AV_PIX_FMT_XYZ12LE, optional<int>())
+                               new J2KImageProxy (_stereo_reader->get_frame(frame), _size, dcp::Eye::LEFT, AV_PIX_FMT_XYZ12LE, optional<int>())
                                ),
                        frame
                        );
                video->emit (
                        film(),
                        shared_ptr<ImageProxy> (
-                               new J2KImageProxy (_stereo_reader->get_frame(frame), _size, dcp::EYE_RIGHT, AV_PIX_FMT_XYZ12LE, optional<int>())
+                               new J2KImageProxy (_stereo_reader->get_frame(frame), _size, dcp::Eye::RIGHT, AV_PIX_FMT_XYZ12LE, optional<int>())
                                ),
                        frame
                        );