ArRecordingConfig

Session recording management.

Summary

Enumerations

ArPlaybackStatus{
  AR_PLAYBACK_NONE = 0,
  AR_PLAYBACK_OK = 1,
  AR_PLAYBACK_IO_ERROR = 2,
  AR_PLAYBACK_FINISHED = 3
}
enum
Describe the current playback status.
ArRecordingStatus{
  AR_RECORDING_NONE = 0,
  AR_RECORDING_OK = 1,
  AR_RECORDING_IO_ERROR = 2
}
enum
Describe the current recording status.

Typedefs

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

Functions

ArRecordingConfig_addTrack(const ArSession *session, ArRecordingConfig *config, const ArTrack *track)
void
Configures and adds a track.
ArRecordingConfig_create(const ArSession *session, ArRecordingConfig **out_config)
void
Creates a dataset recording config object.
ArRecordingConfig_destroy(ArRecordingConfig *config)
void
Releases memory used by the provided recording config object.
ArRecordingConfig_getAutoStopOnPause(const ArSession *session, const 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.
ArRecordingConfig_getMp4DatasetFilePath(const ArSession *session, const ArRecordingConfig *config, char **out_mp4_dataset_file_path)
void
Deprecated. Deprecated in release 1.26.0. Use ArRecordingConfig_getMp4DatasetUri instead.
Gets the file path to save an MP4 dataset file for the recording.
ArRecordingConfig_getMp4DatasetUri(const ArSession *session, const ArRecordingConfig *config, char **out_mp4_dataset_uri)
void
Gets the URI that the MP4 dataset will be recorded to.
ArRecordingConfig_getRecordingRotation(const ArSession *session, const ArRecordingConfig *config, int32_t *out_recording_rotation)
void
Gets the clockwise rotation in degrees that should be applied to the recorded image.
ArRecordingConfig_setAutoStopOnPause(const ArSession *session, ArRecordingConfig *config, int32_t config_enabled)
void
Specifies whether recording should stop automatically when the ARCore session is paused.
ArRecordingConfig_setMp4DatasetFilePath(const ArSession *session, ArRecordingConfig *config, const char *mp4_dataset_file_path)
void
Deprecated. Deprecated in release 1.26.0. Use ArRecordingConfig_setMp4DatasetUri instead.
Sets the file path to save an MP4 dataset file for the recording.
ArRecordingConfig_setMp4DatasetUri(const ArSession *session, ArRecordingConfig *config, const char *mp4_dataset_uri)
void
Sets the file path to save an MP4 dataset file for the recording.
ArRecordingConfig_setRecordingRotation(const ArSession *session, 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).

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 ArRecordingConfig object to change
track
The 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 ArRecordingConfig* to receive the address of the newly allocated 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 ArRecordingConfig_setMp4DatasetUri was used to set the output.

Deprecated. Deprecated in release 1.26.0. Use 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 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. Deprecated in release 1.26.0. Use 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 AR_ERROR_INVALID_ARGUMENT will be returned when 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).