Fix the build for older macOS.
[dcpomatic.git] / src / lib / analyse_audio_job.h
index 5d6c091bcfbf3b835c68bdd771f3247c2bca6140..864a6a7cd738442d8bd119418f7a6a866947ce28 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.
 
 
 */
 
+
 /** @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;
@@ -34,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.
@@ -44,7 +51,7 @@ class Filter;
 class AnalyseAudioJob : public Job
 {
 public:
-       AnalyseAudioJob (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist>, bool from_zero);
+       AnalyseAudioJob (std::shared_ptr<const Film>, std::shared_ptr<const Playlist>, bool from_zero);
        ~AnalyseAudioJob ();
 
        std::string name () const;
@@ -56,25 +63,11 @@ public:
        }
 
 private:
-       void analyse (boost::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime time);
+       AudioAnalyser _analyser;
 
-       boost::shared_ptr<const Playlist> _playlist;
+       std::shared_ptr<const Playlist> _playlist;
        /** playlist's audio analysis path when the job was created */
        boost::filesystem::path _path;
-       dcpomatic::DCPTime _start;
-       bool _from_zero;
-
-       int64_t _done;
-       int64_t _samples_per_point;
-       AudioPoint* _current;
-
-       float* _sample_peak;
-       Frame* _sample_peak_frame;
-
-       boost::shared_ptr<AudioAnalysis> _analysis;
-
-       boost::shared_ptr<AudioFilterGraph> _ebur128;
-       std::vector<Filter const *> _filters;
 
        static const int _num_points;
 };