svcore
1.9
|
#include <RealTimeEffectModelTransformer.h>
Public Types | |
typedef std::vector< Model * > | Models |
enum | Type { RTThread, NonRTThread } |
Public Slots | |
void | start () |
Public Member Functions | |
RealTimeEffectModelTransformer (Input input, const Transform &transform) | |
virtual | ~RealTimeEffectModelTransformer () |
void | abandon () |
Hint to the processing thread that it should give up, for example because the process is going to exit or we want to get rid of the input model. | |
Model * | getInputModel () |
Return the input model for the transform. | |
int | getInputChannel () |
Return the input channel spec for the transform. | |
Models | getOutputModels () |
Return the set of output models created by the transform or transforms. | |
Models | detachOutputModels () |
Return the set of output models, also detaching them from the transformer so that they will not be deleted when the transformer is. | |
virtual Models | getAdditionalOutputModels () |
Return any additional models that were created during processing. | |
virtual bool | willHaveAdditionalOutputModels () |
Return true if the current transform is one that may produce additional models (to be retrieved through getAdditionalOutputModels above). | |
virtual Models | detachAdditionalOutputModels () |
Return the set of additional models, also detaching them from the transformer. | |
QString | getMessage () const |
Return a warning or error message. | |
Protected Member Functions | |
virtual void | run () |
DenseTimeValueModel * | getConformingInput () |
Protected Attributes | |
QString | m_units |
RealTimePluginInstance * | m_plugin |
int | m_outputNo |
Transforms | m_transforms |
Input | m_input |
Models | m_outputs |
bool | m_detached |
bool | m_detachedAdd |
bool | m_abandoned |
QString | m_message |
Definition at line 24 of file RealTimeEffectModelTransformer.h.
typedef std::vector<Model *> ModelTransformer::Models [inherited] |
Definition at line 43 of file ModelTransformer.h.
enum Thread::Type [inherited] |
RealTimeEffectModelTransformer::RealTimeEffectModelTransformer | ( | Input | input, |
const Transform & | transform | ||
) |
Definition at line 32 of file RealTimeEffectModelTransformer.cpp.
References RealTimePluginInstance::getAudioOutputCount(), Transform::getBlockSize(), DenseTimeValueModel::getChannelCount(), getConformingInput(), RealTimePluginInstance::getControlOutputCount(), Transform::getIdentifier(), TransformFactory::getInstance(), Transform::getOutput(), Transform::getPluginIdentifier(), Model::getSampleRate(), TransformFactory::getTransformUnits(), RealTimePluginFactory::instanceFor(), RealTimePluginFactory::instantiatePlugin(), m_outputNo, ModelTransformer::m_outputs, m_plugin, ModelTransformer::m_transforms, m_units, Transform::setBlockSize(), TransformFactory::setPluginParameters(), and SparseValueModel< PointType >::setScaleUnits().
Definition at line 106 of file RealTimeEffectModelTransformer.cpp.
References m_plugin.
void RealTimeEffectModelTransformer::run | ( | ) | [protected, virtual] |
Implements Thread.
Definition at line 123 of file RealTimeEffectModelTransformer.cpp.
References SparseValueModel< PointType >::addPoint(), WritableWaveFileModel::addSamples(), RealTimePluginInstance::getAudioInputBuffers(), RealTimePluginInstance::getAudioInputCount(), RealTimePluginInstance::getAudioOutputBuffers(), RealTimePluginInstance::getBufferSize(), ModelTransformer::Input::getChannel(), DenseTimeValueModel::getChannelCount(), getConformingInput(), RealTimePluginInstance::getControlOutputCount(), RealTimePluginInstance::getControlOutputValue(), DenseTimeValueModel::getData(), Transform::getDuration(), Model::getEndFrame(), RealTimePluginInstance::getLatency(), ModelTransformer::Input::getModel(), Model::getSampleRate(), Model::getStartFrame(), Transform::getStartTime(), Model::isReady(), ModelTransformer::m_abandoned, ModelTransformer::m_input, m_outputNo, ModelTransformer::m_outputs, m_plugin, ModelTransformer::m_transforms, RealTime::realTime2Frame(), RealTimePluginInstance::run(), WritableWaveFileModel::setCompletion(), SparseModel< PointType >::setCompletion(), WritableWaveFileModel::setStartFrame(), and SVDEBUG.
DenseTimeValueModel * RealTimeEffectModelTransformer::getConformingInput | ( | ) | [protected] |
Definition at line 112 of file RealTimeEffectModelTransformer.cpp.
References ModelTransformer::getInputModel(), and SVDEBUG.
Referenced by RealTimeEffectModelTransformer(), and run().
void ModelTransformer::abandon | ( | ) | [inline, inherited] |
Hint to the processing thread that it should give up, for example because the process is going to exit or we want to get rid of the input model.
Caller should still wait() and/or delete the transform before assuming its input and output models are no longer required.
Definition at line 68 of file ModelTransformer.h.
References ModelTransformer::m_abandoned.
Referenced by ModelTransformerFactory::modelAboutToBeDeleted(), and FeatureExtractionModelTransformer::setCompletion().
Model* ModelTransformer::getInputModel | ( | ) | [inline, inherited] |
Return the input model for the transform.
Definition at line 73 of file ModelTransformer.h.
References ModelTransformer::Input::getModel(), and ModelTransformer::m_input.
Referenced by getConformingInput(), FeatureExtractionModelTransformer::getConformingInput(), and ModelTransformerFactory::modelAboutToBeDeleted().
int ModelTransformer::getInputChannel | ( | ) | [inline, inherited] |
Return the input channel spec for the transform.
Definition at line 78 of file ModelTransformer.h.
References ModelTransformer::Input::getChannel(), and ModelTransformer::m_input.
Models ModelTransformer::getOutputModels | ( | ) | [inline, inherited] |
Return the set of output models created by the transform or transforms.
Returns an empty list if any transform could not be initialised; an error message may be available via getMessage() in this situation.
Definition at line 86 of file ModelTransformer.h.
References ModelTransformer::m_outputs.
Referenced by ModelTransformer::detachOutputModels(), ModelTransformerFactory::modelAboutToBeDeleted(), and ModelTransformer::~ModelTransformer().
Models ModelTransformer::detachOutputModels | ( | ) | [inline, inherited] |
Return the set of output models, also detaching them from the transformer so that they will not be deleted when the transformer is.
The caller takes ownership of the models.
Definition at line 93 of file ModelTransformer.h.
References ModelTransformer::getOutputModels(), and ModelTransformer::m_detached.
Referenced by ModelTransformerFactory::transformMultiple().
virtual Models ModelTransformer::getAdditionalOutputModels | ( | ) | [inline, virtual, inherited] |
Return any additional models that were created during processing.
This might happen if, for example, a transform was configured to split a multi-bin output into separate single-bin models as it processed. These should not be queried until after the transform has completed.
Reimplemented in FeatureExtractionModelTransformer.
Definition at line 105 of file ModelTransformer.h.
Referenced by ModelTransformer::detachAdditionalOutputModels(), and ModelTransformer::~ModelTransformer().
virtual bool ModelTransformer::willHaveAdditionalOutputModels | ( | ) | [inline, virtual, inherited] |
Return true if the current transform is one that may produce additional models (to be retrieved through getAdditionalOutputModels above).
Reimplemented in FeatureExtractionModelTransformer.
Definition at line 112 of file ModelTransformer.h.
Referenced by ModelTransformerFactory::transformerFinished().
virtual Models ModelTransformer::detachAdditionalOutputModels | ( | ) | [inline, virtual, inherited] |
Return the set of additional models, also detaching them from the transformer.
The caller takes ownership of the models.
Definition at line 118 of file ModelTransformer.h.
References ModelTransformer::getAdditionalOutputModels(), and ModelTransformer::m_detachedAdd.
Referenced by ModelTransformerFactory::transformerFinished().
QString ModelTransformer::getMessage | ( | ) | const [inline, inherited] |
Return a warning or error message.
If getOutputModel returned a null pointer, this should contain a fatal error message for the transformer; otherwise it may contain a warning to show to the user about e.g. suboptimal block size or whatever.
Definition at line 129 of file ModelTransformer.h.
References ModelTransformer::m_message.
Referenced by ModelTransformerFactory::transformMultiple().
void Thread::start | ( | ) | [slot, inherited] |
Definition at line 34 of file Thread.cpp.
References Thread::m_type, and Thread::RTThread.
Referenced by DecodingWavFileReader::DecodingWavFileReader(), WaveFileModel::fillCache(), MP3FileReader::MP3FileReader(), OggVorbisFileReader::OggVorbisFileReader(), DSSIPluginInstance::requestNonRTThread(), FFTDataServer::resume(), FFTDataServer::FillThread::run(), and ModelTransformerFactory::transformMultiple().
QString RealTimeEffectModelTransformer::m_units [protected] |
Definition at line 34 of file RealTimeEffectModelTransformer.h.
Referenced by RealTimeEffectModelTransformer().
Definition at line 35 of file RealTimeEffectModelTransformer.h.
Referenced by RealTimeEffectModelTransformer(), run(), and ~RealTimeEffectModelTransformer().
int RealTimeEffectModelTransformer::m_outputNo [protected] |
Definition at line 36 of file RealTimeEffectModelTransformer.h.
Referenced by RealTimeEffectModelTransformer(), and run().
Transforms ModelTransformer::m_transforms [protected, inherited] |
Definition at line 135 of file ModelTransformer.h.
Referenced by FeatureExtractionModelTransformer::createOutputModels(), FeatureExtractionModelTransformer::initialise(), ModelTransformer::ModelTransformer(), RealTimeEffectModelTransformer(), run(), and FeatureExtractionModelTransformer::run().
Input ModelTransformer::m_input [protected, inherited] |
Definition at line 136 of file ModelTransformer.h.
Referenced by FeatureExtractionModelTransformer::addFeature(), FeatureExtractionModelTransformer::getFrames(), ModelTransformer::getInputChannel(), ModelTransformer::getInputModel(), run(), and FeatureExtractionModelTransformer::run().
Models ModelTransformer::m_outputs [protected, inherited] |
Definition at line 137 of file ModelTransformer.h.
Referenced by FeatureExtractionModelTransformer::createOutputModels(), FeatureExtractionModelTransformer::getConformingOutput(), ModelTransformer::getOutputModels(), FeatureExtractionModelTransformer::isOutput(), RealTimeEffectModelTransformer(), run(), and FeatureExtractionModelTransformer::run().
bool ModelTransformer::m_detached [protected, inherited] |
Definition at line 138 of file ModelTransformer.h.
Referenced by ModelTransformer::detachOutputModels(), and ModelTransformer::~ModelTransformer().
bool ModelTransformer::m_detachedAdd [protected, inherited] |
Definition at line 139 of file ModelTransformer.h.
Referenced by ModelTransformer::detachAdditionalOutputModels(), and ModelTransformer::~ModelTransformer().
bool ModelTransformer::m_abandoned [protected, inherited] |
Definition at line 140 of file ModelTransformer.h.
Referenced by ModelTransformer::abandon(), run(), FeatureExtractionModelTransformer::run(), and ModelTransformer::~ModelTransformer().
QString ModelTransformer::m_message [protected, inherited] |
Definition at line 141 of file ModelTransformer.h.
Referenced by ModelTransformer::getMessage(), FeatureExtractionModelTransformer::initialise(), and FeatureExtractionModelTransformer::run().