# NativeCameraSession

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media-camera/trait-nativecamerasession/

**trait** · [`ferroui-media-camera`](/docs/0.5.0/api/ferroui-media-camera/) · v0.5.0

```rust
trait NativeCameraSession
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L149)

## Members

- [`platform_context`](#function-platform_context)
- [`settings`](#function-settings)
- [`take_frame`](#function-take_frame)
- [`photo`](#function-photo)
- [`supports_video_recording`](#function-supports_video_recording)
- [`start_recording`](#function-start_recording)
- [`set_control`](#function-set_control)
- [`stop`](#function-stop)

<a id="function-platform_context"></a>

### platform_context

```rust
fn platform_context(self: &Self) -> Option<&dyn std::any::Any>
```

Optional narrow platform extension (for example an analysis stream).
Borrowing it never transfers ownership of the camera session.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L152)

<a id="function-settings"></a>

### settings

```rust
fn settings(self: &Self) -> CameraSettings
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L155)

<a id="function-take_frame"></a>

### take_frame

```rust
fn take_frame(self: &Self) -> Result<Option<FrameLease>, CameraError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L156)

<a id="function-photo"></a>

### photo

```rust
fn photo(self: &Self) -> CameraFuture<CameraPhoto>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L157)

<a id="function-supports_video_recording"></a>

### supports_video_recording

```rust
fn supports_video_recording(self: &Self) -> bool
```

Silent video recording is optional and separately advertised. Preview or
still support alone must never enable a Record button.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L160)

<a id="function-start_recording"></a>

### start_recording

```rust
fn start_recording(self: &Self) -> CameraFuture<Rc<dyn NativeCameraRecording>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L163)

<a id="function-set_control"></a>

### set_control

```rust
fn set_control(self: &Self, control: CameraControl) -> Result<(), CameraError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L171)

<a id="function-stop"></a>

### stop

```rust
fn stop(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Camera/lib.rs#L172)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
