本文介绍了在三星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相机API的实现()和camera2 API。两个实现在具有用于双照相机特征的硬件支持(双图像信号处理器)的设备上工作良好。我已经测试并且两个实现在HTC一M8(Snapdragon 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上的默认相机应用程序支持双摄像头模式。

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.

有关这方面的任何想法/建议吗?

Any ideas/advice on this ?

提前感谢。

更新:18/11/2015 - >尝试使用,但仍然没有运气。

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

推荐答案

在以前的项目中完全相同的事情。我知道这场斗争,我知道有多少代码要写这个工作。

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和soooo),他们提供了一个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.

我在他们的网站找到了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设备上同时访问前置和后置摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-11 22:19