/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include "job.h"
#include "audio_point.h"
#include "types.h"
+#include "dcpomatic_time.h"
class AudioBuffers;
class AudioAnalysis;
class AnalyseAudioJob : public Job
{
public:
- AnalyseAudioJob (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist>);
+ AnalyseAudioJob (boost::shared_ptr<const Film>, boost::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>);
+ void analyse (boost::shared_ptr<const AudioBuffers>, DCPTime time);
boost::shared_ptr<const Playlist> _playlist;
+ /** playlist's audio analysis path when the job was created */
+ boost::filesystem::path _path;
+ DCPTime _start;
+ bool _from_zero;
int64_t _done;
int64_t _samples_per_point;
AudioPoint* _current;
- float _sample_peak;
- Frame _sample_peak_frame;
+ float* _sample_peak;
+ Frame* _sample_peak_frame;
boost::shared_ptr<AudioAnalysis> _analysis;