ARRecordingManager
Provides access to session recording functionality.
Summary
Inheritance
Inherits from:UnityEngine::MonoBehaviour
Properties |
|
---|---|
RecordingStatus
|
Gets the current state of the recorder.
|
Public functions |
|
---|---|
RecordTrackData(Guid trackId, byte[] data)
|
Writes a data sample in the specified external data track.
|
StartRecording(ARCoreRecordingConfig config)
|
Starts a new recording, using the provided
ARCoreRecordingConfig to define the location to save the dataset and other options. |
StopRecording()
|
Stops the current recording.
|
Properties
RecordingStatus
RecordingStatus RecordingStatus
Public functions
RecordTrackData
RecordingResult RecordTrackData( Guid trackId, byte[] data )
Writes a data sample in the specified external data track.
The external samples recorded using this API will be muxed into the recorded MP4 dataset in a corresponding additional MP4 stream.
For smooth playback of the MP4 on video players and for future compatibility of the MP4 datasets with ARCore's playback of external data tracks it is recommended that the external samples are recorded at a frequency no higher than 90kHz.
Additionally, if the external samples are recorded at a frequency lower than 1Hz, empty padding samples will be automatically recorded at approximately one second intervals to fill in the gaps.
Recording external samples introduces additional CPU and/or I/O overhead and may affect app performance.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
RecordingResult.OK if the data was recorded successfully, or a different RecordingResult if there was an error. |
StartRecording
RecordingResult StartRecording( ARCoreRecordingConfig config )
Starts a new recording, using the provided ARCoreRecordingConfig
to define the location to save the dataset and other options.
If a recording is already in progress this call will fail. Check RecordingStatus
before making this call. When an ARCore session is paused (unless ARCoreRecordingConfig.AutoStopOnPause
is enabled), recording may continue. During this time the camera feed will be recorded as a black screen, but sensor data will continue to be captured.
Session recordings may contain sensitive information. See documentation on Recording and Playback to learn which data is saved in a recording.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
RecordingResult.OK if the recording is started (or will start on the next Session resume.) Or a RecordingResult if there was an error. |
StopRecording
RecordingResult StopRecording()
Stops the current recording.
If there is no recording in progress, this method will return RecordingResult.OK
.
Details | |
---|---|
Returns |
RecordingResult.OK if the recording was stopped successfully, or RecordingResult.ErrorRecordingFailed if there was an error. |