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
CameraConfigurationDart 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, aStream<CameraConfigProxy>satisfiesStream<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.
pixelsis 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, aStream<CameraFrameProxy>satisfiesStream<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, aStream<PhotoOptionsProxy>satisfiesStream<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, aStream<RecordingOptionsProxy>satisfiesStream<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, aStream<ResolvedConfigProxy>satisfiesStream<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.
Extensions
- AutoFocusModeFromNativeExt on int
- AutoFocusModeNativeExt on AutoFocusMode
- CameraConfigExt on CameraConfig
- CameraConfigFfiExt on CameraConfigFfi
- CameraDeviceRecordExt on CameraDevice
- CameraEventRecordExt on CameraEvent
- CameraEventTypeFromNativeExt on int
- CameraEventTypeNativeExt on CameraEventType
- CameraFrameExt on CameraFrame
- CameraFrameFfiExt on CameraFrameFfi
- CameraLensTypeFromNativeExt on int
- CameraLensTypeNativeExt on CameraLensType
- CameraPositionFromNativeExt on int
- CameraPositionNativeExt on CameraPosition
- FlashModeFromNativeExt on int
- FlashModeNativeExt on FlashMode
- InterruptionReasonFromNativeExt on int
- InterruptionReasonNativeExt on InterruptionReason
- NitroCameraNativeRef on NitroCamera
- PermissionStatusFromNativeExt on int
- PermissionStatusNativeExt on PermissionStatus
- PhotoOptionsExt on PhotoOptions
- PhotoOptionsFfiExt on PhotoOptionsFfi
- PhotoResultRecordExt on PhotoResult
- QualityPrioritizationFromNativeExt on int
- QualityPrioritizationNativeExt on QualityPrioritization
- RecordingOptionsExt on RecordingOptions
- RecordingOptionsFfiExt on RecordingOptionsFfi
- RecordingResultRecordExt on RecordingResult
- ResolvedConfigExt on ResolvedConfig
- ResolvedConfigFfiExt on ResolvedConfigFfi
- VideoCodecFromNativeExt on int
- VideoCodecNativeExt on VideoCodec
- VideoFileTypeFromNativeExt on int
- VideoFileTypeNativeExt on VideoFileType
- VideoStabilizationModeFromNativeExt on int
- VideoStabilizationModeNativeExt on VideoStabilizationMode