interface Camera : Closeable
state
: StateFlow<CameraState>
[Get] |
The current lifecycle state of this camera.
Starts at CameraState.STARTED once attached, and transitions through CameraState.STOPPING to CameraState.STOPPED when the camera or its owning session is stopped. CameraState.STARTING is reserved for a future consolidated startup lifecycle and is not currently emitted.
Signature
abstract val state: StateFlow<CameraState> |
stream
: Stream
[Get] |
The video streaming child feature, owned by this camera.
Use it to receive real-time camera frames. Its lifecycle is bound to this camera: stopping the camera stops the stream.
Signature
abstract val stream: Stream |
close
()
|
Signature
abstract override fun close() |
stop
()
|
Stops this camera and its child features, releasing resources and detaching from the parent session.
After calling Camera.stop, the camera is invalidated and cannot be reused. Calling Camera.stop on an already-stopped camera is a no-op. Camera.close delegates to Camera.stop for Closeable compatibility.
Signature
abstract fun stop() |