Mercurial > hg > piper-cpp
diff bits/PreservingPluginHandleMapper.h @ 51:f4244a2d55ac
Introduce and use output id mappers
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 16 Sep 2016 15:10:57 +0100 |
parents | 55d69b26d4db |
children | e90fd30990eb |
line wrap: on
line diff
--- a/bits/PreservingPluginHandleMapper.h Fri Sep 16 14:15:41 2016 +0100 +++ b/bits/PreservingPluginHandleMapper.h Fri Sep 16 15:10:57 2016 +0100 @@ -36,11 +36,16 @@ #define VAMPIPE_PRESERVING_PLUGIN_HANDLE_MAPPER_H #include "PluginHandleMapper.h" +#include "PreservingPluginOutputIdMapper.h" #include <iostream> namespace vampipe { +//!!! document -- this is a passthrough thing for a single plugin +//!!! handle only, it does not use actually valid Plugin pointers at +//!!! all + class PreservingPluginHandleMapper : public PluginHandleMapper { public: @@ -63,9 +68,18 @@ return m_plugin; } + virtual const PluginOutputIdMapper &pluginToOutputIdMapper(Vamp::Plugin *) const { + return m_omapper; + } + + virtual const PluginOutputIdMapper &handleToOutputIdMapper(int32_t h) const { + return m_omapper; + } + private: mutable int32_t m_handle; mutable Vamp::Plugin *m_plugin; + PreservingPluginOutputIdMapper m_omapper; }; }