summaryrefslogtreecommitdiffstats
path: root/services/camera
Commit message (Collapse)AuthorAgeFilesLines
* Switch camera sounds to always use the system enforced audio stream.Eino-Ville Talvala2012-01-062-12/+1
| | | | | | | | | | Instead of picking between the music stream and the enforced audio stream, change the camera service to always play sounds through enforced system stream. Also update the currently-hidden CameraSound API to match. Bug: 5778365 Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3
* Fix 5487571: Make sure shutter sound is played when it's enforcedChih-Chung Chang2011-10-201-8/+2
| | | | Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
* Fix 5468644: Use the proper audio stream type to play sound.Chih-Chung Chang2011-10-172-14/+16
| | | | Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
* Add initialize method to CameraHardwareInterfaceTyler Luu2011-10-072-14/+28
| | | | | | | | | | | | Add intialize() method to CameraHardwareInterface so we can return a proper error value to CameraService if open of camera hardware module fails. b/5405235 Change-Id: I09c627034ddd22a5753c5163392c4fcff301e0b9 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "Allow shutter/recording sound to be adjusted unless it's forced."Chih-Chung Chang2011-10-071-1/+12
|\
| * Allow shutter/recording sound to be adjusted unless it's forced.Chih-Chung Chang2011-10-071-1/+12
| | | | | | | | Change-Id: I7080d5f50a87f92c8e9395d4cf8f927a6760fa70
* | Allow Camera.setDisplayOrientation to be called when preview is active.Wu-cheng Li2011-10-071-4/+4
|/ | | | | | bug:5422679 Change-Id: I4c936ab00428fc158b5947fe8f10b1028869bbdb
* Add video snapshot camera parameter.Wu-cheng Li2011-09-011-5/+0
| | | | | | | | The API is still hidden. bug:5187868 Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
* Pass camera frame metadata from camera service to Java.Wu-cheng Li2011-08-022-22/+28
| | | | | bug:4460717 Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
* connect/disconnect is now called from our EGL wrapperMathias Agopian2011-08-011-4/+4
| | | | | | | | | | | the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
* Add frame metadata parameter to camera data_callback.Wu-cheng Li2011-07-294-6/+9
| | | | | bug:4460717 Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
* libcameraservice: call put_parameters on camera HALIliyan Malchev2011-07-271-1/+4
| | | | | Change-Id: I492d1034ade50f9e157141debaa9783a90a04a91 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "Disconnect the native window in CameraService::Client::disconnect."Wu-cheng Li2011-07-191-11/+12
|\
| * Disconnect the native window in CameraService::Client::disconnect.Wu-cheng Li2011-07-201-11/+12
| | | | | | | | | | bug:5048372 Change-Id: I6886907a672ddf5580b988ca5bc13e3dc26d4385
* | use SurfaceTexture new scaling mode in SFMathias Agopian2011-07-191-0/+4
|/ | | | | | | SF now obeys SurfaceTexture's scaling mode instead of inferring it from the buffer's size Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
* Merge "CameraService: (dis)connect from preview windows"Jamie Gennis2011-07-182-46/+55
|\
| * CameraService: (dis)connect from preview windowsJamie Gennis2011-07-142-46/+55
| | | | | | | | | | | | | | This change makes CameraService connect and disconnect from preview windows (Surfaces and SurfaceTextures) that get set. Change-Id: I726971688367d5ce0d9aa90c44168037bce33deb
* | get rid of overlay HALMathias Agopian2011-07-121-10/+0
| | | | | | | | Change-Id: I461f633d172ab10e05326ef10544c67dea664c0e
* | Eliminate single-process mode.Jeff Brown2011-07-081-8/+1
|/ | | | | | Bug: 5010576 Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
* CameraService: Decouple dequeue and lockSundar Raman2011-06-271-7/+11
| | | | | | | | Decouple lockBuffer from dequeueBuffer. Add lock_buffer to preview_stream_ops, so HALs will be fully in charge of managing buffers. Change-Id: I7b53487d618bdf08ba904c5a0f41af462a7ca773 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Add framework support for camcorder zoom.Wu-cheng Li2011-06-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to allow applications using the camera during recording. Camera service allows only one client at a time. Since camcorder application needs to own the camera to do things like zoom, the media recorder cannot access the camera directly during recording. So ICameraRecordingProxy is a proxy of ICamera, which allows the media recorder to start/stop the recording and release recording frames. ICameraRecordingProxyListener is an interface that allows the recorder to receive video frames during recording. ICameraRecordingProxy startRecording() stopRecording() releaseRecordingFrame() ICameraRecordingProxyListener dataCallbackTimestamp() The camcorder app opens the camera and starts the preview. The app passes ICamera and ICameraRecordingProxy to the media recorder by MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in MediaRecorder::start(). After setup, the recorder disconnects from camera service. The recorder calls ICameraRecordingProxy::startRecording() and passes a ICameraRecordingProxyListener to the app. The app connects back to camera service and starts the recording. The app owns the camera and can do things like zoom. The media recorder receives the video frames from the listener and releases them by ICameraRecordingProxy::releaseRecordingFrame. The recorder calls ICameraRecordingProxy::stopRecording() to stop the recording. The call sequences are as follows: 1. The app: Camera.unlock(). 2. The app: MediaRecorder.setCamera(). 3. Start recording (1) The app: MediaRecorder.start(). (2) The recorder: ICamera.unlock() and ICamera.disconnect(). (3) The recorder: ICameraRecordingProxy.startRecording(). (4) The app: ICamera.reconnect(). (5) The app: ICamera.startRecording(). 4. During recording (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp() (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame(). 5. Stop recording (1) The app: MediaRecorder.stop() (2) The recorder: ICameraRecordingProxy.stopRecording(). (3) The app: ICamera.stopRecording(). bug:2644213 Change-Id: I15269397defc25cbbcae16abc071c8349c123122
* Merge "Allow camera to be disabled via Device Policy Manager"Wu-cheng Li2011-06-161-0/+8
|\
| * Allow camera to be disabled via Device Policy ManagerWu-cheng Li2011-05-301-0/+8
| | | | | | | | | | | | bug:4185309 Change-Id: I8be89d892b8f540fd05913c93f97b92346a0a282
* | CameraService: return stide when dequeueing a bufferIliyan Malchev2011-06-111-2/+4
| | | | | | | | | | Change-Id: I11c7f0b57f7d619cdc392b2d34c538ae898de7ac Signed-off-by: Iliyan Malchev <malchev@google.com>
* | frameworks/base: updates for camera HAL memory managementIliyan Malchev2011-06-071-18/+70
|/ | | | | | | | | | | | | | | -- when the camera HAL allocates memory -- it requests is as N buffers by S bytes each -- it may specify a file descriptor to get mmapped; if -1, then we use ashmem -- when issuing data and data-timestamp callbacks, the camera HAL specifies a buffer index -- range checking is performed on the buffer indices -- memory requested by a camera HAL is not incStrong'ed, and needs to be expliciftly released by the camera HAL (by calling the release method on the camera_memory_t handle) Change-Id: I0f09603aa786c238590e7288388ab673787e6032 Signed-off-by: Iliyan Malchev <malchev@google.com>
* frameworks/base: android_native_buffer_t -> ANativeWindowBufferIliyan Malchev2011-05-031-7/+7
| | | | | Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417 Signed-off-by: Iliyan Malchev <malchev@google.com>
* frameworks/base: switch CameraService to a HAL moduleIliyan Malchev2011-05-034-67/+675
| | | | | | | | | | | | | | | This patch changes CameraService to load a camera HAL module, instead of linking directly against a library that implements the CameraHardwareInterface class. CameraHardwareInterface no longer defines the API to the camera HAL. Instead, this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as a class local to CameraService, which wraps around the new HAL calls. In the future, we may remove this class entirely and have CameraService call the HAL methods directly. Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641 Signed-off-by: Iliyan Malchev <malchev@google.com>
* frameworks/base: include system/core header camera.h in Camera.hIliyan Malchev2011-05-032-13/+13
| | | | | | | | | | | | We define struct CameraInfo in this camera/Camera.h, even though an identical struct camera_info is defined in hardware/camera.h (but not in hardware/camera_defs.h). We may not export struct definitions from the HAL into headers which may find their way into the NDK. This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx. Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8 Signed-off-by: Iliyan Malchev <malchev@google.com>
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-2/+2
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* remove more unused references to ISurfaceMathias Agopian2011-04-052-17/+3
| | | | Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
* frameworks/base: some camera-interface cleanupIliyan Malchev2011-03-282-21/+3
| | | | | | | | | Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct image_rect_struct are no longer used (instead, the necessary information is passed through ANativeWindow.) Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb Signed-off-by: Iliyan Malchev <malchev@google.com>
* merge libsurfaceflinger_client into libguiMathias Agopian2011-03-252-2/+1
| | | | | | | | | | | | this is the first step in unifying surfacetexture and surface. for this reason the header files were not moved, as most of them will eventually go away. NOTE: currently we keep libsurfaceflinger_client.so as an empty library to workaround prebuilt binaries wrongly linking against it. Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
* Fix missing AOSP copyright headers for more filesJames Dong2011-03-172-0/+32
| | | | | | | | | | o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp because these two files were moved from other places to the current location, and were actually created in 2010. bug - 4119349 Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
* Application-managed callback buffer support for raw imageJames Dong2011-02-222-7/+20
| | | | | | bug - 3292153 Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
* Add camera service support for SurfaceTexture.Jamie Gennis2011-01-063-25/+50
| | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the destination of camera preview frames. Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
* We requires camera hal's implementation should not track the ref count of ↵James Dong2010-12-101-4/+1
| | | | | | | | any outstanding video frames and ignore releaseRecordingFrame() call after it receives disableMsgType(CAMERA_MSG_VIDEO_FRAME). Change-Id: I2ecb9b3b11dab6bf868ccf8effda1b8df5bcde3c
* remove support for PUSH_BUFFER surfaces and overlaysMathias Agopian2010-12-082-104/+10
| | | | | | | the same functionality is now supported through the h/w composer HAL, and YUV support in the GPU. Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
* Don't drop video frames but to release them.James Dong2010-12-061-1/+4
| | | | | | bug - 3259009 Change-Id: Ib7634f10a7fe7b7ce7014b79b07957d194bae1a7
* Revert "Temporary workaround for issue 3187563"Eric Laurent2010-11-241-4/+0
| | | | | | | | | | This reverts commit 065299b58d1c00cd24e442fa192561decf7b1fec. The work around for issue 3187563 is not needed any more since the new kernel DMA driver implementation (commit 7953250be7c9a1c3417e21b20032b571d495d218) fixes the root cause. Change-Id: Ibaac2826b63c8e5825ae2e5cab2fb2f0e51ab7b4
* Temporary workaround for issue 3187563Eric Laurent2010-11-111-0/+4
| | | | | | | | | | The audio HAL does not always handle properly simultaneous input and output stream state changes. This happens in particular when starting video record because output stream starts and stops while input is active. Temporary disable the video record jingle the time the audio HAL issues are solved. Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
* Mirror the camera preview if the camera is front-facing.Wu-cheng Li2010-10-252-27/+38
| | | | | bug:3095272 Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
* Camera framework change required for 0-memcpy recordingJames Dong2010-10-192-1/+27
| | | | | | bug - 3042125 Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
* Fix camera display orientation.Wu-cheng Li2010-10-122-1/+13
| | | | | bug:3036262 Change-Id: I6fc3dc381fcfaceba09fd5bd14afb85045b3d676
* resolved conflicts for merge of 191a25e1 to masterWu-cheng Li2010-09-272-6/+16
|\ | | | | | | Change-Id: I6f4940e337a992bf84e50bc1d22432593937499c
| * The old overlay should be destroyed if orientation changes.Wu-cheng Li2010-09-272-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the orientation was wrong after suspend and resume. When the camera app is resumed behide the lock screen, it orinteation is portrait. When users slide to unlock the screen, surfaceChanged is called and the orientation is landscape. The camera app stops the preview, sets the display orientation, and starts the preview. Overlay should be destroyed if the orientation has changed. bug:3031640 Change-Id: I38b527f9ea78c91b538463292152c023383b4695
* | Added command type to play recording sound.Nipun Kwatra2010-09-141-0/+2
| | | | | | | | | | | | | | | | | | Added CAMERA_CMD_PLAY_RECORDING_SOUND command type to play recording sound through sendCommand. This is currently needed by time lapse recording using still mode capture, which disables the shutter sound but needs to play the recording sound. Change-Id: I376aa40f45b6064fd862abc065456b06fc338020
* | Adding enable/disable option for sendCommand()Nipun Kwatra2010-09-142-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | - Added enum CAMERA_CMD_ENABLE_SHUTTER_SOUND which corresponds to command type for enabling/disabling shutter sound. - The implementation checks if it is legal to disable shutter sound. If it is, then any process can disable the sound. If not, then only the mediaserver process is allowed to do this. Currently time lapse capture needs this functionality to disable shutter sound when still mode is used to capture time lapse video. Change-Id: Id147a3bcc6a345c2c6a6d52bf98fd8292386bb19
* | Only enable CAMERA_MSG_PREVIEW_FRAME when necessary.Wu-cheng Li2010-09-091-14/+5
| | | | | | | | | | | | | | | | | | Now camera driver uses ANativeWindow for display. CameraService should not request preview callback from camera hardware if applications have not requested it. bug:2951018 Change-Id: I85f74ea4a61104feca018867bc9d6dfe3a9479f5
* | Remove setPreviewDisplay in CameraService::Client::~Client().Wu-cheng Li2010-08-311-5/+0
| | | | | | | | | | | | | | | | | | mSurface is released in destructor and setPreviewWindow(0) is called in Client::disconnect(). setPreviewDisplay is not needed in destructor. bug:2964479 Change-Id: I329901659a2af407816c34e02f37143b28183a89
* | Add the setPreviewWindow camera HAL API to the camera stub.Jamie Gennis2010-08-232-3/+3
| | | | | | | | Change-Id: Ic669f9d5f5ae8f1fe5bd055f55aa4a18fa6d84cd