Fix DCP playback when an incorrect KDM is added, followed by
[dcpomatic.git] / src / lib / analyse_audio_job.h
index d8dcda2f19c43b8d18b22a53cb5ce81c96d70e4c..f7cc3e2567ffa39dd82205f3a48d664c119efd24 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -26,6 +26,8 @@
 #include "audio_point.h"
 #include "types.h"
 #include "dcpomatic_time.h"
+#include <leqm_nrt.h>
+#include <boost/scoped_ptr.hpp>
 
 class AudioBuffers;
 class AudioAnalysis;
@@ -51,15 +53,17 @@ public:
        std::string json_name () const;
        void run ();
 
-       boost::shared_ptr<const Playlist> playlist () const {
-               return _playlist;
+       boost::filesystem::path path () const {
+               return _path;
        }
 
 private:
-       void analyse (boost::shared_ptr<const AudioBuffers>, DCPTime time);
+       void analyse (boost::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime time);
 
        boost::shared_ptr<const Playlist> _playlist;
-       DCPTime _start;
+       /** playlist's audio analysis path when the job was created */
+       boost::filesystem::path _path;
+       dcpomatic::DCPTime _start;
        bool _from_zero;
 
        int64_t _done;
@@ -74,5 +78,7 @@ private:
        boost::shared_ptr<AudioFilterGraph> _ebur128;
        std::vector<Filter const *> _filters;
 
+       boost::scoped_ptr<leqm_nrt::Calculator> _leqm;
+
        static const int _num_points;
 };