Fix the build for older macOS.
[dcpomatic.git] / src / lib / analyse_audio_job.h
index ce86e62cf0c9741663dca3e56f41f4b0e171d0d0..864a6a7cd738442d8bd119418f7a6a866947ce28 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 /** @file  src/lib/analyse_audio_job.h
  *  @brief AnalyseAudioJob class.
  */
 
+
+#include "audio_analyser.h"
 #include "job.h"
 #include "audio_point.h"
 #include "types.h"
+#include "dcpomatic_time.h"
+#include <leqm_nrt.h>
+#include <boost/scoped_ptr.hpp>
+
 
 class AudioBuffers;
 class AudioAnalysis;
@@ -33,6 +40,7 @@ class AudioPoint;
 class AudioFilterGraph;
 class Filter;
 
+
 /** @class AnalyseAudioJob
  *  @brief A job to analyse the audio of a film and make a note of its
  *  broad peak and RMS levels.
@@ -43,33 +51,23 @@ class Filter;
 class AnalyseAudioJob : public Job
 {
 public:
-       AnalyseAudioJob (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist>);
+       AnalyseAudioJob (std::shared_ptr<const Film>, std::shared_ptr<const Playlist>, bool from_zero);
        ~AnalyseAudioJob ();
 
        std::string name () const;
        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>);
-
-       boost::shared_ptr<const Playlist> _playlist;
-
-       int64_t _done;
-       int64_t _samples_per_point;
-       AudioPoint* _current;
-
-       float _sample_peak;
-       Frame _sample_peak_frame;
-
-       boost::shared_ptr<AudioAnalysis> _analysis;
+       AudioAnalyser _analyser;
 
-       boost::shared_ptr<AudioFilterGraph> _ebur128;
-       std::vector<Filter const *> _filters;
+       std::shared_ptr<const Playlist> _playlist;
+       /** playlist's audio analysis path when the job was created */
+       boost::filesystem::path _path;
 
        static const int _num_points;
 };