Mercurial > hg > vampy
comparison PyPlugin.h @ 3:134313c59d82
* Add global mutex to PyPlugin -- all plugin method calls are strictly
serialised in order to avoid problems with Python interpreter's lack of
thread safety.
| author | cannam |
|---|---|
| date | Fri, 14 Mar 2008 12:02:15 +0000 |
| parents | e20e214bdfb5 |
| children | e1b508f2f914 |
comparison
equal
deleted
inserted
replaced
| 2:211ebe55d521 | 3:134313c59d82 |
|---|---|
| 38 | 38 |
| 39 #ifndef _PYTHON_WRAPPER_PLUGIN_H_ | 39 #ifndef _PYTHON_WRAPPER_PLUGIN_H_ |
| 40 #define _PYTHON_WRAPPER_PLUGIN_H_ | 40 #define _PYTHON_WRAPPER_PLUGIN_H_ |
| 41 | 41 |
| 42 #include "vamp-sdk/Plugin.h" | 42 #include "vamp-sdk/Plugin.h" |
| 43 #include "/usr/include/python/Python.h" | 43 #include <Python.h> |
| 44 | |
| 45 #include "Mutex.h" | |
| 44 | 46 |
| 45 //fields in OutputDescriptor | 47 //fields in OutputDescriptor |
| 46 enum eOutDescriptors { | 48 enum eOutDescriptors { |
| 47 not_found, | 49 not_found, |
| 48 identifier, | 50 identifier, |
| 128 size_t m_stepSize; | 130 size_t m_stepSize; |
| 129 float m_previousSample; | 131 float m_previousSample; |
| 130 std::string m_plugin; | 132 std::string m_plugin; |
| 131 std::string m_class; | 133 std::string m_class; |
| 132 std::string m_path; | 134 std::string m_path; |
| 135 | |
| 136 static Mutex m_pythonInterpreterMutex; | |
| 133 }; | 137 }; |
| 134 | 138 |
| 135 | 139 |
| 136 #endif | 140 #endif |
