I am trying to use the camera in two different threads, in one thread i am displaying the preview and in the other thread i am getting the data from the preview for calculating the rgb values in each preview frame, when i am trying to use the camera in two threads its giving me an error ” attempt to use locked camera”, i tried by locking and unlocking the camera for two threads but i didn’t work, Could anyone please help me out with this.
Share
Use something like above to copy the data from the preview frame in the first thread onPreviewFrame, Then in the second thread access the data rather than accessing any functions of the camera