How to allow Android app(TV-box) to recognize or access USB web camera?

人走茶凉 提交于 2019-12-19 10:27:31

问题


I am currently trying to develop an Android video conference application on a Android TV set-top box. As all of us know, Android TV box does not have a camera and therefore I tried to use a USB web camera but the OS does not recognize the USB camera and is unable to retrieve video feed from it.

Is there anyway to make sure my Android application is able to receive video feed from the USB camera?

Thank you and sorry if I wrote this question inappropriately, it's my first time using Stackoverflow.


回答1:


You have two choices:

1) Find a Android TV device which supports external camera(s). From the Android Compatibility Definition Document

Section 7.5.3. External Camera

Device implementations MAY include support for an external camera that is not necessarily
always connected. If a device includes support for an external camera, it:

* MUST declare the platform feature flag
  android.hardware.camera.external and android.hardware camera.any .
* MAY support multiple cameras.
* MUST support USB Video Class (UVC 1.0 or higher) if the
  external camera connects through the USB port.
* SHOULD support video compressions such as MJPEG to enable transfer
  of high-quality unencoded streams (i.e. raw or independently compressed picture streams).
* MAY support camera-based video encoding. If supported, a simultaneous
  unencoded / MJPEG stream (QVGA or greater resolution) MUST be
  accessible to the device implementation.

OR

2) Create your own Custom ROM which would require having the code and drivers to satisfy the above requirement. This is non-trivial and involves creating/integrating/testing your own driver which is too broad for StackOverflow question.



来源:https://stackoverflow.com/questions/41560464/how-to-allow-android-apptv-box-to-recognize-or-access-usb-web-camera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!