在三星 Galaxy 设备上同时访问前置和后置摄像头 [英] access both front and back camera simultaneously on samsung galaxy devices

查看:36
本文介绍了在三星 Galaxy 设备上同时访问前置和后置摄像头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道以前有人问过这个问题,但已经很久了.再次提出这个问题以收集任何新的技巧/想法/方法.

I know this question has been asked before but its been a long time. Asking this question again to gather any new hacks/thoughts/approaches.

我需要同时访问前后摄像头.

I need to access both front and back camera simultaneously.

到目前为止,我已经尝试使用 android camera API (Dual Camera- by Jens) 和 camera2 API.两种实现都可以在具有硬件支持(双图像信号处理器)的双摄像头功能的设备上正常工作.我已经测试过,两种实现都可以在 HTC one M8(Snapdragon 801)和小米4(骁龙801).

So far I have tried implementations using android camera API (Dual Camera- by Jens) and camera2 API. Both implementations work fine on devices having hardware support(Dual Image Signal Processors) for dual camera feature.I have tested and both implementations works fine on HTC one M8(Snapdragon 801) & Xiaomi Mi4(Snapdragon 801).

即使三星 s6 支持硬件(Exynos 7420 具有双 ISP),这两种实现都在三星 s6 上失败.此外,S6 上的默认相机应用程序支持双摄像头模式.

Both implementations fails on Samsung s6 even though it's hardware capable (Exynos 7420 has dual ISP). Also, the default camera app on S6 supports dual camera mode.

对此有何想法/建议?

提前致谢.

更新:18/11/2015 --> 尝试使用 Samsung Galaxy Camera SDK 但还是没有运气.

Update:18/11/2015 --> Tried using the Samsung Galaxy Camera SDK but still no luck.

推荐答案

我必须在之前的项目中实现完全相同的东西.我知道斗争,我知道你必须编写多少代码才能完成这项工作.尤其是 Google 提供了两个摄像头 API(摄像头和摄像头 2).

I had to implement the exact same thing in a previous project. I know the struggle, and I know how much code you have to write to make this work. Especially with Google providing TWO camera apis (camera and camera2).

即使我在一些基本上有两个图像信号处理器(需要同时访问两个摄像头)的设备(如 HTC M8)上使用它,但在三星设备中实现了此功能时,我还是遇到了麻烦.原生相机应用程序.

Even though I got it working on some devices (like HTC M8) which basically had two Image Signal Processor (necessary to access both cameras at the same time), I had trouble with the Samsung devices that had this feature implemented in their native camera application.

然后我转身发现三星为其非常特殊"的操作系统提供了不同的特殊 API.这意味着,对于三星拥有的每一项特殊功能(如指纹传感器、S-pen 等),它们都提供了一个 API 供开发人员使用.

Then I turned around and found out that Samsung provides different special APIs for its "very special" OS. What that means, is that for every special feature that Samsung has (like the finger print sensor, the S-pen, and soooo on), they provide a API for the developers to work with.

我在他们的网站 here 上找到了 SCamera API.他们还提供了非常好的文档,可以实施.

I found the SCamera API on their site here . They also provide very good documentation and it is ok to implement.

您需要问自己一个问题:在您的应用中集成另一个相机 API 以使其在三星设备上也能正常工作是否真的值得?考虑到三星设备的比例确实很高.

The question you need to ask yourself: is it really worth it to integrate yet another camera API in your app to make this work on Samsung devices as well? Take in consideration that the proportion of Samsung devices is really high.

我的建议?尝试在不同的项目中实现它,看看效果如何.如果你让它在相当长的时间内工作并且它不是很复杂,那么将它集成到你的主项目中.

My advice? Try and implement it in a different project and see how that goes. If you get it to work in a decent amount of time and it's not very complicated, then integrate it in your main project.

我希望这对你有帮助.祝你有美好的一天,祝你好运!

I hope this helps you. Have a great day and good luck!

这篇关于在三星 Galaxy 设备上同时访问前置和后置摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