|
Photosine 0.5
|
#include <AudioPluginImageProcessorThread.h>
Public Member Functions | |
| AudioPluginImageProcessorThread (cv::Mat matToProcess, juce::ValueTree sourceValueTree, int channel, PluginPool::Reservation pooledPlugins, std::condition_variable *newCompletionCV) | |
| void | run () |
| bool | isFinished () |
| cv::Mat | getOutputMat () |
Private Member Functions | |
| void | processImageDataThroughPlugins () |
| void | preparePlugins () |
| void | releasePluginResources () |
| void | setPhotosineParameter (int pluginID) |
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPluginImageProcessorThread) | |
Private Attributes | |
| int | width = 10 |
| int | height = 10 |
| int | bufferSize = 10 |
| int | row = 0 |
| int | latencySamples = 0 |
| int | sampleRate = 44100 |
| int | extraRows = 0 |
| int | threadChannel = 0 |
| bool | currentlyRunning = true |
| std::mutex | currentlyRunningMutex |
| int | pluginLatency |
| cv::UMat | gpuMat |
| cv::Mat | imageToProcess |
| cv::Mat | outputMat |
| juce::MemoryBlock | settingsData |
| juce::MidiBuffer | midiMessages |
| juce::AudioBuffer< float > | processBuffer |
| juce::AudioBuffer< float > | newBuffer |
| juce::ValueTree | projectValueTree |
| juce::ValueTree | pluginsValueTree |
| PluginPool::Reservation | pooledPluginsReservation |
| juce::String | threadId |
| juce::OwnedArray< juce::AudioPluginInstance > * | referencedChannelArray |
| std::condition_variable * | completionCV |
Thread responsible for running processBlock() on all plugins, setting plugin parameters, transferring data from cv::Mat to juce::AudioBuffer, applying automation, etc.
| ImageProcessing::AudioPluginImageProcessorThread::AudioPluginImageProcessorThread | ( | cv::Mat | matToProcess, |
| juce::ValueTree | sourceValueTree, | ||
| int | channel, | ||
| PluginPool::Reservation | pooledPlugins, | ||
| std::condition_variable * | newCompletionCV ) |
| cv::Mat ImageProcessing::AudioPluginImageProcessorThread::getOutputMat | ( | ) |
Returns the completed image.
| bool ImageProcessing::AudioPluginImageProcessorThread::isFinished | ( | ) |
Returns true if thread has completed.
|
private |
|
private |
Sets plugins to the correct state as selected by the value tree, calls prepareToPlay(), setting sample rate and buffer size. Computes latency samples.
|
private |
Copies memory from imageToProcess into an audio buffer and sends data through plugin processors. The memory from the audio buffer is then copied into outputMat.
|
private |
Releases plugin resources so that stateful stuff doesn't end up in the next process. Prepares to release a PluginPool::PluginPoolReservation.
| void ImageProcessing::AudioPluginImageProcessorThread::run | ( | ) |
Starts processing image through plugins.
|
private |
Checks if a plugin is part of the Photosine plugin suite, sets necessary parameters if they exist. Called in preparePlugins().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |