openwebrtc-android-sdk icon indicating copy to clipboard operation
openwebrtc-android-sdk copied to clipboard

Starting FlashLight

Open onlyway opened this issue 10 years ago • 4 comments

Hi, I have problem to find where is initialisation of the camera in SDK. I need to start a flashlight and I can't figured out where to find it. I need camera variable to make it so.

onlyway avatar Sep 17 '15 15:09 onlyway

This is very tricky to implement at the moment, as the camera object is hidden quite deep in the jni layer in the GStreamer plugin https://github.com/EricssonResearch/openwebrtc-gst-plugins/blob/e09bfa127e59cd76b2bb0571258aadcdcce966e6/sys/androidvideo/video-source/jni/android_video_capture_device.c#L2326

There might be some good way to expose the object, but nothing is implemented at the moment.

Rugvip avatar Sep 18 '15 07:09 Rugvip

Might it be simpler to use existing Android APIs to control the flash rather than exposing it through all the layers?

superdump avatar Sep 18 '15 07:09 superdump

Not possible, you need to have a reference to the camera object to be able to start the flashlight. "Your application should only have one Camera object active at a time for a particular hardware camera."

Rugvip avatar Sep 18 '15 07:09 Rugvip

Thanx for your answer, I think it's not worth it for know for me to go such deep to make it work. But thank you for information where to look it for :)

onlyway avatar Sep 18 '15 07:09 onlyway