# ArTrack

External data recording.

## Summary

| ### Typedefs ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-track#artrack` | typedef `struct ArTrack_` A track recording configuration struct of type data. |

| ### Functions ||
|---|---|
| `https://developers.google.com/ar/reference/c/group/ar-track#artrack_create(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-track#artrack **out_track)` | `void` Initializes an `https://developers.google.com/ar/reference/c/group/ar-track#artrack`. |
| `https://developers.google.com/ar/reference/c/group/ar-track#artrack_destroy(https://developers.google.com/ar/reference/c/group/ar-track#artrack *track)` | `void` Releases memory used by the provided data track config object. |
| `https://developers.google.com/ar/reference/c/group/ar-track#artrack_setid(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-track#artrack *track, const uint8_t *track_id_uuid_16)` | `void` Sets the Track Id. |
| `https://developers.google.com/ar/reference/c/group/ar-track#artrack_setmetadata(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-track#artrack *track, const uint8_t *track_metadata_buffer, size_t track_metadata_buffer_size)` | `void` Sets the Track Metadata. |
| `https://developers.google.com/ar/reference/c/group/ar-track#artrack_setmimetype(const https://developers.google.com/ar/reference/c/group/ar-session#arsession *session, https://developers.google.com/ar/reference/c/group/ar-track#artrack *track, const char *mime_type)` | `void` Sets the MIME type for the Data Track. |

## Typedefs

### ArTrack

```
struct ArTrack_ ArTrack
```
A track recording configuration struct of type data.

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


- Create with: `https://developers.google.com/ar/reference/c/group/ar-track#artrack_create`
- Release with: `https://developers.google.com/ar/reference/c/group/ar-track#artrack_destroy`

<br />

## Functions

### ArTrack_create

```
void ArTrack_create(
  const ArSession *session,
  ArTrack **out_track
)
```
Initializes an `https://developers.google.com/ar/reference/c/group/ar-track#artrack`.


| Details ||
|---|---|
| Parameters | |---|---| | `session` | The ARCore session | | `out_track` | Pointer to an `https://developers.google.com/ar/reference/c/group/ar-track#artrack` to receive the address of the newly allocated `https://developers.google.com/ar/reference/c/group/ar-track#artrack` | |

### ArTrack_destroy

```
void ArTrack_destroy(
  ArTrack *track
)
```
Releases memory used by the provided data track config object.


| Details ||
|---|---|
| Parameters | |---|---| | `track` | The track config object to release | |

### ArTrack_setId

```
void ArTrack_setId(
  const ArSession *session,
  ArTrack *track,
  const uint8_t *track_id_uuid_16
)
```
Sets the Track Id.


| Details ||
|---|---|
| Parameters | |---|---| | `session` | The ARCore session | | `track` | The track object to change | | `track_id_uuid_16` | The track ID as UUID as a byte array of 16 bytes in size | |

### ArTrack_setMetadata

```
void ArTrack_setMetadata(
  const ArSession *session,
  ArTrack *track,
  const uint8_t *track_metadata_buffer,
  size_t track_metadata_buffer_size
)
```
Sets the Track Metadata.


| Details ||
|---|---|
| Parameters | |---|---| | `session` | The ARCore session | | `track` | The external track object to change | | `track_metadata_buffer` | bytes describing arbitrary data about the track. | | `track_metadata_buffer_size` | size of the `track_metadata_buffer` | |

### ArTrack_setMimeType

```
void ArTrack_setMimeType(
  const ArSession *session,
  ArTrack *track,
  const char *mime_type
)
```
Sets the MIME type for the Data Track.

Default value is "application/text".


| Details ||
|---|---|
| Parameters | |---|---| | `session` | The ARCore session | | `track` | The track object to change | | `mime_type` | The string representing the MIME type label as a null-terminated string in UTF-8 format. This will be the MIME type set on the additional stream created for this `https://developers.google.com/ar/reference/c/group/ar-track#artrack`, another convenient means of identification, particularly for applications that do not support UUID as a means of identification. | |