Session

interface Session : Closeable

Entry point to all CameraKit features. To obtain Session implementations must provide methods to get a new instance of Builder which exposes options to customize Session instance once it is built by calling Builder.build. Once done using an instance of Session, Session.close must be called to avoid leaking resources.

Types

Link copied to clipboard
interface Builder
Link copied to clipboard
object Companion

Provides a way for implementations to attach static extension functions to the Session interface for better discoverability. It is expected that implementation will extend this object with methods to instantiate a Builder and similar.

Link copied to clipboard

Functions

Link copied to clipboard
abstract override fun close()

Closes all resources allocated for this Session. Overridden to indicate that calling close will not throw.

Properties

Link copied to clipboard

Provides an AdjustmentsComponent that contains all accessible features of adjustments. The returned AdjustmentsComponent can be closed to release resources however it is not necessary to do it explicitly as calling Session.close will also close the underlying AdjustmentsComponent.

Link copied to clipboard
abstract val lenses: LensesComponent

Provides a LensesComponent that contains all accessible features of lenses. The returned LensesComponent can be closed to release resources however it is not necessary to do it explicitly as calling Session.close will also close the underlying LensesComponent.

Link copied to clipboard

Provides a Processor to run this Session's image, audio and other data processing operations over a connected input with the results observed through any connected outputs. If no input is connected then it is expected that certain Session features such as lenses will produce no results as they require continuous input frames to process and produce output frames.