Updated cs_CZ translation from Tomáš Begeni.
[dcpomatic.git] / src / lib / analyse_audio_job.h
index 8f88b0fa143d42c88d68f678c809a5c906fe1f9a..afd52c3040688c00f48ce215f0e2d48fe8acef35 100644 (file)
 
 */
 
+
 /** @file  src/lib/analyse_audio_job.h
  *  @brief AnalyseAudioJob class.
  */
 
-#include "job.h"
+
+#include "audio_analyser.h"
 #include "audio_point.h"
-#include "types.h"
 #include "dcpomatic_time.h"
+#include "job.h"
 #include <leqm_nrt.h>
 #include <boost/scoped_ptr.hpp>
 
+
 class AudioBuffers;
 class AudioAnalysis;
 class Playlist;
@@ -36,6 +39,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.
@@ -46,39 +50,27 @@ 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 whole_film);
        ~AnalyseAudioJob ();
 
-       std::string name () const;
-       std::string json_name () const;
-       void run ();
+       std::string name () const override;
+       std::string json_name () const override;
+       void run () override;
+       bool enable_notify () const override {
+               return true;
+       }
 
        boost::filesystem::path path () const {
                return _path;
        }
 
 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;
-
-       Frame _done;
-       Frame _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;
-
-       boost::scoped_ptr<leqm_nrt::Calculator> _leqm;
+       bool _whole_film;
 
        static const int _num_points;
 };