annotate plugin/PluginScan.h @ 1247:8f076d02569a piper

Make SVDEBUG always write to a log file -- formerly this was disabled in NDEBUG builds. I think there's little use to that, it just means that we keep adding more cerr debug output because we aren't getting the log we need. And SVDEBUG logging is not usually used in tight loops, I don't think the performance overhead is too serious. Also update the About box.
author Chris Cannam
date Thu, 03 Nov 2016 14:57:00 +0000
parents 75aefcc9f07d
children d45a16c232bd
rev   line source
Chris@1178 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@1178 2
Chris@1178 3 /*
Chris@1178 4 Sonic Visualiser
Chris@1178 5 An audio file viewer and annotation editor.
Chris@1178 6 Centre for Digital Music, Queen Mary, University of London.
Chris@1178 7
Chris@1178 8 This program is free software; you can redistribute it and/or
Chris@1178 9 modify it under the terms of the GNU General Public License as
Chris@1178 10 published by the Free Software Foundation; either version 2 of the
Chris@1178 11 License, or (at your option) any later version. See the file
Chris@1178 12 COPYING included with this distribution for more information.
Chris@1178 13 */
Chris@1178 14
Chris@1178 15 #ifndef PLUGIN_SCAN_H
Chris@1178 16 #define PLUGIN_SCAN_H
Chris@1178 17
Chris@1178 18 #include <QStringList>
Chris@1246 19 #include <QMutex>
Chris@1241 20 #include <vector>
Chris@1246 21 #include <map>
Chris@1178 22
Chris@1180 23 class KnownPlugins;
Chris@1178 24
Chris@1180 25 class PluginScan
Chris@1178 26 {
Chris@1178 27 public:
Chris@1178 28 static PluginScan *getInstance();
Chris@1178 29
Chris@1241 30 void scan();
Chris@1179 31
Chris@1179 32 bool scanSucceeded() const;
Chris@1178 33
Chris@1180 34 enum PluginType {
Chris@1180 35 VampPlugin,
Chris@1180 36 LADSPAPlugin,
Chris@1180 37 DSSIPlugin
Chris@1180 38 };
Chris@1246 39 struct Candidate {
Chris@1246 40 QString libraryPath;
Chris@1246 41 QString helperTag;
Chris@1246 42 };
Chris@1246 43 QList<Candidate> getCandidateLibrariesFor(PluginType) const;
Chris@1178 44
Chris@1178 45 QString getStartupFailureReport() const;
Chris@1178 46
Chris@1178 47 private:
Chris@1178 48 PluginScan();
Chris@1178 49 ~PluginScan();
Chris@1241 50
Chris@1241 51 void clear();
Chris@1246 52
Chris@1246 53 mutable QMutex m_mutex; // while scanning; definitely can't multi-thread this
Chris@1241 54
Chris@1246 55 std::map<QString, KnownPlugins *> m_kp; // tag -> KnownPlugins client
Chris@1179 56 bool m_succeeded;
Chris@1180 57
Chris@1180 58 class Logger;
Chris@1180 59 Logger *m_logger;
Chris@1178 60 };
Chris@1178 61
Chris@1178 62 #endif