在native中实现相机预览并在flutter中使用
我想实现一个原生 android 相机预览(使用 c++)并在 flutter 应用程序上显示此预览。
我找不到任何直接可能的方法来做到这一点 - 到目前为止,我能找到的唯一解决方案(我仍然不确定它是否会起作用并且认为它可能太复杂)如下:
实现本机流使用ACameraCaptureSession_setRepeatingRequest和ACameraDevice_createCaptureRequest,将其传递给Java,并将其转换为android视图,然后使用Flutter的PlatformView。
正如我所提到的,我不确定它是否会起作用,即使它起作用,我想知道是否有一些更简单的方法可以做到这一点。
I want to implement a native android camera preview (using c++) and display this preview on a flutter application.
I couldn't find any direct possible way to do so - up to this point the only solution I could find (which I still am not sure if it will work and think it might be too complex) is the following:
Implement a native stream using ACameraCaptureSession_setRepeatingRequest and ACameraDevice_createCaptureRequest, pass it to Java, and convert it to an android view, and then using Flutter's PlatformView.
As I mentioned, I'm not sure it will work, and even if it does, I wonder if there is some simpler way to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论