# ArCameraConfigFilter

Filters available camera configurations.

## Summary

| ### Enumerations ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigdepthsensorusage{ https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#ar_camera_config_depth_sensor_usage_require_and_use = 0x0001, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#ar_camera_config_depth_sensor_usage_do_not_use = 0x0002 }` | enumDepth sensor usage. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigstereocamerausage{ https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#ar_camera_config_stereo_camera_usage_require_and_use = 0x0001, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#ar_camera_config_stereo_camera_usage_do_not_use = 0x0002 }` | enumStereo camera usage. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigtargetfps{ https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#ar_camera_config_target_fps_30 = 0x0001, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#ar_camera_config_target_fps_60 = 0x0002 }` | enumTarget camera capture frame rates. |

| ### Typedefs ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter` | typedef `struct ArCameraConfigFilter_` A camera config filter struct contains the filters that are desired by the application. |

| ### Functions ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_create(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter **out_filter)` | `void` Creates a camera config filter object. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_destroy(https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter)` | `void` Releases memory used by the provided camera config filter object. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_getdepthsensorusage(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, uint32_t *out_depth_sensor_usage)` | `void` Gets the desired depth sensor usages to allow. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_getfacingdirection(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfigfacingdirection *out_facing_direction_filter)` | `void` Gets the desired camera facing direction to allow. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_getstereocamerausage(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, uint32_t *out_stereo_camera_usage)` | `void` Get the stereo multi-camera (<https://source.android.com/devices/camera/multi-camera>) usage filter state. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_gettargetfps(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, uint32_t *out_fps_filters)` | `void` Gets the desired framerates to allow. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setdepthsensorusage(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, uint32_t depth_sensor_usage_filters)` | `void` Sets the desired depth sensor usages to allow. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setfacingdirection(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfigfacingdirection facing_direction_filter)` | `void` Sets the desired camera facing direction to allow. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setstereocamerausage(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, uint32_t stereo_camera_usage_filters)` | `void` Sets the stereo multi-camera (<https://source.android.com/devices/camera/multi-camera>) usage filter. |
| `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_settargetfps(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter *filter, uint32_t fps_filters)` | `void` Sets the desired framerates to allow. |

## Enumerations

### ArCameraConfigDepthSensorUsage

```
 ArCameraConfigDepthSensorUsage
```
Depth sensor usage.

