jiangdongguo / AndroidUSBCamera

🔥🔥🔥Flexible and useful UVC camera engine on Android platform, supporting multi-road cameras!

Home Page:https://juejin.cn/post/7115229806844706847

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to pass correctly SurfaceTexture to AUSBC instance

eetteri opened this issue · comments

I want to use my own SurfaceTexture as a render target for instance of ausbc camera.

What is the correct way to pass my custom SurfaceTexture when I create the ausbc camera the 'simple usage' way eg. implementing the CameraFragment ?

These are the steps I followed:

  • Create a SurfaceTexture with its associated OpenGL texture;
  • set the buffer size;
  • create a class implementing IAspectRatio returning that SurfaceTexture;
  • pass it to the openCamera object.