native library

The low-level FFI boundary of nitro_camera — the raw NitroCamera hybrid module, the FFI structs/records (CameraConfig, PhotoOptions, …), and the generated nativeValue/fromNative codec extensions.

Import this only for advanced use: calling the module directly, injecting a fake NitroCamera into OrientationManager/CameraDevicesObserver, or custom bridging. Stability tracks the generated nitro bridge, not this package's semver — symbols here can change whenever the spec or the generator changes. Everyday code should only need package:nitro_camera/nitro_camera.dart.

Classes

CameraConfig
A bundle of live camera settings applied atomically to an already-open session via NitroCamera.configure. This is the FFI struct behind the declarative CameraConfiguration Dart API: numeric/boolean only, so it crosses the boundary by value at zero serialization cost. Device / format / fps / audio changes still go through NitroCamera.openCamera (a reopen).
CameraConfigFfi
CameraConfigProxy
Zero-copy proxy for CameraConfig. Extends CameraConfig and overrides every getter to read lazily from native memory — no field is copied at construction time. Because CameraConfigProxy <: CameraConfig, a Stream<CameraConfigProxy> satisfies Stream<CameraConfig> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_CameraConfig'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
CameraDevice
Describes a physical camera device available on the hardware.
CameraEvent
A lifecycle / error event emitted by a camera session on NitroCamera.eventStream.
CameraFrame
A raw camera frame emitted by the frame-processing stream. pixels is a zero-copy view into the native camera buffer (BGRA / RGBA). Process the frame synchronously inside the stream listener; do NOT hold a reference past that point.
CameraFrameFfi
CameraFrameProxy
Zero-copy proxy for CameraFrame. Extends CameraFrame and overrides every getter to read lazily from native memory — no field is copied at construction time. Because CameraFrameProxy <: CameraFrame, a Stream<CameraFrameProxy> satisfies Stream<CameraFrame> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_CameraFrame'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
NitroCamera
The main NitroCamera hybrid module.
PhotoOptions
Per-capture options for NitroCamera.takePhotoWithOptions.
PhotoOptionsFfi
PhotoOptionsProxy
Zero-copy proxy for PhotoOptions. Extends PhotoOptions and overrides every getter to read lazily from native memory — no field is copied at construction time. Because PhotoOptionsProxy <: PhotoOptions, a Stream<PhotoOptionsProxy> satisfies Stream<PhotoOptions> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_PhotoOptions'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
PhotoResult
Result returned after a photo is captured.
RecordingOptions
Per-recording options for NitroCamera.startVideoRecording.
RecordingOptionsFfi
RecordingOptionsProxy
Zero-copy proxy for RecordingOptions. Extends RecordingOptions and overrides every getter to read lazily from native memory — no field is copied at construction time. Because RecordingOptionsProxy <: RecordingOptions, a Stream<RecordingOptionsProxy> satisfies Stream<RecordingOptions> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_RecordingOptions'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.
RecordingResult
Result returned after a video recording is stopped.
ResolvedConfig
The configuration the native session actually applied — the read-back that mirrors vision-camera's onSessionConfigSelected. Returned by NitroCamera.configure.
ResolvedConfigFfi
ResolvedConfigProxy
Zero-copy proxy for ResolvedConfig. Extends ResolvedConfig and overrides every getter to read lazily from native memory — no field is copied at construction time. Because ResolvedConfigProxy <: ResolvedConfig, a Stream<ResolvedConfigProxy> satisfies Stream<ResolvedConfig> via Dart covariant generics. Native memory is freed via a NativeFinalizer backed by the generated C symbol 'nitro_camera_release_ResolvedConfig'. Ownership: this proxy owns the generated struct shell. Zero-copy field buffers remain owned by the native implementation and must stay valid until this proxy is released by the finalizer or toDartAndRelease.

Enums

AutoFocusMode
Auto-focus behaviour.
CameraEventType
Kind of CameraEvent delivered on NitroCamera.eventStream.
CameraLensType
The optical lens type of the camera.
CameraPosition
Which physical side of the device the camera faces.
FlashMode
Flash / torch mode.
InterruptionReason
Why the camera session was interrupted (mirrors AVFoundation reasons).
PermissionStatus
Camera permission status.
QualityPrioritization
Photo capture speed-vs-quality tradeoff.
VideoCodec
Video compression codec for recording.
VideoFileType
Container/file type for recorded video.
VideoStabilizationMode
Video stabilization mode applied to the capture pipeline.