monodroid-samples
monodroid-samples copied to clipboard
Camera2Basic retaking a picture throws exception
Running the code and clicking the "Take Picture" button work fine (After commenting the body of CameraCaptureStillPictureSessionCallback::OnCaptureCompleted to allow the emulator to show a still image of what camera output). This allows me to click on a second button i added labeled "Re-Take Picture". Clicking on the "Re-Take Picture" button calls the method "UnlockFocus"
This allows the app to once again show a live stream of what the camera is seeing. Upon clicking the "Take Picture" button again (which calls the method "TakePicture" just as initially), the code now throws the following error: "An unhandled exception occurred"
Looking at the device log, then following relevant errors were found:
07-26 23:29:03.201 10.1" Marshmallow (6.0.0) XHDPI Tablet Error 6987 BufferQueueProducer [ImageReader-640x480f100m2-6987-0] dequeueBuffer: can't dequeue multiple buffers without setting the buffer count
07-26 23:29:07.174 10.1" Marshmallow (6.0.0) XHDPI Tablet Error 6987 RequestThread-0 Hit timeout for jpeg callback!
07-26 23:29:03.201 10.1" Marshmallow (6.0.0) XHDPI Tablet Error 6987 Legacy-CameraDevice-JNI LegacyCameraDevice_nativeProduceFrame: Error while producing frame Function not implemented (-38).
The following is a link to a copy of the code (with my minor modifications):
https://drive.google.com/file/d/0B7OSuA_ybXcFb081T210UlQzZkE/view?usp=sharing
Here are the specs of systems on which I've tested this code with the same results:
- Windows 10 Pro, Visual Studio 2017 Community, Android Emulator For Visual Studio, Hyper-v Virtual Manager, Android 6.0 (Marshamallow SDK 23), Tablet sized template
- 2013 Macbook Pro, Visual Studio For Mac (latest version), default emaulator, Android 6.0 (Marshmallow SDK 23), Tablet sized template.
Could you provide us tablet emulator dimensions (size, resolution, density)? We've tested it with a phone and there is no error.
Thanks