Mercurial > hg > vamp-plugin-sdk
diff vamp-hostsdk/RequestResponse.h @ 431:2819b5c9a395 vampipe
Use ConfigurationRequest/Response, introduce ProcessRequest/Response.
author | Chris Cannam |
---|---|
date | Wed, 18 May 2016 10:53:19 +0100 |
parents | fbdb06ce1e9a |
children | 8dea61e4a7be |
line wrap: on
line diff
--- a/vamp-hostsdk/RequestResponse.h Wed May 18 10:35:13 2016 +0100 +++ b/vamp-hostsdk/RequestResponse.h Wed May 18 10:53:19 2016 +0100 @@ -155,6 +155,9 @@ * the data needed to configure a plugin after it has been loaded. * * \see PluginConfiguration, ConfigurationResponse, LoadRequest, LoadResponse + * + * \note This class was introduced in version 2.7 of the Vamp plugin + * SDK, along with the PluginLoader method that returns this structure. */ struct ConfigurationRequest { @@ -176,6 +179,9 @@ * the output list will be empty. * * \see PluginConfiguration, ConfigurationRequest, LoadRequest, LoadResponse + * + * \note This class was introduced in version 2.7 of the Vamp plugin + * SDK, along with the PluginLoader method that returns this structure. */ struct ConfigurationResponse { @@ -186,6 +192,55 @@ Plugin::OutputList outputs; }; +/** + * \class ProcessRequest RequestResponse.h <vamp-hostsdk/RequestResponse.h> + * + * A structure that bundles the necessary data for making a process + * call: plugin, input buffers, and timestamp. Caller retains + * ownership of the plugin, but the buffers are passed "by value" to + * avoid ownership concerns. + * + * \see Plugin::process() + * + * \note This class was introduced in version 2.7 of the Vamp plugin + * SDK, but it is not currently used by the SDK. It is supplied as a + * convenience for code using the SDK, and for symmetry with the load + * and configuration request structs. + */ +struct ProcessRequest +{ +public: + ProcessRequest() : // invalid by default + plugin(0) { } + + Plugin *plugin; + RealTime timestamp; + std::vector<std::vector<float> > input; +}; + +/** + * \class ProcessResponse RequestResponse.h <vamp-hostsdk/RequestResponse.h> + * + * A structure that bundles the data returned by a process call and by + * Plugin::getRemainingFeatures(). This is simply a FeatureSet + * wrapper, named for symmetry with the other request-response pairs. + * + * \see Plugin::process(), Plugin::getRemainingFeatures() + * + * \note This class was introduced in version 2.7 of the Vamp plugin + * SDK, but it is not currently used by the SDK. It is supplied as a + * convenience for code using the SDK, and for symmetry with the load + * and configuration request structs. + */ +struct ProcessResponse +{ +public: + ProcessResponse() // empty by default + { } + + Plugin::FeatureSet features; +}; + } }