Repository navigation
Feat/recording result - #443
Merged
Merged
Conversation
performARHitTestWithPoint, the ray, position and Quest OpenXR hit tests and the scene hit test kept the bridge's one-shot listener only as a weak global ref. Nothing else holds that listener, so the GC could collect it before the renderer thread answered, onHitTestFinished never ran and the JS promise stayed pending. On a Pixel 6 Pro this happened about 11 s into a recording that hit-tests every 250 ms. The listener is now a global ref, deleted after the callback runs. With the rebuilt libviro_renderer.so in a host app, 120 probes all answered.
…an be recorded VROARSession::stopRecording takes a completion receiving a VROARRecordingResult (success, error, durationSec, frames, depthFrames, gpsFixes, bytes), called once video.mp4, session.jsonl and any depth files are complete; the no-argument form remains. ARScene.stopRecording() returns an ARScene.RecordingResult with the same fields. isRecordingDepthSupported() answers LiDAR scene depth on iOS and the Depth API on ARCore, and ARScene.isRecordingSupported(boolean depth) exposes it on Android. Android reports an encoder that did not finish as a failure, as iOS does. A failure while stopping goes into the result only: it used to reach the scene after the stop had reset the status, leaving getRecordingStatus() at IOError with nothing recording. ARScene.stopRecording() may run off the UI thread. On iOS the pose counters are kept under the sidecar lock, counting only lines actually written.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VROARSession::stopRecordingtakes a completion that receives aVROARRecordingResult. It holdssuccess,error,durationSec,frames,depthFrames,gpsFixesandbytes, and is called once video.mp4, session.jsonl and any depth files are complete. The no-argument form stays. On Android,ARScene.stopRecording()returns anARScene.RecordingResultwith the same fields.isRecordingDepthSupported()answers LiDAR scene depth on iOS and the Depth API on ARCore.ARScene.isRecordingSupported(boolean depth)exposes it on Android, where both answers stay false until the ARCore session exists.encoder.stop()andmuxer.stop()failures, and now the encoder drain timeout, used to reach the scene after the stop had reset the status, sogetRecordingStatus()read IOError with nothing recording. A failure while stopping now goes into the stop's result only. An encoder that does not finish now counts as a failed recording, as it already did on iOS.ARScene.stopRecording()may be called off the UI thread (mSessionRecorderis volatile). On iOS the pose counters and the last pose time are kept under the sidecar lock and count only lines actually written, sostop()no longer races the AR thread.Commits
c1a4f5f2Android hit tests: hold the result listener with a global reff5407868Return what a recording wrote from stopRecording, and whether depth can be recordedviro's
feat/vps-developer-toolsships binaries built from this branch, so merge this one first.