Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/PluginAdapter.cpp @ 50:b907557b2fb9
* Add a structure for API versioning
author | cannam |
---|---|
date | Tue, 27 Feb 2007 12:48:17 +0000 |
parents | aa64a46320d4 |
children | 6683f99107cf |
comparison
equal
deleted
inserted
replaced
49:aa64a46320d4 | 50:b907557b2fb9 |
---|---|
58 | 58 |
59 if (m_populated) return &m_descriptor; | 59 if (m_populated) return &m_descriptor; |
60 | 60 |
61 Plugin *plugin = createPlugin(48000); | 61 Plugin *plugin = createPlugin(48000); |
62 | 62 |
63 if (plugin->getVampApiVersion() != VAMP_API_VERSION) { | |
64 std::cerr << "Vamp::PluginAdapterBase::getDescriptor: ERROR: " | |
65 << "Plugin object API version " | |
66 << plugin->getVampApiVersion() | |
67 << " does not match actual API version " | |
68 << VAMP_API_VERSION << std::endl; | |
69 delete plugin; | |
70 return 0; | |
71 } | |
72 | |
63 m_parameters = plugin->getParameterDescriptors(); | 73 m_parameters = plugin->getParameterDescriptors(); |
64 m_programs = plugin->getPrograms(); | 74 m_programs = plugin->getPrograms(); |
65 | 75 |
76 m_descriptor.vampApiVersion = plugin->getVampApiVersion(); | |
66 m_descriptor.identifier = strdup(plugin->getIdentifier().c_str()); | 77 m_descriptor.identifier = strdup(plugin->getIdentifier().c_str()); |
67 m_descriptor.name = strdup(plugin->getName().c_str()); | 78 m_descriptor.name = strdup(plugin->getName().c_str()); |
68 m_descriptor.description = strdup(plugin->getDescription().c_str()); | 79 m_descriptor.description = strdup(plugin->getDescription().c_str()); |
69 m_descriptor.maker = strdup(plugin->getMaker().c_str()); | 80 m_descriptor.maker = strdup(plugin->getMaker().c_str()); |
70 m_descriptor.pluginVersion = plugin->getPluginVersion(); | 81 m_descriptor.pluginVersion = plugin->getPluginVersion(); |