annotate plugin/DSSIPluginFactory.h @ 1879:652c5360e682

Ensure transforms are populated before instantiateDefaultPluginFor runs - otherwise if we have prior knowledge of a transform id, we can find ourselves trying to instantiate it before the plugin factory has heard of it and e.g. knows which server to use
author Chris Cannam
date Thu, 25 Jun 2020 12:20:06 +0100
parents 5f8fbbde08ff
children
rev   line source
Chris@49 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@0 2
Chris@0 3 /*
Chris@52 4 Sonic Visualiser
Chris@52 5 An audio file viewer and annotation editor.
Chris@52 6 Centre for Digital Music, Queen Mary, University of London.
Chris@0 7
Chris@52 8 This program is free software; you can redistribute it and/or
Chris@52 9 modify it under the terms of the GNU General Public License as
Chris@52 10 published by the Free Software Foundation; either version 2 of the
Chris@52 11 License, or (at your option) any later version. See the file
Chris@52 12 COPYING included with this distribution for more information.
Chris@0 13 */
Chris@0 14
Chris@0 15 /*
Chris@0 16 This is a modified version of a source file from the
Chris@0 17 Rosegarden MIDI and audio sequencer and notation editor.
Chris@17 18 This file copyright 2000-2006 Chris Cannam.
Chris@0 19 */
Chris@0 20
Chris@1581 21 #ifndef SV_DSSI_PLUGIN_FACTORY_H
Chris@1581 22 #define SV_DSSI_PLUGIN_FACTORY_H
Chris@0 23
Chris@0 24 #define DSSI_API_LEVEL 2
Chris@0 25
Chris@0 26 #include "LADSPAPluginFactory.h"
Chris@0 27 #include "api/dssi.h"
Chris@0 28
Chris@0 29 #include <QMutex>
Chris@0 30
Chris@0 31 class DSSIPluginInstance;
Chris@0 32
Chris@0 33 class DSSIPluginFactory : public LADSPAPluginFactory
Chris@0 34 {
Chris@0 35 public:
Chris@0 36 virtual ~DSSIPluginFactory();
Chris@0 37
Chris@1580 38 void enumeratePlugins(std::vector<QString> &list) override;
Chris@0 39
Chris@1830 40 std::shared_ptr<RealTimePluginInstance>
Chris@1830 41 instantiatePlugin(QString identifier,
Chris@1830 42 int clientId,
Chris@1830 43 int position,
Chris@1830 44 sv_samplerate_t sampleRate,
Chris@1830 45 int blockSize,
Chris@1830 46 int channels) override;
Chris@0 47
Chris@1472 48 static std::vector<QString> getPluginPath();
Chris@1472 49
Chris@0 50 protected:
Chris@0 51 DSSIPluginFactory();
Chris@0 52 friend class RealTimePluginFactory;
Chris@0 53
Chris@1580 54 PluginScan::PluginType getPluginType() const override {
Chris@1180 55 return PluginScan::DSSIPlugin;
Chris@1179 56 }
Chris@1179 57
Chris@1580 58 std::vector<QString> getLRDFPath(QString &baseUri) override;
Chris@0 59
Chris@1580 60 void discoverPluginsFrom(QString soName) override;
Chris@0 61
Chris@1580 62 const LADSPA_Descriptor *getLADSPADescriptor(QString identifier) override;
Chris@0 63 virtual const DSSI_Descriptor *getDSSIDescriptor(QString identifier);
Chris@0 64
Chris@0 65 DSSI_Host_Descriptor m_hostDescriptor;
Chris@0 66 };
Chris@0 67
Chris@0 68 #endif
Chris@0 69