| Properties ||
|---|---|
| `AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_DO_NOT_USE` | When used as a camera filter, via `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setdepthsensorusage`, filters for camera configs where a depth sensor is not present, or is present but will not be used by ARCore. Most commonly used to filter camera configurations when the app requires exclusive access to the depth sensor outside of ARCore, for example to support 3D mesh reconstruction. Available on all ARCore supported devices. When returned by `https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfig_getdepthsensorusage`, indicates that the camera config will not use a depth sensor, even if it is present. |
| `AR_CAMERA_CONFIG_DEPTH_SENSOR_USAGE_REQUIRE_AND_USE` | When used as a camera filter, via `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setdepthsensorusage`, filters for camera configs that require a depth sensor to be present on the device, and that will be used by ARCore. See the ARCore supported devices (<https://developers.google.com/ar/devices>) page for a list of devices that currently have supported depth sensors. When returned by `https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfig_getdepthsensorusage`, indicates that a depth sensor is present, and that the camera config will use the available depth sensor. |

### ArCameraConfigStereoCameraUsage

```
 ArCameraConfigStereoCameraUsage
```
Stereo camera usage.

| Properties ||
|---|---|
| `AR_CAMERA_CONFIG_STEREO_CAMERA_USAGE_DO_NOT_USE` | When used as a camera filter, via `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setstereocamerausage`, indicates that ARCore will not attempt to use a stereo multi-camera (<https://source.android.com/devices/camera/multi-camera>), even if one is present. Can be used to limit power consumption. Available on all ARCore supported devices. When returned by `https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfig_getstereocamerausage`, indicates that the camera config will not use a stereo camera, even if one is present on the device. |
| `AR_CAMERA_CONFIG_STEREO_CAMERA_USAGE_REQUIRE_AND_USE` | When used as a camera filter, via `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_setstereocamerausage`, indicates that a stereo camera must be present on the device, and the stereo multi-camera (<https://source.android.com/devices/camera/multi-camera>) must be used by ARCore. Increases CPU and device power consumption. Not supported on all devices. See the ARCore supported devices (<https://developers.google.com/ar/devices>) page for a list of devices that currently have supported stereo camera capability. When returned by `https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfig_getstereocamerausage`, indicates that a stereo camera is present on the device and that the camera config will use the available stereo camera. |

### ArCameraConfigTargetFps

```
 ArCameraConfigTargetFps
```
Target camera capture frame rates.

The target frame rate represents the maximum or desired frame rate. Actual camera capture frame rates can be lower than the target frame rate under low light conditions in order to accommodate longer exposure times.

| Properties ||
|---|---|
| `AR_CAMERA_CONFIG_TARGET_FPS_30` | Target 30fps camera capture frame rate. Available on all ARCore supported devices. Used as a camera filter, via `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_settargetfps`. |
| `AR_CAMERA_CONFIG_TARGET_FPS_60` | Target 60fps camera capture frame rate. Increases power consumption and may increase app memory usage. See the ARCore supported devices (<https://developers.google.com/ar/devices>) page for a list of devices that currently support 60fps. Used as a camera filter, via `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_settargetfps`. |

## Typedefs

### ArCameraConfigFilter

```
struct ArCameraConfigFilter_ ArCameraConfigFilter
```
A camera config filter struct contains the filters that are desired by the application.

([value type](https://developers.google.com/ar/reference/c/group/concepts#object-ownership)).


- Create with: `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_create`
- Release with: `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter_destroy`

<br />

## Functions

### ArCameraConfigFilter_create

```
void ArCameraConfigFilter_create(
  const ArSession *session,
  ArCameraConfigFilter **out_filter
)
```
Creates a camera config filter object.


Details Parameters `session` The ARCore session `out_filter` A pointer to an `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter*` to receive the address of the newly allocated `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigfilter`

### ArCameraConfigFilter_destroy

```
void ArCameraConfigFilter_destroy(
  ArCameraConfigFilter *filter
)
```
Releases memory used by the provided camera config filter object.


Details Parameters `filter` The filter to release memory for.

### ArCameraConfigFilter_getDepthSensorUsage

```
void ArCameraConfigFilter_getDepthSensorUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t *out_depth_sensor_usage
)
```
Gets the desired depth sensor usages to allow.


Details Parameters `session` The ARCore session `filter` The filter object to query `out_depth_sensor_usage` To be filled in with the desired depth sensor usages allowed

### ArCameraConfigFilter_getFacingDirection

```
void ArCameraConfigFilter_getFacingDirection(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  ArCameraConfigFacingDirection *out_facing_direction_filter
)
```
Gets the desired camera facing direction to allow.


Details Parameters `session` The ARCore session `filter` The filter object to query `out_facing_direction_filter` To be filled in with the desired camera facing direction allowed

### ArCameraConfigFilter_getStereoCameraUsage

```
void ArCameraConfigFilter_getStereoCameraUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t *out_stereo_camera_usage
)
```
Get the stereo multi-camera (<https://source.android.com/devices/camera/multi-camera>) usage filter state.


Details Parameters `session` The ARCore session `filter` The filter object to query `out_stereo_camera_usage` To be filled in with the desired stereo camera usages allowed

### ArCameraConfigFilter_getTargetFps

```
void ArCameraConfigFilter_getTargetFps(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t *out_fps_filters
)
```
Gets the desired framerates to allow.


Details Parameters `session` The ARCore session `filter` The filter object to query `out_fps_filters` To be filled in with the desired framerates allowed

### ArCameraConfigFilter_setDepthSensorUsage

```
void ArCameraConfigFilter_setDepthSensorUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t depth_sensor_usage_filters
)
```
Sets the desired depth sensor usages to allow.


Details Parameters `session` The ARCore session `filter` The filter object to change `depth_sensor_usage_filters` A 32bit integer representing multiple `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigdepthsensorusage` values, bitwise-or'd together

### ArCameraConfigFilter_setFacingDirection

```
void ArCameraConfigFilter_setFacingDirection(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  ArCameraConfigFacingDirection facing_direction_filter
)
```
Sets the desired camera facing direction to allow.


Details Parameters `session` The ARCore session `filter` The filter object to change `facing_direction_filter` A valid `https://developers.google.com/ar/reference/c/group/ar-camera-config#arcameraconfigfacingdirection` enum value

### ArCameraConfigFilter_setStereoCameraUsage

```
void ArCameraConfigFilter_setStereoCameraUsage(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t stereo_camera_usage_filters
)
```
Sets the stereo multi-camera (<https://source.android.com/devices/camera/multi-camera>) usage filter.

Default is to not filter.


Details Parameters `session` The ARCore session `filter` The filter object to change `stereo_camera_usage_filters` A 32bit integer representing multiple `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigstereocamerausage` values, bitwise-or'd together

### ArCameraConfigFilter_setTargetFps

```
void ArCameraConfigFilter_setTargetFps(
  const ArSession *session,
  ArCameraConfigFilter *filter,
  uint32_t fps_filters
)
```
Sets the desired framerates to allow.


Details Parameters `session` The ARCore session `filter` The filter object to change `fps_filters` A 32bit integer representing multiple `https://developers.google.com/ar/reference/c/group/ar-camera-config-filter#arcameraconfigtargetfps` values, bitwise-or'd together