2 Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
6 DCP-o-matic is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 DCP-o-matic is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
22 /** @file src/lib/analyse_audio_job.h
23 * @brief AnalyseAudioJob class.
27 #include "audio_analyser.h"
29 #include "audio_point.h"
31 #include "dcpomatic_time.h"
33 #include <boost/scoped_ptr.hpp>
40 class AudioFilterGraph;
44 /** @class AnalyseAudioJob
45 * @brief A job to analyse the audio of a film and make a note of its
46 * broad peak and RMS levels.
48 * After computing the peak and RMS levels the job will write a file
49 * to Film::audio_analysis_path.
51 class AnalyseAudioJob : public Job
54 AnalyseAudioJob (std::shared_ptr<const Film>, std::shared_ptr<const Playlist>, bool from_zero);
57 std::string name () const override;
58 std::string json_name () const override;
60 bool enable_notify () const override {
64 boost::filesystem::path path () const {
69 AudioAnalyser _analyser;
71 std::shared_ptr<const Playlist> _playlist;
72 /** playlist's audio analysis path when the job was created */
73 boost::filesystem::path _path;
75 static const int _num_points;