Android相机在哪里确定即时预览帧?

发布于 2024-12-11 10:34:34 字数 640 浏览 0 评论 0原文

我试图确保在相机中拍照后短暂显示的预览帧与捕获的图像密切对应。预览图像和捕获的图像之间存在一点延迟,当捕获运动中的主体时,这是一个问题。

相机代码中是这些注释:

// If postview callback has arrived, the captured image is displayed
// in postview callback. If not, the captured image is displayed in
// raw picture callback.

但我没看到。我看到在 capture() 结束时,mPreviewing 设置为 false,并且 JpegPictureCallback 稍后恢复预览。这对我来说意味着冻结的图像是从 mPreviewing 关闭那一刻起的图像 - 我没有看到任何代码可以用任何更新的图像替换该图像。评论正确吗?如果是这样,图像在哪里更新?

I am trying to ensure that the preview frame which is displayed briefly after snapping a picture in Camera corresponds closely to the captured image. There is a bit of delay between the preview image and the captured image, and when capturing subjects in motion, that's a problem.

In the Camera code are these comments:

// If postview callback has arrived, the captured image is displayed
// in postview callback. If not, the captured image is displayed in
// raw picture callback.

But I don't see it. I see that at the end of capture(), mPreviewing is set to false, and the JpegPictureCallback resumes previewing after a little bit. This suggests to me that the frozen image is the one from the moment mPreviewing is switched off - I don't see any code that would replace that image with anything fresher. Are the comments correct? If so, where is the image updated?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文