Photosine 0.5
Loading...
Searching...
No Matches
ImageProcessing::AudioPluginImageProcessorThread Class Reference

#include <AudioPluginImageProcessorThread.h>

Inheritance diagram for ImageProcessing::AudioPluginImageProcessorThread:

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

Detailed Description

Thread responsible for running processBlock() on all plugins, setting plugin parameters, transferring data from cv::Mat to juce::AudioBuffer, applying automation, etc.

Constructor & Destructor Documentation

◆ AudioPluginImageProcessorThread()

ImageProcessing::AudioPluginImageProcessorThread::AudioPluginImageProcessorThread ( cv::Mat matToProcess,
juce::ValueTree sourceValueTree,
int channel,
PluginPool::Reservation pooledPlugins,
std::condition_variable * newCompletionCV )

Member Function Documentation

◆ getOutputMat()

cv::Mat ImageProcessing::AudioPluginImageProcessorThread::getOutputMat ( )

Returns the completed image.

◆ isFinished()

bool ImageProcessing::AudioPluginImageProcessorThread::isFinished ( )

Returns true if thread has completed.

◆ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR()

ImageProcessing::AudioPluginImageProcessorThread::JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR ( AudioPluginImageProcessorThread )
private

◆ preparePlugins()

void ImageProcessing::AudioPluginImageProcessorThread::preparePlugins ( )
private

Sets plugins to the correct state as selected by the value tree, calls prepareToPlay(), setting sample rate and buffer size. Computes latency samples.

◆ processImageDataThroughPlugins()

void ImageProcessing::AudioPluginImageProcessorThread::processImageDataThroughPlugins ( )
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.

◆ releasePluginResources()

void ImageProcessing::AudioPluginImageProcessorThread::releasePluginResources ( )
private

Releases plugin resources so that stateful stuff doesn't end up in the next process. Prepares to release a PluginPool::PluginPoolReservation.

◆ run()

void ImageProcessing::AudioPluginImageProcessorThread::run ( )

Starts processing image through plugins.

◆ setPhotosineParameter()

void ImageProcessing::AudioPluginImageProcessorThread::setPhotosineParameter ( int pluginID)
private

Checks if a plugin is part of the Photosine plugin suite, sets necessary parameters if they exist. Called in preparePlugins().

Member Data Documentation

◆ bufferSize

int ImageProcessing::AudioPluginImageProcessorThread::bufferSize = 10
private

◆ completionCV

std::condition_variable* ImageProcessing::AudioPluginImageProcessorThread::completionCV
private

◆ currentlyRunning

bool ImageProcessing::AudioPluginImageProcessorThread::currentlyRunning = true
private

◆ currentlyRunningMutex

std::mutex ImageProcessing::AudioPluginImageProcessorThread::currentlyRunningMutex
private

◆ extraRows

int ImageProcessing::AudioPluginImageProcessorThread::extraRows = 0
private

◆ gpuMat

cv::UMat ImageProcessing::AudioPluginImageProcessorThread::gpuMat
private

◆ height

int ImageProcessing::AudioPluginImageProcessorThread::height = 10
private

◆ imageToProcess

cv::Mat ImageProcessing::AudioPluginImageProcessorThread::imageToProcess
private

◆ latencySamples

int ImageProcessing::AudioPluginImageProcessorThread::latencySamples = 0
private

◆ midiMessages

juce::MidiBuffer ImageProcessing::AudioPluginImageProcessorThread::midiMessages
private

◆ newBuffer

juce::AudioBuffer<float> ImageProcessing::AudioPluginImageProcessorThread::newBuffer
private

◆ outputMat

cv::Mat ImageProcessing::AudioPluginImageProcessorThread::outputMat
private

◆ pluginLatency

int ImageProcessing::AudioPluginImageProcessorThread::pluginLatency
private

◆ pluginsValueTree

juce::ValueTree ImageProcessing::AudioPluginImageProcessorThread::pluginsValueTree
private

◆ pooledPluginsReservation

PluginPool::Reservation ImageProcessing::AudioPluginImageProcessorThread::pooledPluginsReservation
private

◆ processBuffer

juce::AudioBuffer<float> ImageProcessing::AudioPluginImageProcessorThread::processBuffer
private

◆ projectValueTree

juce::ValueTree ImageProcessing::AudioPluginImageProcessorThread::projectValueTree
private

◆ referencedChannelArray

juce::OwnedArray<juce::AudioPluginInstance>* ImageProcessing::AudioPluginImageProcessorThread::referencedChannelArray
private

◆ row

int ImageProcessing::AudioPluginImageProcessorThread::row = 0
private

◆ sampleRate

int ImageProcessing::AudioPluginImageProcessorThread::sampleRate = 44100
private

◆ settingsData

juce::MemoryBlock ImageProcessing::AudioPluginImageProcessorThread::settingsData
private

◆ threadChannel

int ImageProcessing::AudioPluginImageProcessorThread::threadChannel = 0
private

◆ threadId

juce::String ImageProcessing::AudioPluginImageProcessorThread::threadId
private

◆ width

int ImageProcessing::AudioPluginImageProcessorThread::width = 10
private

The documentation for this class was generated from the following files: