# ArRecordingConfig

Session recording management.

## Summary

| ### Enumerations ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arplaybackstatus{ https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_playback_none = 0, https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_playback_ok = 1, https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_playback_io_error = 2, https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_playback_finished = 3 }` | enumDescribe the current playback status. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingstatus{ https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_recording_none = 0, https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_recording_ok = 1, https://developers.google.com/ar/reference/c/group/ar-recording-config#ar_recording_io_error = 2 }` | enumDescribe the current recording status. |

| ### Typedefs ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig` | typedef `struct ArRecordingConfig_` A recording config struct that contains the config to set the recorder. |

| ### Functions ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_addtrack(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, const https://developers.google.com/ar/reference/c/group/ar-track#artrack *track)` | `void` Configures and adds a track. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_create(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig **out_config)` | `void` Creates a dataset recording config object. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_destroy(https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config)` | `void` Releases memory used by the provided recording config object. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_getautostoponpause(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, const https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, int32_t *out_config_enabled)` | `void` Gets the setting that indicates whether the recording should stop automatically when the ARCore session is paused. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_getmp4datasetfilepath(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, const https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, char **out_mp4_dataset_file_path)` | `void` **[Deprecated.](https://developers.google.com/ar/reference/c/deprecated/deprecated)** Deprecated in release 1.26.0. Use `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_getmp4dataseturi` instead. Gets the file path to save an MP4 dataset file for the recording. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_getmp4dataseturi(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, const https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, char **out_mp4_dataset_uri)` | `void` Gets the URI that the MP4 dataset will be recorded to. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_getrecordingrotation(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, const https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, int32_t *out_recording_rotation)` | `void` Gets the clockwise rotation in degrees that should be applied to the recorded image. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setautostoponpause(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, int32_t config_enabled)` | `void` Specifies whether recording should stop automatically when the ARCore session is paused. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setmp4datasetfilepath(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, const char *mp4_dataset_file_path)` | `void` **[Deprecated.](https://developers.google.com/ar/reference/c/deprecated/deprecated)** Deprecated in release 1.26.0. Use `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setmp4dataseturi` instead. Sets the file path to save an MP4 dataset file for the recording. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setmp4dataseturi(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, const char *mp4_dataset_uri)` | `void` Sets the file path to save an MP4 dataset file for the recording. |
| `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setrecordingrotation(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig *config, int32_t recording_rotation)` | `void` Specifies the clockwise rotation in degrees that should be applied to the recorded image. |

## Enumerations

### ArPlaybackStatus

```
 ArPlaybackStatus
```
Describe the current playback status.

| Properties ||
|---|---|
| `AR_PLAYBACK_FINISHED` | Playback has finished successfully. |
| `AR_PLAYBACK_IO_ERROR` | Playback has stopped due to an error. |
| `AR_PLAYBACK_NONE` | The session is not playing back an MP4 dataset file. |
| `AR_PLAYBACK_OK` | Playback is in process without issues. |

### ArRecordingStatus

```
 ArRecordingStatus
```
Describe the current recording status.

| Properties ||
|---|---|
| `AR_RECORDING_IO_ERROR` | The dataset recorder encountered an error while recording. |
| `AR_RECORDING_NONE` | The dataset recorder is not recording. |
| `AR_RECORDING_OK` | The dataset recorder is recording normally. |

## Typedefs

### ArRecordingConfig

```
struct ArRecordingConfig_ ArRecordingConfig
```
A recording config struct that contains the config to set the recorder.

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


- Create with: `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_create`
- Release with: `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_destroy`

<br />

## Functions

### ArRecordingConfig_addTrack

```
void ArRecordingConfig_addTrack(
  const ArSession *session,
  ArRecordingConfig *config,
  const ArTrack *track
)
```
Configures and adds a track.


Details Parameters `session` The ARCore session `config` The `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig` object to change `track` The `https://developers.google.com/ar/reference/c/group/ar-track#artrack` being added to the recording config

### ArRecordingConfig_create

```
void ArRecordingConfig_create(
  const ArSession *session,
  ArRecordingConfig **out_config
)
```
Creates a dataset recording config object.


Details Parameters `session` The ARCore session `out_config` Pointer to an `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig*` to receive the address of the newly allocated `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig`

### ArRecordingConfig_destroy

```
void ArRecordingConfig_destroy(
  ArRecordingConfig *config
)
```
Releases memory used by the provided recording config object.


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

### ArRecordingConfig_getAutoStopOnPause

```
void ArRecordingConfig_getAutoStopOnPause(
  const ArSession *session,
  const ArRecordingConfig *config,
  int32_t *out_config_enabled
)
```
Gets the setting that indicates whether the recording should stop automatically when the ARCore session is paused.


Details Parameters `session` The ARCore session `config` The config object to query `out_config_enabled` To be filled in with the state used (1 for enabled, 0 for disabled)

### ArRecordingConfig_getMp4DatasetFilePath

```
void ArRecordingConfig_getMp4DatasetFilePath(
  const ArSession *session,
  const ArRecordingConfig *config,
  char **out_mp4_dataset_file_path
)
```
Gets the file path to save an MP4 dataset file for the recording.

This will be null if `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setmp4dataseturi` was used to set the output.

**[Deprecated.](https://developers.google.com/ar/reference/c/deprecated/deprecated)** Deprecated in release 1.26.0. Use `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_getmp4dataseturi` instead.
Details Parameters `session` The ARCore session `config` The config object to query `out_mp4_dataset_file_path` Pointer to an `char*` to receive the address of the newly allocated file path.

### ArRecordingConfig_getMp4DatasetUri

```
void ArRecordingConfig_getMp4DatasetUri(
  const ArSession *session,
  const ArRecordingConfig *config,
  char **out_mp4_dataset_uri
)
```
Gets the URI that the MP4 dataset will be recorded to.

This will be null if `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setmp4datasetfilepath` was used to set the output.


Details Parameters `session` The ARCore session `config` The config object to query `out_mp4_dataset_uri` Pointer to a `char*` to receive the address of the newly allocated URI.

### ArRecordingConfig_getRecordingRotation

```
void ArRecordingConfig_getRecordingRotation(
  const ArSession *session,
  const ArRecordingConfig *config,
  int32_t *out_recording_rotation
)
```
Gets the clockwise rotation in degrees that should be applied to the recorded image.


Details Parameters `session` The ARCore session `config` The config object to query `out_recording_rotation` To be filled in with the clockwise rotation in degrees (0, 90, 180, 270, or -1 for unspecified)

### ArRecordingConfig_setAutoStopOnPause

```
void ArRecordingConfig_setAutoStopOnPause(
  const ArSession *session,
  ArRecordingConfig *config,
  int32_t config_enabled
)
```
Specifies whether recording should stop automatically when the ARCore session is paused.


Details Parameters `session` The ARCore session `config` The config object to change `config_enabled` Desired state (1 to enable, 0 to disable)

### ArRecordingConfig_setMp4DatasetFilePath

```
void ArRecordingConfig_setMp4DatasetFilePath(
  const ArSession *session,
  ArRecordingConfig *config,
  const char *mp4_dataset_file_path
)
```
Sets the file path to save an MP4 dataset file for the recording.

**[Deprecated.](https://developers.google.com/ar/reference/c/deprecated/deprecated)** Deprecated in release 1.26.0. Use `https://developers.google.com/ar/reference/c/group/ar-recording-config#arrecordingconfig_setmp4dataseturi` instead.
Details Parameters `session` The ARCore session `config` The config object to change `mp4_dataset_file_path` A string representing the file path

### ArRecordingConfig_setMp4DatasetUri

```
void ArRecordingConfig_setMp4DatasetUri(
  const ArSession *session,
  ArRecordingConfig *config,
  const char *mp4_dataset_uri
)
```
Sets the file path to save an MP4 dataset file for the recording.

The URI must be able to be opened as a file descriptor for reading and writing that supports `lseek` or `https://developers.google.com/ar/reference/c/group/shared-types#ar_error_invalid_argument` will be returned when `https://developers.google.com/ar/reference/c/group/ar-session#arsession_startrecording` is called.


Details Parameters `session` The ARCore session `config` The config object to change `mp4_dataset_uri` The percent encoded, null terminated, URI to write data to.

### ArRecordingConfig_setRecordingRotation

```
void ArRecordingConfig_setRecordingRotation(
  const ArSession *session,
  ArRecordingConfig *config,
  int32_t recording_rotation
)
```
Specifies the clockwise rotation in degrees that should be applied to the recorded image.


Details Parameters `session` The ARCore session `config` The config object to change `recording_rotation` The clockwise rotation in degrees (0, 90, 180, or 270).