EricssonResearch / openwebrtc-android-sdk

SDK for adding OpenWebRTC to your Android app
BSD 2-Clause "Simplified" License
45 stars 29 forks source link

External USB Camera #8

Open shree-ram opened 8 years ago

shree-ram commented 8 years ago

I am able to get video stream from UVC camera connected to Android device on SurfaceView, want to stream this video via OpenwebRTC, please can you guide me.

onlyway commented 8 years ago

What you get when you try CameraSource.getInstance().getCount(); ? The number of sourcec changes when you attach external camera? If yes, only thing you have to do is to pick source like this: CameraSource.getInstance().selectSource(number_of_source);

shree-ram commented 8 years ago

Thanks for your reply. Nopes, it does not detect as native camera, so the getCount does not change

onlyway commented 8 years ago

Do we have to find place of camera initialization. I need it to to use flash. Have you seen it anywhere? CameraSource isn't right place

shree-ram commented 8 years ago

Camera filr Camera cam = Camera.open();
Parameters p = cam.getParameters(); p.setFlashMode(Parameters.FLASH_MODE_TORCH); cam.setParameters(p); cam.startPreview();

onlyway commented 8 years ago

I know how to do that, but I can't find class where there is camera initialization. You can't use camera when it is busy. I'm the same place you will be able to change source