RecordingConfig

public class RecordingConfig

Configuration related to session recording.

Public Constructors

Public Methods

RecordingConfig
addTrack(Track track)
Configures and adds a Track for recording.
boolean
getAutoStopOnPause()
Gets the setting that indicates whether the recording should stop automatically when the ARCore session is paused.
String
getMp4DatasetFilePath()
This method is deprecated. Please use getMp4DatasetUri() to get the recording location.
Uri
getMp4DatasetUri()
Gets the Uri that the MP4 dataset will be recorded to.
int
getRecordingRotation()
Get the clockwise rotation in degrees that should be applied to the recorded image (0, 90, 180, or 270, or -1 for unspecified).
RecordingConfig
setAutoStopOnPause(boolean enable)
Specify whether recording should stop automatically when the ARCore session is paused.
RecordingConfig
setMp4DatasetFilePath(String mp4DatasetFilePath)
This method is deprecated. Please use setMp4DatasetUri(Uri) to set the recording location.
RecordingConfig
setMp4DatasetUri(Uri mp4DatasetUri)
Set MP4 recording dataset Uri.
RecordingConfig
setRecordingRotation(int rotation)
Specify the clockwise rotation in degrees that should be applied to the recorded image (0, 90, 180, or 270).

Inherited Methods

Public Constructors

RecordingConfig

public RecordingConfig(
  Session session
)

Details
Parameters
session

Public Methods

addTrack

public RecordingConfig addTrack(
  Track track
)

Configures and adds a Track for recording.

Details
Parameters
track

getAutoStopOnPause

public boolean getAutoStopOnPause()

Gets the setting that indicates whether the recording should stop automatically when the ARCore session is paused.

getMp4DatasetFilePath

public String getMp4DatasetFilePath()

This method was deprecated.
Please use getMp4DatasetUri() to get the recording location.

Gets the file path to save an MP4 dataset file for the recording.

This will return null if the output was set with setMp4DatasetUri(Uri).

getMp4DatasetUri

public Uri getMp4DatasetUri()

Gets the Uri that the MP4 dataset will be recorded to.

This will return null if the output was set with setMp4DatasetFilePath(String).

getRecordingRotation

public int getRecordingRotation()

Get the clockwise rotation in degrees that should be applied to the recorded image (0, 90, 180, or 270, or -1 for unspecified).

setAutoStopOnPause

public RecordingConfig setAutoStopOnPause(
  boolean enable
)

Specify whether recording should stop automatically when the ARCore session is paused.

Details
Parameters
enable

setMp4DatasetFilePath

public RecordingConfig setMp4DatasetFilePath(
  String mp4DatasetFilePath
)

This method was deprecated.
Please use setMp4DatasetUri(Uri) to set the recording location.

Sets the file path to save an MP4 dataset file for the recording.

The app must have permission to write to mp4DatasetFilePath. See Storage updates in Android 11 for potential limitations with file paths on Android 11 and later.

Details
Parameters
mp4DatasetFilePath

setMp4DatasetUri

public RecordingConfig setMp4DatasetUri(
  Uri mp4DatasetUri
)

Set MP4 recording dataset Uri.

This will override any output set by setMp4DatasetFilePath(String).

The Uri must represent a resource that supports lseek. Otherwise, Session.startRecording(RecordingConfig) will throw an IllegalArgumentException when called.

Details
Parameters
mp4DatasetUri

setRecordingRotation

public RecordingConfig setRecordingRotation(
  int rotation
)

Specify the clockwise rotation in degrees that should be applied to the recorded image (0, 90, 180, or 270).

Details
Parameters
rotation