Google is committed to advancing racial equity for Black communities. See how.

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_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
Gets the file path to save an MP4 dataset file for the recording.
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
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_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.

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_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.

Details
Parameters
session
The ARCore session
config
The config object to change
mp4_dataset_file_path
A string representing the file path

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).