EnhancementSession

interface EnhancementSession


An enhancement session.

Manages the necessary Surface to receive input frames from the app and send the enhanced frames to a Surface provided by the app.

Summary

Public functions

Surface

Returns the input surface for the session.

Unit
process(
    bitmap: Bitmap,
    options: EnhancementOptions,
    callback: EnhancementCallback
)

Processes a bitmap.

Unit

Releases this session, freeing up resources.

Unit
setOutputSurface(
    surface: Surface,
    options: EnhancementOptions,
    callback: EnhancementCallback
)

Sets the output surface for the session.

Public functions

getInputSurface

fun getInputSurface(): Surface

Returns the input surface for the session.

Returns
Surface

The surface to receive input frames to during the session.

process

fun process(
    bitmap: Bitmap,
    options: EnhancementOptions,
    callback: EnhancementCallback
): Unit

Processes a bitmap.

Parameters
bitmap: Bitmap

The bitmap to process.

options: EnhancementOptions

The options for the session.

callback: EnhancementCallback

The callback for frame processing during the session.

release

fun release(): Unit

Releases this session, freeing up resources.

The session should no longer be used once released.

setOutputSurface

fun setOutputSurface(
    surface: Surface,
    options: EnhancementOptions,
    callback: EnhancementCallback
): Unit

Sets the output surface for the session.

Parameters
surface: Surface

The surface the enhanced frames are sent to during the session.

options: EnhancementOptions

The options for the session.

callback: EnhancementCallback

The callback for frame processing during the session.