如何判斷特定裝置和 AR 工作階段是否具備影格緩衝區 (以及
稱為影格延遲),使用 adb Logcat 輸出內容:
# Camera frame buffering is turned off when frame delay is zero.adblogcat|grep'Update Frame Delay'…Inative:session.cc:3141UpdateFrameDelayto0frames.
# Camera frame buffering is turned on when frame count is non-zero.# Note: The size of the buffer can vary over time.adblogcat|grep'Update Frame Delay'…Inative:session.cc:3141UpdateFrameDelayto6frames.……Inative:session.cc:3141UpdateFrameDelayto4frames.……Inative:session.cc:3141UpdateFrameDelayto2frames.
記憶體
每增加一個相機影格,就會提高記憶體使用率。例如:
1080p 紋理會消耗約 6 MB 的記憶體 (只要將
解析度為 1920 x 1080 x 3 位元組 RGB 資料。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eARCore 1.17.0 introduces camera frame buffering, allowing apps to store multiple camera frames in a queue for improved rendering performance.\u003c/p\u003e\n"],["\u003cp\u003eBuffering can be enabled by the app, required by specific ARCore features (like Augmented Images or Augmented Faces), or automatically enabled on certain devices.\u003c/p\u003e\n"],["\u003cp\u003eEach buffered frame increases memory consumption; for example, a 1080p texture requires ~6MB of memory.\u003c/p\u003e\n"],["\u003cp\u003ePerformance improvements from buffering and multithreaded rendering are not guaranteed and depend on factors like the app's pipeline, device, and OS.\u003c/p\u003e\n"],["\u003cp\u003eTo enable buffering, use \u003ccode\u003eSession.setCameraTextureNames(ids)\u003c/code\u003e to provide texture IDs, and \u003ccode\u003eFrame.getCameraTextureName()\u003c/code\u003e to retrieve the ID for the current frame.\u003c/p\u003e\n"]]],[],null,[]]