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

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
)

Parameters
session

Public Methods

addTrack

public RecordingConfig addTrack(
  Track track
)

Configures and adds a Track for recording.

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.

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.

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.

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

Parameters
rotation