summaryrefslogtreecommitdiffstats
path: root/camera2/portability/src/com/android/ex/camera2/portability
Commit message (Collapse)AuthorAgeFilesLines
* Merge "camera2-api: Work around invalid camera2 API focus modes" into lmp-devSol Boucher2014-08-231-3/+10
|\
| * camera2-api: Work around invalid camera2 API focus modesSol Boucher2014-08-221-3/+10
| | | | | | | | | | | | | | | | | | The validation routine now changes the focus mode to FIXED if the requested one is unsupported. This is to work around devices whose templates erroneously specify unsupported focus modes. Bug: 17177436 Change-Id: If9b679510e0c232453dd0a77dbdd2e0ec713ac12
* | camera2-portability: Play shutter sound for camera2 capturesSol Boucher2014-08-221-1/+5
|/ | | | | Bug: 17109582 Change-Id: I73321cdbb2972b2d1e9bc2de93192fbb506347e7
* Merge "Add exception logging to CameraDeviceInfo retrieval failure" into lmp-devAlan Newberger2014-08-161-0/+1
|\
| * Add exception logging to CameraDeviceInfo retrieval failureAlan Newberger2014-08-181-0/+1
| | | | | | | | | | | | | | | | | | | | camera1 CameraAgent returns null CameraDeviceInfo if the underlying camera device is broken. see b/16982203, this caused issues but was invisible in logs. Adding logging to document true root cause of any device info failures stemming from an underlying failure. Bug: 16982203 Change-Id: I8a48714e1ddbde8b8eac35f149136d19efce5fb8
* | Merge "Consolidate parameter caching in camera1 portability agent" into lmp-devAlan Newberger2014-08-151-55/+90
|\|
| * Consolidate parameter caching in camera1 portability agentAlan Newberger2014-08-151-55/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing implementation of the AndroidCameraAgentImpl uses a 'mParamsToSet' upon which is projects requested settings changes in applySettings(). But, this mParamsToSet is initialized only upon camera open! So 'hidden' parameters like video-size are stuck in the value upon open. Instead, they should be current to the last call to refreshSettings. To simplify, removed this and another copy of parameters (mParameters), introduced one cache class, and use it throughout the agent. Tested and app seems to work OK in general with the change, and specifically confirmed that video size parameters are not reverted after start, as was observed before the change. Bug: 16991558 Change-Id: I8f2749b8ab2ccc2cb858b8cd844330c5a482f79c
* | Merge "camera2-portability: Provide preview transformation matrix" into lmp-devSol Boucher2014-08-152-16/+118
|\ \
| * | camera2-portability: Provide preview transformation matrixSol Boucher2014-08-152-16/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | Applying this transform to the Surface on which the stream is displayed results in a correctly rotated image. For API 1, the rotation is actually performed by the Camera class and the returned matrix is an identity matrix; however, for API 2, the transformation is responsible for proper orientation. Bug: 16875535 Change-Id: I044ffbd1095bd1a9792c899b792129cc94c7c916
* | | Merge "camera2-portability: Make factory offer choice of backing API" into ↵Sol Boucher2014-08-154-14/+179
|\ \ \ | | | | | | | | | | | | lmp-dev
| * | | camera2-portability: Make factory offer choice of backing APISol Boucher2014-08-154-14/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows apps using the library to decide whether to jump to the new API. Users of the library may choose to use the Camera class, the camera2 API, or have the choice made automatically based on the device's API level. The choice may also be globally overridden by means of a system property. Bug: 16875535 Change-Id: I92e4be96fbd04057be61ceb8a0c58935770022f6
* | | | Merge "camera2-portability: Improve capability conversions' null-safety" ↵Sol Boucher2014-08-151-6/+14
|\ \ \ \ | |_|_|/ |/| | | | | | | into lmp-dev
| * | | camera2-portability: Improve capability conversions' null-safetySol Boucher2014-08-131-6/+14
| | |/ | |/| | | | | | | | | | | | | | | | | | | This makes it harder for unexpected nulls in CaptureRequest templates to cause exceptions while unboxing Integer wrappers. Such crashes were observed on some devices while running on the legacy layer, especially with scene modes. Change-Id: I0cae95534f138e97f2c589d15e81f77b4f2141f7
* / | camera2-portability: Report correct sizes for preview and captureSol Boucher2014-08-131-7/+7
|/ / | | | | | | | | | | | | This reports JPEG capture sizes instead of YUV ones, and ensures that preview sizes match TextureView, not SurfaceView. Change-Id: I2963ee1741156cc2a29e2e65308bd14dd145e4c8
* | Merge "Fix missing zoom fields in copy constructor of CameraCapabilities" ↵Alan Newberger2014-08-071-0/+2
|\ \ | | | | | | | | | into lmp-dev
| * | Fix missing zoom fields in copy constructor of CameraCapabilitiesAlan Newberger2014-08-071-0/+2
| |/ | | | | | | | | | | | | | | | | These fields are deprecated but while we have them, should copy them in the constructor. This contributes to a zoom bug in the app, since ratios and indices are dropped upon copy. Bug: 16527845 Change-Id: I008384faa77e0c13a2790e095fa311909c1e9b44
* / camera2-portability: Support photo capture using camera2 APISol Boucher2014-08-079-405/+936
|/ | | | | | | | | | | 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
* add TORCH support to camera1 portability libraryAlan Newberger2014-07-301-0/+2
| | | | | | | In the move to the portability library, TORCH mode got dropped. Bug: 16680156 Change-Id: I3878c2399246bdb5cc80311c49533971c0c4c3d2
* camera2-portability: Add focus locks and touch-to-focus for API 2Sol Boucher2014-07-242-54/+330
| | | | | | | | | This implements focus locks very simply using only camera2 API requests: the lens is locked on autoFocus() and unlocked on cancelAutoFocus(), as with the existing legacy API--backed implementation. Both passive and active focus modes ares supported, with and without positional focusing. Change-Id: I26b1866539807fd3d64189923871443056a166af
* DO NOT MERGE: Fix oversight while refactoring CameraStateHolderSol Boucher2014-07-163-42/+3
| | | | | | | The base class still (redundantly) defined states, and AndroidCameraStateMachine was overriding methods with a verbatim copy of their implementations. Change-Id: I0e6361417edb159f91b89409058ee9a73b1101d9 (cherry-picked from commit dbc457417c581c21b5d49539325b1b152dc1baba)
* camera2-portability: Add support for previews using the camera2 APISol Boucher2014-07-0813-602/+1723
| | | | | | | 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-203-10/+86
| | | | | | | | | 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-186-3/+134
| | | | | | | | | | 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: Fix the rest of the 'Andorid' typoSol Boucher2014-06-181-3/+3
| | | | | | This resolves build breakage. Change-Id: I3cab88fdee5f86d183b1307dac714466336fc476
* camera2-portability: Rename CameraManager to CameraAgentSol Boucher2014-06-184-35/+35
| | | | | | This resolves a naming clash with a class in the new camera2 framework API. Change-Id: Id53aa3e0bbe9e9edaa82b0aec695fd835c3d0ef9
* Don't pass empty list of areas.Angus Kong2014-06-181-3/+10
| | | | | | | Some devices won't work well if we pass in an empty list of focusing or metering areas. Change-Id: Iff6bfd37a7d551b12c43e88cf8d4934472837257
* Refactor out Camera.Parameters.Angus Kong2014-06-188-92/+958
| | | | Change-Id: Ibc1ddac509381530e887b7491069e6367e9a6088
* Refactor CameraManager hierarchy to support new implementationsSol Boucher2014-06-186-479/+602
| | | | | | | | | | | | | | | | This relocates several components of the implementation class AndroidCameraManagerImpl to higher levels in the inheritence hierarchy, where they can be reused by other implementations of the CameraManager interface: - AndroidCameraManager.DispatchThread is moved into its own file - The core (history-tracking) pieces of CameraManager.CameraHandler are moved into their own HistoryHandler class, which the former is made to inherit - The constants defined in AndroidCameraManagerImpl for use in its nested CameraHandler class are moved into a separate class called CameraActions - AndroidCameraManagerImpl.CameraStateHolder is moved into its own file - Those CallbackForward classes that aren't tied to Android's Camera1 API are moved directly into the CameraManager interface Change-Id: I5f3e1eb72039a0018ce2277e3ec6289bfa4ccec3
* Timeout on wait lock and throw exception to prevent ANR.Erin Dahlgren2014-06-181-7/+7
| | | | Change-Id: I5b0d2b8c0384d32ed0d870e5db6003991524fc38
* Handle error getting camera info.Angus Kong2014-06-183-24/+134
| | | | | bug:13877028 Change-Id: Iff0353738de3290244092076b2f955f0d7d57408
* Don't use stale parameters for capabilities.Sascha Haeberling2014-06-181-4/+2
| | | | | | Bug: 14823111 Change-Id: I524de9a6dd774c3aa8b6c47092657d66447565bc
* First Step: CameraCapabilities intead of ParameterAngus Kong2014-06-185-9/+1044
| | | | | | | | | To get rid of Camera.Parameters, we need to provide our own interfaces. Camera.Parameters actually consists of 2 parts: capabilities and settings. We'll provide two interfaces and will just use Camera.Parameters inside of CameraManager implementations. Change-Id: I53922b6d740835412d74365374a6a0382129564e
* Cancel onResumeTask when the app is paused.Angus Kong2014-06-182-59/+67
| | | | | | | | | | Also change the camera closing conditions to force close all camera before killing the handler thread. bug:14190951 bug:14441425 Change-Id: Ic752b0678530b34eb3710bd7796cb17d15452013
* Add history info for camera open failure log.Angus Kong2014-06-182-5/+30
| | | | | bug:14365703 Change-Id: I4b2259e12121cac5b8165f5c5dbacf9cb3a936a6
* Bring back video snapshotDoris Liu2014-06-181-1/+1
| | | | | Bug: 14220490 Change-Id: Ibf20d169aae9de4eb9c1e2151d9c7335bcf7b3a3
* Create cameradevice package for camera management.Angus Kong2014-06-183-0/+2019
| | | | Change-Id: I73c69a70736b0b0eb0ef069a7876cf75fee91262
* Add logging override helperAlan Newberger2014-06-182-121/+72
| | | | | | | | | | | | This CL removes compile-time log suppression with a runtim override. With a runtime override we can custom configure logging with a single level, not quite as flexible as a boolean per level but should suit our needs. Compile-time log pruning could be done with proguard if desired. Bug: 13737123 Change-Id: I8bdcaca44b4dc5c7eab8ef2f74e5181bcacd2727
* Replace isDebugging compiletime logging override with runtime propertyAlan Newberger2014-06-181-2/+12
| | | | | | | | | | | | | This CL accomplishes the same goal as the compile-time isDebuggable, with a runtime property check. This is useful so that we opt in to logging everything at a given level with one setprop line. Note that either with this new runtime property or with isDebuggable, the Log proxy wouldn't log if a particular Configuration value is false, since that level is instead routed to SILENT_LOGGER. Bug: 13737123 Change-Id: I78ce629620f420a08a2cc013865847674941fb9b
* If debug is on, log everything.Sascha Haeberling2014-06-181-1/+2
| | | | Change-Id: I706874c9ea1b03c2fd9f987cda9581f72883c914
* Use debug.Log instead of android.util.Log.Angus Kong2014-06-181-0/+205
see http://ag/438423, merge conflicts solved. 1. Change to use com.android.camera.debug.Log instead of android.util.Log. 2. Add DebugCameraProxy to support more detailed debug info. 3. Add CameraErrorCallback in CameraManager. 4. Support posting to a specific handler for CameraErrorCallback. 5. Trim down some TAGs to match the framework tag length limit. 6. Remove some unused codes in CameraSettings. bug:13324870 Change-Id: I8c20a8a0d11cfd50b6e199b03cbc88d3c4ad2ceb Conflicts: src/com/android/camera/data/LocalMediaData.java src/com/android/camera/data/RotationTask.java src/com/android/camera/widget/FilmstripView.java