2 * Copyright (C) 2008-2012 Sakari Bergen <sakari.bergen@beatwaves.net>
3 * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2008 Nick Mainsbridge <mainsbridge@gmail.com>
5 * Copyright (C) 2009-2012 David Robillard <d@drobilla.net>
6 * Copyright (C) 2016-2019 Robin Gareus <robin@gareus.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __ardour_export_status_h__
24 #define __ardour_export_status_h__
28 #include "ardour/libardour_visibility.h"
29 #include "ardour/export_analysis.h"
30 #include "ardour/types.h"
32 #include "pbd/signals.h"
37 class LIBARDOUR_API ExportStatus {
46 void abort (bool error_occurred = false);
47 bool aborted () const { return _aborted; }
48 bool errors () const { return _errors; }
49 bool running () const { return _running; }
51 void set_running (bool r) {
52 assert (!_run_lock.trylock()); // must hold lock
55 Glib::Threads::Mutex& lock () { return _run_lock; }
57 PBD::Signal1<void,TransportRequestSource> Finished;
58 void finish (TransportRequestSource);
64 volatile enum Progress {
73 volatile uint32_t total_timespans;
74 volatile uint32_t timespan;
75 std::string timespan_name;
77 volatile samplecnt_t total_samples;
78 volatile samplecnt_t processed_samples;
80 volatile samplecnt_t total_samples_current_timespan;
81 volatile samplecnt_t processed_samples_current_timespan;
83 volatile uint32_t total_postprocessing_cycles;
84 volatile uint32_t current_postprocessing_cycle;
86 AnalysisResults result_map;
89 volatile bool _aborted;
90 volatile bool _errors;
91 volatile bool _running;
93 Glib::Threads::Mutex _run_lock;
98 #endif /* __ardour_export_status_h__ */