comparison transform/TransformFactory.h @ 118:b4110b17bca8

* Fix #1672407 confused by plugin-named files in cwd (or home?) * Fix #1491848 crash when loading new file while transform plugin runs * Fix #1502287 Background remains black after spectrogram layer deleted * Fix #1604477 Replacing the main audio file silences secondary audio file * Fix failure to initialise property box layout to last preference on startup * Fix resample/wrong-rate display in Pane, ensure that right rate is chosen if all current models have an acceptable rate even if previous main model had a different one * Fix "global zoom" broken in previous commit * Some fixes to spectrogram cache area updating (makes spectrogram appear more quickly, previously it had a tendency to refresh with empty space) * Fixes to colour 3d plot normalization
author Chris Cannam
date Thu, 08 Mar 2007 16:53:08 +0000
parents 58f21cf235c7
children ebd906049fb6
comparison
equal deleted inserted replaced
117:8089a394829a 118:b4110b17bca8
18 18
19 #include "Transform.h" 19 #include "Transform.h"
20 #include "PluginTransform.h" 20 #include "PluginTransform.h"
21 21
22 #include <map> 22 #include <map>
23 #include <set>
23 24
24 namespace Vamp { class PluginBase; } 25 namespace Vamp { class PluginBase; }
25 26
26 class AudioCallbackPlaySource; 27 class AudioCallbackPlaySource;
27 28
140 * minimum and maximum number of channel inputs the transform can 141 * minimum and maximum number of channel inputs the transform can
141 * accept. Return false if it doesn't care. 142 * accept. Return false if it doesn't care.
142 */ 143 */
143 bool getTransformChannelRange(TransformId identifier, 144 bool getTransformChannelRange(TransformId identifier,
144 int &minChannels, int &maxChannels); 145 int &minChannels, int &maxChannels);
145
146 //!!! Need some way to indicate that the input model has changed /
147 //been deleted so as not to blow up backgrounded transform! -- Or
148 //indeed, if the output model has been deleted -- could equally
149 //well happen!
150
151 //!!! Need transform category!
152 146
153 protected slots: 147 protected slots:
154 void transformFinished(); 148 void transformFinished();
155 149
150 void modelAboutToBeDeleted(Model *);
151
156 protected: 152 protected:
157 Transform *createTransform(TransformId identifier, Model *inputModel, 153 Transform *createTransform(TransformId identifier, Model *inputModel,
158 const PluginTransform::ExecutionContext &context, 154 const PluginTransform::ExecutionContext &context,
159 QString configurationXml, bool start); 155 QString configurationXml);
160 156
161 struct TransformIdent 157 struct TransformIdent
162 { 158 {
163 TransformId identifier; 159 TransformId identifier;
164 QString configurationXml; 160 QString configurationXml;
168 TransformConfigurationMap m_lastConfigurations; 164 TransformConfigurationMap m_lastConfigurations;
169 165
170 typedef std::map<TransformId, TransformDesc> TransformDescriptionMap; 166 typedef std::map<TransformId, TransformDesc> TransformDescriptionMap;
171 TransformDescriptionMap m_transforms; 167 TransformDescriptionMap m_transforms;
172 168
169 typedef std::set<Transform *> TransformSet;
170 TransformSet m_runningTransforms;
171
173 void populateTransforms(); 172 void populateTransforms();
174 void populateFeatureExtractionPlugins(TransformDescriptionMap &); 173 void populateFeatureExtractionPlugins(TransformDescriptionMap &);
175 void populateRealTimePlugins(TransformDescriptionMap &); 174 void populateRealTimePlugins(TransformDescriptionMap &);
176 175
177 bool getChannelRange(TransformId identifier, 176 bool getChannelRange(TransformId identifier,