Processor

Extension of ImageProcessor that allows to apply and remove adjustments on top of the incoming image input stream rendered to connected outputs.

Types

Link copied to clipboard

Convenience implementation of Processor that does nothing.

Link copied to clipboard

Defines the possible outcomes of the apply operation.

Functions

Link copied to clipboard
abstract fun <T : AdjustmentsComponent.Adjustment> apply(adjustment: T, callback: Consumer<AdjustmentsComponent.Processor.Result<T>> = Consumer {})

Attempts to apply the provided adjustment model. The operation is async with the result provided as Result.Applied or Result.Unavailable to the callback.

Link copied to clipboard
abstract fun available(adjustment: AdjustmentsComponent.Adjustment, callback: Consumer<Boolean>)

Checks whether the provided adjustment is available to the current client environment. The result of the async operation is success if adjustment is available, false otherwise. If adjustment is not available, calls to apply will always lead to a Result.Unavailable.

Link copied to clipboard

Connects the provided input to this processor and returns a Closeable to release the connection when required. Normally, processing of the provided input starts instantly however certain processors may do it async so it is not guaranteed that any work will be done as soon as input is connected.

Link copied to clipboard

Connects the provided output to this processor and returns a Closeable to release the connection when required. Similarly to connectInput, it is not guaranteed that the provided output will receive results as soon as it is connected, the processor may do it async.

Link copied to clipboard

Takes in onCapabilitiesRequested that will be notified when image processing operations require additional data from connected Input. Right after observeRequiredCapabilities is called onCapabilitiesRequested consumer will be invoked on the caller thread with the current set of required capabilities. emptySet is used to represent that additional capabilities aren't required.

Link copied to clipboard
abstract fun remove(adjustment: AdjustmentsComponent.Adjustment, callback: Consumer<Boolean> = Consumer {})

Removes the provided adjustment model, if applied. The result of the async operation is success if adjustment was removed or failure when there were was no Adjustment to be removed or operation failed to execute.

Inheritors

Link copied to clipboard