saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
2.96k stars 1.19k forks source link

How could I open the two child uvc devices? #675

Closed andymatos closed 1 year ago

andymatos commented 1 year ago

I have two uvc video cameras under one usb port. How could I open them at same time? I try to get two different uvc_stream_ctrls , and call uvc_start_streaming with these two different ctrls. First is open correctly, but for second, is failed with Busy (-6) error. Since they're using the same interface. This device works fine on Windows with direct show api. Just do not know how to make it work in libuvc on android. I also tried with v4l2 driver on android, it also work fine with the v4l2 driver on android with Camera2 api. However, I need to use this device under user space driver on android. Any suggestion on this is appreciated. The lsusb -t show as follow: 193224414-9bb457e3-5078-470e-8b8d-8dd73d8b6b6f

benjarn374 commented 1 year ago

Hello i was able to create 2 camera preview by dividing code in 2 CameraViewInterface and 2 UVCCameraHandler only

So i think you just have to create 2 interfaces one for each CameraHandler.

Mine are behind an usb hub...