#include <LADSPAPluginFactory.h>

Inheritance diagram for LADSPAPluginFactory:
Inheritance graph
Collaboration diagram for LADSPAPluginFactory:
Collaboration graph

Public Member Functions

virtual ~LADSPAPluginFactory ()
 
void discoverPlugins () override
 Look up the plugin path and find the plugins in it. More...
 
const std::vector< QString > & getPluginIdentifiers () const override
 Return a reference to a list of all plugin identifiers that can be created by this factory. More...
 
void enumeratePlugins (std::vector< QString > &list) override
 Append to the given list descriptions of all the available plugins and their ports. More...
 
RealTimePluginDescriptor getPluginDescriptor (QString identifier) const override
 Get some basic information about a plugin (rapidly). More...
 
std::shared_ptr< RealTimePluginInstanceinstantiatePlugin (QString identifier, int clientId, int position, sv_samplerate_t sampleRate, int blockSize, int channels) override
 Instantiate a plugin. More...
 
QString getPluginCategory (QString identifier) override
 Get category metadata about a plugin (without instantiating it). More...
 
QString getPluginLibraryPath (QString identifier) override
 Get the full file path (including both directory and filename) of the library file that provides a given plugin identifier. More...
 
float getPortMinimum (const LADSPA_Descriptor *, int port)
 
float getPortMaximum (const LADSPA_Descriptor *, int port)
 
float getPortDefault (const LADSPA_Descriptor *, int port)
 
float getPortQuantization (const LADSPA_Descriptor *, int port)
 
int getPortDisplayHint (const LADSPA_Descriptor *, int port)
 

Static Public Member Functions

static std::vector< QString > getPluginPath ()
 
static RealTimePluginFactoryinstance (QString pluginType)
 
static RealTimePluginFactoryinstanceFor (QString identifier)
 
static std::vector< QString > getAllPluginIdentifiers ()
 
static void enumerateAllPlugins (std::vector< QString > &)
 
static void setSampleRate (sv_samplerate_t sampleRate)
 

Protected Types

typedef std::map< QString, void * > LibraryHandleMap
 

Protected Member Functions

 LADSPAPluginFactory ()
 
virtual PluginScan::PluginType getPluginType () const
 
virtual std::vector< QString > getLRDFPath (QString &baseUri)
 
virtual void discoverPluginsFrom (QString soName)
 
virtual void generateTaxonomy (QString uri, QString base)
 
virtual void generateFallbackCategories ()
 
virtual const LADSPA_Descriptor * getLADSPADescriptor (QString identifier)
 
void loadLibrary (QString soName)
 
void unloadLibrary (QString soName)
 
void unloadUnusedLibraries ()
 

Protected Attributes

std::vector< QString > m_identifiers
 
std::map< QString, QString > m_libraries
 
std::map< QString, RealTimePluginDescriptorm_rtDescriptors
 
std::map< QString, QString > m_taxonomy
 
std::map< unsigned long, QString > m_lrdfTaxonomy
 
std::map< unsigned long, std::map< int, float > > m_portDefaults
 
std::set< std::weak_ptr< RealTimePluginInstance >, std::owner_less< std::weak_ptr< RealTimePluginInstance > > > m_instances
 
LibraryHandleMap m_libraryHandles
 

Static Protected Attributes

static sv_samplerate_t m_sampleRate = 48000
 

Friends

class RealTimePluginFactory
 

Detailed Description

Definition at line 36 of file LADSPAPluginFactory.h.

Member Typedef Documentation

typedef std::map<QString, void *> LADSPAPluginFactory::LibraryHandleMap
protected

Definition at line 101 of file LADSPAPluginFactory.h.

Constructor & Destructor Documentation

LADSPAPluginFactory::~LADSPAPluginFactory ( )
virtual

Definition at line 52 of file LADSPAPluginFactory.cpp.

References unloadUnusedLibraries().

LADSPAPluginFactory::LADSPAPluginFactory ( )
protected

Definition at line 45 of file LADSPAPluginFactory.cpp.

Member Function Documentation

void LADSPAPluginFactory::discoverPlugins ( )
overridevirtual

Look up the plugin path and find the plugins in it.

Called automatically after construction of a factory.

Implements RealTimePluginFactory.

Definition at line 595 of file LADSPAPluginFactory.cpp.

References discoverPluginsFrom(), generateFallbackCategories(), generateTaxonomy(), PluginScan::getCandidateLibrariesFor(), PluginScan::getInstance(), getLRDFPath(), getPluginPath(), and getPluginType().

Referenced by RealTimePluginFactory::instance().

const std::vector< QString > & LADSPAPluginFactory::getPluginIdentifiers ( ) const
overridevirtual

Return a reference to a list of all plugin identifiers that can be created by this factory.

Implements RealTimePluginFactory.

Definition at line 62 of file LADSPAPluginFactory.cpp.

References m_identifiers.

void LADSPAPluginFactory::enumeratePlugins ( std::vector< QString > &  list)
overridevirtual

Append to the given list descriptions of all the available plugins and their ports.

This is in a standard format, see the LADSPA implementation for details.

