comparison runner/FeatureExtractionManager.h @ 106:de76b2df518f multiplex

Start on multiplex implementation
author Chris Cannam
date Wed, 01 Oct 2014 18:38:32 +0100
parents fae326c22df5
children ca565b18ba3e
comparison
equal deleted inserted replaced
105:76d9d86ae6cd 106:de76b2df518f
59 const vector<FeatureWriter*> &writers); 59 const vector<FeatureWriter*> &writers);
60 60
61 // Make a note of an audio or playlist file which will be passed 61 // Make a note of an audio or playlist file which will be passed
62 // to extractFeatures later. Amongst other things, this may 62 // to extractFeatures later. Amongst other things, this may
63 // initialise the default sample rate and channel count 63 // initialise the default sample rate and channel count
64 void addSource(QString audioSource); 64 void addSource(QString audioSource, bool willMultiplex);
65 65
66 // Extract features from the given audio or playlist file. If the 66 // Extract features from the given audio or playlist file. If the
67 // file is a playlist and force is true, continue extracting even 67 // file is a playlist and force is true, continue extracting even
68 // if a file in the playlist fails. 68 // if a file in the playlist fails.
69 void extractFeatures(QString audioSource, bool force); 69 void extractFeatures(QString audioSource, bool force);
70
71 // Extract features from the given audio files, multiplexing into
72 // a single "file" whose individual channels are mixdowns of the
73 // supplied sources.
74 void extractFeaturesMultiplexed(QStringList sources);
70 75
71 private: 76 private:
72 // A plugin may have many outputs, so we can have more than one 77 // A plugin may have many outputs, so we can have more than one
73 // transform requested for a single plugin. The things we want to 78 // transform requested for a single plugin. The things we want to
74 // run in our process loop are plugins rather than their outputs, 79 // run in our process loop are plugins rather than their outputs,
100 typedef set<std::string> SummaryNameSet; 105 typedef set<std::string> SummaryNameSet;
101 SummaryNameSet m_summaries; 106 SummaryNameSet m_summaries;
102 bool m_summariesOnly; 107 bool m_summariesOnly;
103 Vamp::HostExt::PluginSummarisingAdapter::SegmentBoundaries m_boundaries; 108 Vamp::HostExt::PluginSummarisingAdapter::SegmentBoundaries m_boundaries;
104 109
110 AudioFileReader *prepareReader(QString audioSource);
111
112 void extractFeaturesFor(AudioFileReader *reader, QString audioSource);
113
105 void writeSummaries(QString audioSource, Vamp::Plugin *); 114 void writeSummaries(QString audioSource, Vamp::Plugin *);
106 115
107 void writeFeatures(QString audioSource, 116 void writeFeatures(QString audioSource,
108 Vamp::Plugin *, 117 Vamp::Plugin *,
109 const Vamp::Plugin::FeatureSet &, 118 const Vamp::Plugin::FeatureSet &,