# CameraSession

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media-camera/struct-camerasession/

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

```rust
struct CameraSession
```



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

## Members

- [`platform_context`](#function-platform_context)
- [`downgrade`](#function-downgrade)
- [`is_stopped`](#function-is_stopped)
- [`settings`](#function-settings)
- [`frames`](#function-frames)
- [`poll`](#function-poll)
- [`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<T: std::any::Any>(self: &Self) -> Option<&T>
```



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

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

### downgrade

```rust
fn downgrade(self: &Self) -> WeakCameraSession
```



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

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

### is_stopped

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



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

<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#L388)

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

### frames

```rust
fn frames(self: &Self) -> Arc<FrameMailbox>
```



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

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

### poll

```rust
fn poll(self: &Self) -> Result<(), CameraError>
```



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

<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#L411)

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

### supports_video_recording

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



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

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

### start_recording

```rust
fn start_recording(self: &Self) -> CameraFuture<CameraRecording>
```

Begins one silent native recording. Dropping preparation cancels it;
stopping the camera invalidates both recording and its encoded result.

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

<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#L471)

<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#L494)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`

## Availability

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