summaryrefslogtreecommitdiffstats
path: root/camera2/portability/src/com/android/ex/camera2/portability/CameraAgent.java
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: handle API 1 error callback in CameraExceptionHandler.Senpo Hu2014-10-101-9/+0
| | | | | | | | | Portability API used to expose setErrorCallback call which is API 1 only. The new CameraExceptionHandler should be the centralized place to handle different camera errors. Bug: 17931297 Change-Id: I0212f96a98e0caca64aca0f947b991b895d8d56b
* Overhaul error handling in AndroidCameraAgentImpl.Senpo Hu2014-10-071-131/+236
| | | | | | | | | | | | | | | | | | | | | | | DispatchThread could throw RTE when timeout (2500 ms). This CL extends it to 3500 ms and also re-route the exception to the proper exception callback instead of surfacing that up to the app. Since a lot of try-catch block is added, CameraExceptionHandler class is added to keep CameraAgent.java clean. The portability layer should ensure the proper use of Camera API 1. With this assumption, any run time exception thrown by the framework should be considered fatal. Once it happened, CameraAgent/CameraProxy should be invalidated. Any subsequent camera commands should be gated as no-ops to prevent HAL hanging symptom. Users should be guided to exit the app and recover from the camera error. Design Doc: https://docs.google.com/a/google.com/document/d/1t0sEPwGgc387XcoCVC7kT9Y_RSZPxcayla03M4bdn0U/edit Corresponding CL for the app layer: ag/562383 Bug: 16189216 Change-Id: I33e69aeff0c8e4211e82e0e83133915700c4eb8f
* Merge "portability: Fix a bug where long AF callbacks caused ISE timeouts" ↵Rachad Alao2014-09-091-8/+31
|\ | | | | | | into lmp-dev
| * portability: Fix a bug where long AF callbacks caused ISE timeoutsIgor Murashkin2014-09-091-8/+31
| | | | | | | | | | Bug: 17403384 Change-Id: I2f452f79ffb4c0c3327ea5bf7db3f9d26e98ff51
* | Let CameraProxy support setJpegOrientation.Senpo Hu2014-09-091-0/+10
|/ | | | | | | | When device is locked in portrait, JPEG orientation and preview orientation might be different. Bug: 17360176 Change-Id: I16ee937c4d930e5f02a3e703dffd3bdd63e0e367
* camera2-portability: Touch-to-focus accounting for effective cropSol Boucher2014-08-291-1/+25
| | | | | | | | | | | This fixes the calculation of API 2 focus and metering rectangles to account for the effective crop region (after the framework has performed automatic cropping to match the requested output aspect ratio). It also guards against and prints warnings when changing the resolution after having configured the session and surfaces; before, this was merely a silent no-op. Bug: 17187095 Change-Id: I3243bea24d6936d1bba5d556b3846d172ad0defe
* camera2-portability: Switch to ratio-based zoom interfacesSol Boucher2014-08-211-1/+2
| | | | | | | | | This eliminates the deprecated index-based CameraSettings zoom methods in favor of floating-point ratio based versions, and includes the plumbing to make those work for both the camera1 and camera2 underlying framework APIs. Bug: 17016658 Change-Id: I0567a53cd57bfa6d53604e3c5457a39ef49e3cb4
* camera2-portability: Support photo capture using camera2 APISol Boucher2014-08-071-7/+22
| | | | | | | | | | | This implements JPEG capture, including an autoexposure precapture sequence. There are many changes to AndroidCamera2Capabilities and AndroidCamera2Settings to support the representation of modes (e.g. flash modes) whose flags do not map trivially between the API implementations. Part of this work is the conversion of AndroidCamera2AgentImpl to use and store a Camera2RequestSettingsSet instead of a bare API 2 CaptureRequest.Builder. Change-Id: I03f9f98c954a7b0c140ac8d80161878c92ef65d2
* camera2-portability: Add support for previews using the camera2 APISol Boucher2014-07-081-63/+282
| | | | | | | At the moment, only SurfaceTextures (and not SurfaceViews/SurfaceHolders) are supported. The tests still only cover Stringifier and IntegralStringifier. Change-Id: Ie643c58f8383cd3b9f59c16e0b79239df0ca068d
* camera2-portability: Remove Camera.CameraInfo accessorSol Boucher2014-06-201-0/+5
| | | | | | | | | This removes the CameraDevice#getCameraInfos() call that provided direct access to this API 1 type, replacing it with another accessor returning individual instances of the new wrapper type CameraDevice.BasicCharacteristics . It also gives CameraProxy a method for getting instances of this wrapper. Change-Id: I0c72ffe71817b8acf1cc5a01f1565ec4e0e97e7d
* Add various supports in settings and capabilities.Angus Kong2014-06-181-0/+10
| | | | | | | | | | 1. View angles in capabilities. 2. Preview formats setting. 3. Photo formats setting. 4. Recording hint for video recording preview setting. 5. JPEG thumbnail size setting. Change-Id: Ib8e33cf838859ae76a662fffcc496250ad85c203
* camera2-portability: Rename CameraManager to CameraAgentSol Boucher2014-06-181-0/+581
This resolves a naming clash with a class in the new camera2 framework API. Change-Id: Id53aa3e0bbe9e9edaa82b0aec695fd835c3d0ef9