| 176 | } |
| 177 | |
| 178 | unsigned BuiltinEffectsModule::DiscoverPluginsAtPath( |
| 179 | const PluginPath & path, TranslatableString &errMsg, |
| 180 | const RegistrationCallback &callback) |
| 181 | { |
| 182 | // At most one |
| 183 | errMsg = {}; |
| 184 | auto effect = Instantiate(path); |
| 185 | if (effect) |
| 186 | { |
| 187 | if (callback) |
| 188 | callback(this, effect.get()); |
| 189 | return 1; |
| 190 | } |
| 191 | |
| 192 | errMsg = XO("Unknown built-in effect name"); |
| 193 | return 0; |
| 194 | } |
| 195 | |
| 196 | std::unique_ptr<ComponentInterface> |
| 197 | BuiltinEffectsModule::LoadPlugin(const PluginPath & path) |