Implements RealTimePluginFactory.

Definition at line 74 of file LADSPAPluginFactory.cpp.

References PortType::Audio, PortType::Control, getLADSPADescriptor(), getPortDefault(), getPortDisplayHint(), getPortMaximum(), getPortMinimum(), PortType::Input, m_identifiers, m_taxonomy, PortType::Output, SVCERR, and unloadUnusedLibraries().

RealTimePluginDescriptor LADSPAPluginFactory::getPluginDescriptor ( QString  identifier) const
overridevirtual

Get some basic information about a plugin (rapidly).

Implements RealTimePluginFactory.

Definition at line 136 of file LADSPAPluginFactory.cpp.

References m_rtDescriptors.

std::shared_ptr< RealTimePluginInstance > LADSPAPluginFactory::instantiatePlugin ( QString  identifier,
int  clientId,
int  position,
sv_samplerate_t  sampleRate,
int  blockSize,
int  channels 
)
overridevirtual

Instantiate a plugin.

Implements RealTimePluginFactory.

Definition at line 332 of file LADSPAPluginFactory.cpp.

References getLADSPADescriptor(), RealTimePluginFactory::instance(), m_instances, and SVDEBUG.

QString LADSPAPluginFactory::getPluginCategory ( QString  identifier)
overridevirtual

Get category metadata about a plugin (without instantiating it).

Implements RealTimePluginFactory.

Definition at line 852 of file LADSPAPluginFactory.cpp.

References m_taxonomy.

QString LADSPAPluginFactory::getPluginLibraryPath ( QString  identifier)
overridevirtual

Get the full file path (including both directory and filename) of the library file that provides a given plugin identifier.

Note getPluginIdentifiers() must have been called before this has access to the necessary information.

Implements RealTimePluginFactory.

Definition at line 68 of file LADSPAPluginFactory.cpp.

References m_libraries.

float LADSPAPluginFactory::getPortQuantization ( const LADSPA_Descriptor *  descriptor,
int  port 
)
int LADSPAPluginFactory::getPortDisplayHint ( const LADSPA_Descriptor *  descriptor,
int  port 
)
std::vector< QString > LADSPAPluginFactory::getPluginPath ( )
static
virtual PluginScan::PluginType LADSPAPluginFactory::getPluginType ( ) const
inlineprotectedvirtual
std::vector< QString > LADSPAPluginFactory::getLRDFPath ( QString &  baseUri)
protectedvirtual

Reimplemented in DSSIPluginFactory.

Definition at line 571 of file LADSPAPluginFactory.cpp.

References getPluginPath().

Referenced by discoverPlugins(), and getPluginType().

void LADSPAPluginFactory::generateTaxonomy ( QString  uri,
QString  base 
)
protectedvirtual

Definition at line 822 of file LADSPAPluginFactory.cpp.

References m_lrdfTaxonomy.

Referenced by discoverPlugins(), and getPluginType().

void LADSPAPluginFactory::generateFallbackCategories ( )
protectedvirtual
const LADSPA_Descriptor * LADSPAPluginFactory::getLADSPADescriptor ( QString  identifier)
protectedvirtual
void LADSPAPluginFactory::loadLibrary ( QString  soName)
protected
void LADSPAPluginFactory::unloadLibrary ( QString  soName)
protected

Definition at line 463 of file LADSPAPluginFactory.cpp.

References DLCLOSE, and m_libraryHandles.

Referenced by getPluginType(), and unloadUnusedLibraries().

std::vector< QString > RealTimePluginFactory::getAllPluginIdentifiers ( )
staticinherited
void RealTimePluginFactory::enumerateAllPlugins ( std::vector< QString > &  list)
staticinherited
static void RealTimePluginFactory::setSampleRate ( sv_samplerate_t  sampleRate)
inlinestaticinherited

Definition at line 60 of file RealTimePluginFactory.h.

Friends And Related Function Documentation

friend class RealTimePluginFactory
friend

Definition at line 72 of file LADSPAPluginFactory.h.

Member Data Documentation

std::vector<QString> LADSPAPluginFactory::m_identifiers
protected
std::map<QString, QString> LADSPAPluginFactory::m_libraries
protected
std::map<QString, RealTimePluginDescriptor> LADSPAPluginFactory::m_rtDescriptors
protected
std::map<QString, QString> LADSPAPluginFactory::m_taxonomy
protected
std::map<unsigned long, QString> LADSPAPluginFactory::m_lrdfTaxonomy
protected
std::map<unsigned long, std::map<int, float> > LADSPAPluginFactory::m_portDefaults
protected
std::set<std::weak_ptr<RealTimePluginInstance>, std::owner_less<std::weak_ptr<RealTimePluginInstance> > > LADSPAPluginFactory::m_instances
protected
LibraryHandleMap LADSPAPluginFactory::m_libraryHandles
protected
sv_samplerate_t RealTimePluginFactory::m_sampleRate = 48000
staticprotectedinherited

Definition at line 112 of file RealTimePluginFactory.h.

Referenced by getPortMaximum(), and getPortMinimum().


The documentation for this class was generated from the following files: