Audacity 3.2.0
|
#include <PluginProvider.h>
Classes | |
class | Validator |
Public Types | |
using | RegistrationCallback = std::function< const PluginID &(PluginProvider *, ComponentInterface *) > |
Further expand a path reported by FindModulePaths. More... | |
Public Member Functions | |
virtual | ~PluginProvider () |
virtual bool | Initialize ()=0 |
Called immediately after creation. Let provider initialize. More... | |
virtual void | Terminate ()=0 |
Called just prior to deletion to allow releasing any resources. More... | |
virtual EffectFamilySymbol | GetOptionalFamilySymbol ()=0 |
A symbol identifying the family of plug-ins provided by this. More... | |
virtual const FileExtensions & | GetFileExtensions ()=0 |
File types associated with this protocol. More... | |
virtual FilePath | InstallPath ()=0 |
Where plug-in files should be copied to install them. More... | |
virtual void | AutoRegisterPlugins (PluginManagerInterface &pluginManager)=0 |
Called so that a provider of a static set of plug-ins can register them. More... | |
virtual bool | SupportsCustomModulePaths () const |
virtual PluginPaths | FindModulePaths (PluginManagerInterface &pluginManager)=0 |
virtual unsigned | DiscoverPluginsAtPath (const PluginPath &path, TranslatableString &errMsg, const RegistrationCallback &callback)=0 |
virtual bool | CheckPluginExist (const PluginPath &path) const =0 |
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid loading plugins during this check. More... | |
virtual std::unique_ptr< Validator > | MakeValidator () const |
virtual std::unique_ptr< ComponentInterface > | LoadPlugin (const PluginPath &path)=0 |
Load the plug-in at a path reported by DiscoverPluginsAtPath. More... | |
Public Member Functions inherited from ComponentInterface | |
virtual | ~ComponentInterface () |
virtual PluginPath | GetPath () const =0 |
virtual ComponentInterfaceSymbol | GetSymbol () const =0 |
virtual VendorSymbol | GetVendor () const =0 |
virtual wxString | GetVersion () const =0 |
virtual TranslatableString | GetDescription () const =0 |
TranslatableString | GetName () const |
PluginProvider is an interface for discovering dynamically loaded libraries according to some third party protocol, but also used in registering the built-in effects and commands. Classes derived from it can handle more specific plug-in protocols. Interface for host side of one plug-in ("component") protocol that may locate shared libraries with client-side code. A factory of plug-in objects that represent those clients. One library may contain multiple plug-ins.
Definition at line 78 of file PluginProvider.h.
using PluginProvider::RegistrationCallback = std::function< const PluginID &(PluginProvider *, ComponentInterface *) > |
Further expand a path reported by FindModulePaths.
Once the user selects desired paths from FindModulePaths(), a call to DiscoverPluginsAtPath() will be made to request registration of one or more plug-ins.
If the provider must create an instance of the plug-in to register it, the instance should be deleted after registration.
May discover more than one plug-in at the path, and may call-back with a ComponentInterface that reports a path not equal to the given path (perhaps appending other information to it).
errMsg | message does not need to mention the path and may be nonempty even if some plug-ins are also discovered successfully. |
Definition at line 170 of file PluginProvider.h.
|
virtualdefault |
|
pure virtual |
Called so that a provider of a static set of plug-ins can register them.
Implemented in VST3EffectsModule, AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, BuiltinCommandsModule, and VampEffectsModule.
|
pure virtual |
Performs plugin/module existence check, still plugin may fail to load. Implementation should avoid loading plugins during this check.
path | Internal plugin path/ID discovered via DiscoverPluginsAtPath or module path returned by FindModulePaths |
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.
|
pure virtual |
|
pure virtual |
Find available "paths", which may each be presented to the user, and then reexamined (possibly loading libraries) to find one or more plug-ins
Paths are not necessarily file system paths. Only the provider reinterprets the paths.
Modules may be associated with plug-ins, one-to-many.
Implemented in VST3EffectsModule, AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, BuiltinCommandsModule, and VampEffectsModule.
|
pure virtual |
File types associated with this protocol.
"Paths" returned by FindModulePaths() and passed back to DiscoverPluginsAtPath() have provider-specific meaning. They are not necessarily file system paths to existent files that could be placed in any folder and queried for plug-in information.
This function returns nonempty only when that is the case, and lists the possible extensions of such files (an empty string in a nonempty array means any file is a candidate).
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.
|
pure virtual |
A symbol identifying the family of plug-ins provided by this.
If it is not empty, then the family as a whole can be enabled or disabled by the user in Preferences
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.
Referenced by PluginManager::RegisterPlugin().
|
pure virtual |
Called immediately after creation. Let provider initialize.
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.
|
pure virtual |
Where plug-in files should be copied to install them.
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.
Referenced by PluginManager::DropFile().
|
pure virtual |
Load the plug-in at a path reported by DiscoverPluginsAtPath.
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.
Referenced by PluginManager::Load().
|
virtual |
Implementation can provide plugin specific checks to the plugin instances. By default returns null.
Reimplemented in LV2EffectsModule, and VST3EffectsModule.
Definition at line 19 of file PluginProvider.cpp.
|
virtual |
Reimplemented in LadspaEffectsModule, LV2EffectsModule, VSTEffectsModule, and VST3EffectsModule.
Definition at line 14 of file PluginProvider.cpp.
|
pure virtual |
Called just prior to deletion to allow releasing any resources.
Implemented in AudioUnitEffectsModule, BuiltinEffectsModule, LadspaEffectsModule, LV2EffectsModule, NyquistEffectsModule, VSTEffectsModule, VST3EffectsModule, BuiltinCommandsModule, and VampEffectsModule.