comparison transform/TransformFactory.h @ 460:93fb1ebff76b

* Add persistent cache file support to FileSource (e.g. for RDF descriptions) * Query RDF plugin data in a background thread on startup
author Chris Cannam
date Fri, 17 Oct 2008 13:32:55 +0000
parents ef14acd6d102
children 9525c9d7e54d
comparison
equal deleted inserted replaced
459:6441b31b37ac 460:93fb1ebff76b
22 22
23 #include <vamp-sdk/Plugin.h> 23 #include <vamp-sdk/Plugin.h>
24 24
25 #include <QObject> 25 #include <QObject>
26 #include <QStringList> 26 #include <QStringList>
27 #include <QThread>
28 #include <QMutex>
27 29
28 #include <map> 30 #include <map>
29 #include <set> 31 #include <set>
30 32
31 class TransformFactory : public QObject 33 class TransformFactory : public QObject
190 void populateFeatureExtractionPlugins(TransformDescriptionMap &); 192 void populateFeatureExtractionPlugins(TransformDescriptionMap &);
191 void populateRealTimePlugins(TransformDescriptionMap &); 193 void populateRealTimePlugins(TransformDescriptionMap &);
192 194
193 Vamp::PluginBase *instantiateDefaultPluginFor(TransformId id, size_t rate); 195 Vamp::PluginBase *instantiateDefaultPluginFor(TransformId id, size_t rate);
194 196
197 QMutex m_transformsMutex;
198 QMutex m_uninstalledTransformsMutex;
199
200 class UninstalledTransformsPopulateThread : public QThread
201 {
202 public:
203 UninstalledTransformsPopulateThread(TransformFactory *factory) :
204 m_factory(factory) {
205 }
206 virtual void run() {
207 m_factory->populateUninstalledTransforms();
208 }
209 TransformFactory *m_factory;
210 };
211
195 static TransformFactory *m_instance; 212 static TransformFactory *m_instance;
196 }; 213 };
197 214
198 215
199 #endif 216 #endif