fazekasgy@0: /* fazekasgy@0: Vamp fazekasgy@0: fazekasgy@0: An API for audio analysis and feature extraction plugins. fazekasgy@0: fazekasgy@0: Centre for Digital Music, Queen Mary, University of London. fazekasgy@0: Copyright 2006-2007 Chris Cannam and QMUL. fazekasgy@0: fazekasgy@0: Permission is hereby granted, free of charge, to any person fazekasgy@0: obtaining a copy of this software and associated documentation fazekasgy@0: files (the "Software"), to deal in the Software without fazekasgy@0: restriction, including without limitation the rights to use, copy, fazekasgy@0: modify, merge, publish, distribute, sublicense, and/or sell copies fazekasgy@0: of the Software, and to permit persons to whom the Software is fazekasgy@0: furnished to do so, subject to the following conditions: fazekasgy@0: fazekasgy@0: The above copyright notice and this permission notice shall be fazekasgy@0: included in all copies or substantial portions of the Software. fazekasgy@0: fazekasgy@0: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, fazekasgy@0: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF fazekasgy@0: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND fazekasgy@0: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR fazekasgy@0: ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF fazekasgy@0: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION fazekasgy@0: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. fazekasgy@0: fazekasgy@0: Except as contained in this notice, the names of the Centre for fazekasgy@0: Digital Music; Queen Mary, University of London; and Chris Cannam fazekasgy@0: shall not be used in advertising or otherwise to promote the sale, fazekasgy@0: use or other dealings in this Software without prior written fazekasgy@0: authorization. fazekasgy@0: */ fazekasgy@0: fazekasgy@0: fazekasgy@0: /* fazekasgy@0: Objective: We want to find available pyVamp plugins here fazekasgy@0: Future: We may have multiple plugins per script fazekasgy@0: */ fazekasgy@0: fazekasgy@0: #ifndef _VAMP_PYPLUG_SCANNER_H_ fazekasgy@0: #define _VAMP_PYPLUG_SCANNER_H_ fazekasgy@0: cannam@3: #include fazekasgy@0: #include fazekasgy@0: #include fazekasgy@0: #include fazekasgy@0: #include fazekasgy@0: //#include fazekasgy@0: fazekasgy@0: class PyPlugScanner fazekasgy@0: { fazekasgy@0: public: fazekasgy@0: ~PyPlugScanner() { m_hasInstance = false; } fazekasgy@0: static PyPlugScanner *getInstance(); fazekasgy@0: std::vector getPyPlugs(); fazekasgy@0: std::vector getPyInstances(); fazekasgy@0: void setPath(std::vector path); fazekasgy@0: std::vector getAllValidPath(); fazekasgy@0: fazekasgy@0: protected: fazekasgy@0: PyPlugScanner(); fazekasgy@0: PyObject *getScriptInstance(std::string path, std::string classname); fazekasgy@0: std::vector listFiles(std::string dir, std::string ext); fazekasgy@0: static bool m_hasInstance; fazekasgy@0: static PyPlugScanner *m_instance; fazekasgy@0: std::string m_dir; fazekasgy@0: std::vector m_path; fazekasgy@0: std::vector m_pyInstances; fazekasgy@0: }; fazekasgy@0: fazekasgy@0: #endif cannam@3: