/// <summary> /// Starts a new recording, using the provided <see cref="ARCoreRecordingConfig"/> to define /// the location to save the dataset and other options. If a recording is already in /// progress this call will fail. Check <see cref="RecordingStatus"/> before making this /// call. When an ARCore session is paused (unless <see /// cref="ARCoreRecordingConfig"/>.<c>AutoStopOnPause</c> 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. /// </summary> /// <param name="config"><see cref="ARCoreRecordingConfig"/> containing the path to save the /// dataset along with other recording options.</param> /// <returns><see cref="RecordingResult"/>.<c>OK</c> if the recording is started (or will /// start on the next Session resume.) Or a <see cref="RecordingResult"/> if there was an /// error. /// </returns> public RecordingResult StartRecording(ARCoreRecordingConfig config) { if (ARCoreExtensions._instance.currentARCoreSessionHandle == IntPtr.Zero && ARCoreExtensions._instance.Session.subsystem != null && ARCoreExtensions._instance.Session.subsystem.nativePtr != null) { return(RecordingResult.SessionNotReady); } return(SessionApi.StartRecording( ARCoreExtensions._instance.currentARCoreSessionHandle, config)); }
/// <summary> /// Starts a new recording, using the provided <cref="ARCoreRecordingConfig"/> to define the /// location to save the dataset and other options. If a recording is already in progress /// this call will fail. Check <cref="RecordingStatus"/> before making this call. When an /// ARCore session is paused (unless <cref="ARCoreRecordingConfig"/>.<c>AutoStopOnPause</c> /// 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. /// </summary> /// <param name="config"><cref="ARCoreRecordingConfig"/> containing the path to save the /// dataset along with other recording options.</param> /// <returns><cref="RecordingResult"/>.<c>OK</c> if the recording is started (or will start /// on the next Session resume.) Or a <cref="RecordingResult"/> if there was an error. /// </returns> public static RecordingResult StartRecording(ARCoreRecordingConfig config) { return(SessionApi.StartRecording( ARCoreExtensions._instance.currentARCoreSessionHandle, config)); }