In real projects, some customers may need to support THE USB camera feature. If you have problems with usb camera support, then this article will definitely help you.

Currently, Android supports THE UVC protocol, that is, as long as the USB camera we use supports the UVC protocol, it can run on Android.

First, let’s understand what is UVC?

UVC

UVC is called USB Video Class. It is a protocol standard defined for USB Video capture devices. USB video capture is a protocol standard for USB video capture devices jointly launched by Microsoft and several other device manufacturers. It has become one of the USB ORG standards. (Simply put, a protocol standard)

Two, to see what the USB camera looks like?

The following 2 pictures are the USB cameras I currently use.

UvcCamera open source project?

GitHub open Source project: github.com/saki4510t/U…

At present, the examples of uvcCamera on the Internet are basically based on this open source project. The whole project contains the implementation code of so library, as well as eight test program codes.

Iv. Project based on open source uvcCamera, demo written by myself?

(Hands-on demo, verified all functions on Android 9.0)

Supported functions:

  1. preview
  2. Taking pictures
  3. video
  4. Real-time YUV data callback

Demo code address: github.com/yorkZJC/Uvc…


I have been engaged in Android Camera related development for 5 years

Now I work in Shenzhen

Welcome to follow my wechat official account “Xiaochi Notes”.

We learn and communicate together

——– 2021.02.23 Shenzhen 17:45