summaryrefslogtreecommitdiffstats
path: root/camera/AppCallbackNotifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixes for MMS setparameter crashesAkwasi Boateng2011-10-251-0/+4
| | | | | | | | | | | | | | | | | | 1. Fix native crash for set parameter when zoom is applied in MMS mode and while recording is in progress. 2. Don't allow restart of preview or preview stop when recording is in progress. 3. Fix slow zoom when in MMS mode casued by unnecessary preview restarts. 4. Fix initial jerky preview when you start recording in MMS mode caused by having to restart preview. Change-Id: Ie64799974488caae5887e4c9f9072d74a12dd797 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> related-to-bug: 5507018
* CameraHal: Fixes for #testVideoSnapshotTyler Luu2011-10-151-0/+6
| | | | | | | | | | | | | 1. Add raw notify callback for video snapshot 2. Add new state for video capture + AF 3. We were not populating focal length correctly for jhead. Need to send focal length as a rational in this format "xx/yy" 4. Need to send GPSProcessingMethod as an UNDEFINED ASCII to jhead b/5448171 Change-Id: Ie6be9ad821d1fa106d9c857681f2fa6427d4f283 Signed-off-by: Tyler Luu <tluu@ti.com>
* omap4xxx: camera: re-enable postview callbackTyler Luu2011-10-071-17/+5
| | | | | | | | Fixes b/5370657... again Change-Id: I998d2292d25b76b67b1fbd2ff6bd65e854c176c8 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: timing issue with autoFocus/cancelAutoFocusTyler Luu2011-10-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | Fixes b/5332895 If cancelAutoFocus comes when Ducati is already sending focus callback, CameraHal will go ahead and send focus callback to the application. This can cause the subsequent autoFocus call to be acked almost immediately with the previous autoFocus call's notification. Application will think autoFocus is done while CamearHal is still focusing, takePicture from the application will return an error. To fix this issue, do not always send focus notification. We are going to internally enable/disable auto focus message. Enable focus message when autoFocus call comes and disable focus message after notification or if cancelAutoFocus call comes. This will prevent us from sending notify message if application calls cancelAutoFocus. Change-Id: I8c8892f14894e23a9d73fa1c2b058389d196eefa Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: cancel and flush for SW JPEG encoderTyler Luu2011-10-071-1/+23
| | | | | | | | | | | | | | | | Fixes b/5378650 1. Add method to externally cancel Encoder class while in the middle of encoding. 2. Add queue in AppCallbackNotifier to track all the encoding sessions. When stopping AppCallbackNotifier if any encoding sessions are still ongoing, cancel and wait for the threads to return. Previously, it was possible for Encoder threads to still be running when the preview and images buffers were freed. Change-Id: Ib123d1644dfa7058a6f50f0001b4d05359853827 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: EXIF thumbnail for video snapshotTyler Luu2011-10-071-49/+103
| | | | | | | | | | | | | | | | | Fixes b/5370657 1) Extend NV12 resizer to take stride insteadof hardcoding stride 2) Change Encoder class interface to support encoding a thumbnail and main jpeg image. Encoder will resize/encodethumbnail in parallel while encoding the main jpeg. Only NV21/NV12 resizing is supported. Thumbnail is created withpost view frame. 3) Add interface in Encoder class to replace thumbnail with jhead. 4) Height and width fields of EXIF are not proper. Fixed. Change-Id: I5d0063357e4e9e327d22805c2dddf8f630d22e7b Signed-off-by: Raji Reddy Kandi<rajireddy.k@samsung.com> Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* omap4xxx: camera: send different preview and video buffers for MMS modeAkwasi Boateng2011-10-071-4/+73
| | | | | | | | | | | | | | | | | | Fixes b/5265389 b/5156090 1. Add support to send different preview and video buffers to framework in MMS mode. 2. For resolutions less than or equal to QVGA, preview resolution will be changed to a bigger resolution matching the aspect ratio of the preview resolution. 3. During record the changed resolution will be resized to the original resolution and sent to the encoder. 4. Modified NV12 resizer routine to account for frame offset and stride to avoid double memcpy of the buffers Change-Id: If66aa1fd861078d0a63b4a77a1bdc20d4c6bccda Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* Grallock lock and unlock fixesAkwasi Boateng2011-09-211-30/+13
| | | | | | | | | | | 1. Get and store Y and UV pointers from all gralloc handles to be used for preview callback and video frames. 2. Ensure gralloc lock is successfull before frame return to OMXCameraAdapter Change-Id: Ibeea6d00f2c1a1c45bcd2eafb22b90a795516e5c Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
* CameraHal: Ensure frames are returned by AppCallbackNotifierTyler Luu2011-09-161-217/+155
| | | | | | | | | | | | | | | No bug filed for this, but it results in a crash. We can say it's a partial fix for b/5316293 1. Clean-up notifyFrame a bit by using a common function to send data callbacks. This ensures common functionality for the all frame types. 2. Flush all the frames after stopping AppCallbackNotifier to ensure notifyFrame doesn't operate on the buffers. Change-Id: I4b0c8a595ea5474e8c8f5f98cfee16e6c1bde949 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* CameraHal: Modify exit behavior of notify threadTyler Luu2011-09-141-33/+28
| | | | | | | | | | | | | | | | | | When the camera app dies, sometimes the release() call is coming from the same thread as a callback instead of the main thread. When this happens, it causes a segfault in AppCallbackNotifier because we end up destroying AppCallbackNotifier without the NotificationThread knowing. The subsequent waitForMsg() after release() will result in a segfault since the message queues are deleted. Instead of looping forever in a while loop in the notification thread, return bool value in looper function. This gives the Thread class a chance to exit in case of a requestExit() in the same thread. Looper function will automatically will be called again if exit is not pending and previous looper function call returned true. Change-Id: I6bdc65df71e2c3ebcbd409654b828edef29b1a0e Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHAL: MTS: Synchronize AppCallbackNotifier::stop with notifyFrameSundar Raman2011-09-141-22/+62
| | | | | | | | | | | | | AppCallbackNotifier::stop has to wait for any 2D copies to complete before exiting because the tiler 2d memory might get released by the destruction of the surface after stopPreview finishes. This patch takes care of synchronizing any ongoing copies from surface buffers with the stop method and effectively avoids access after free issues. Change-Id: Id7e5b6fab4a2a6b7fcce0ba8b9bd3ad315263eaa Signed-off-by: Sundar Raman <sunds@ti.com>
* Camera HAL: Crash media server in case of camera hardware errorsSundar Raman2011-09-141-0/+9
| | | | | | | | | | | | | | Applications do not handle errors other then CAMERA_SERVER_DIED. So there is no way for the application to know about fatal errors other than killing the media server when they happen. So this patch aborts media server whenever the ducati throws a fatal exception or when it hangs so that the apps notify the user of the error and then close. The user will be able to restart the application since the media server restarts automatically and the ducati is also restored by syslink automatically. Change-Id: Ic3e93130818edbe281affca99b808e09e08614c5 Signed-off-by: Sundar Raman <sunds@ti.com>
* CameraHAL: Updates related to multiple MTS,CTS testsSundar Raman2011-09-121-18/+77
| | | | | | | | | | | | | | | | - Test '#testTakePicture' in both the MTS suite and the CTS package, require raw callbacks to be generated when 'takePicture()' is provided with an appropriate handler for it. Unfortunately, raw data is not always provided by the CameraAdapters. This modification adds the necessary functionality in order to enable raw callbacks, when needed. Change-Id: I1369f7a6edbc54195c5a71b35e0096c72d6ed368 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Change-Id: I2b963f5c23d31b02f3d59e1ee8c36cf3cd195bb6 Signed-off-by: Sundar Raman <sunds@ti.com>
* CameraHal: Add Exif support to video snapshotTyler Luu2011-09-121-8/+37
| | | | | | | | Use jhead library to insert Exif to jpeg stream returned from libjpeg. Change-Id: Ia6398180b7ef3c1b3ddcb35e489527289565fef5 Signed-off-by: Tyler Luu <tluu@ti.com>
* Unblock semaphores during Fatal ErrorsAkwasi Boateng2011-09-121-18/+7
| | | | | | | | | | | | | 1. Remove all pending events and unblock all waiting semaphore during Fatal error. 2. Exit execution when in invalid state. 3. Remove error nitiifcation from Appcallback thread Change-Id: I1612ff75e83ebf285d4cc168a829e0f81d4968b1 Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
* CameraHal: Use the same gralloc usage bits for alloc and writeTyler Luu2011-09-071-3/+1
| | | | | Change-Id: I013fd9ff40efb0ceaa1575a5af1c077d72e7921d Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHal: Initial support for video snapshotTyler Luu2011-09-021-1/+124
| | | | | | | | | | Adds support for capturing an image while recording in video mode. Sets up Ducati to return a YUV422I buffer and encode is performed in AppCallbackNotifier with Encoder_libjpeg class. Change-Id: Ia351fc99dab63a12add8c6c960b186bbe5be275a Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHAL: Fixes for CTS test #testJpegCallbackStartPreviewTyler Luu2011-08-311-3/+9
| | | | | | | | | | | | | - The camera client should be able to restart the preview from within the context of a jpeg callback. Depending on the binder ipc timing this may not be possible, because image capture is stopped right after the jpeg data callback. Change-Id: Id006ecd4d9f82eaa74b38f921bed2543f8c0c217 Original-author: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHal: Lock buffers sent to FrameProviderTyler Luu2011-08-301-4/+14
| | | | | | | | | | Use GraphicBufferMapper API to lock buffer before sending to FrameProvider to ensure there isn't simultaneous accesses to bufffer by SGX Change-Id: Ifbb5c88bac49b1b494bd984137b523d35f4a6f57 Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHAL: fixes the UV buffer start address calculation.Sundar Raman2011-08-261-1/+1
| | | | | | | Signed-off-by: Solaiyappan Saravanan <saravanan.s@ti.com> Change-Id: Ie3ed733fb163ac686c9d42766923ccc7e3715a5e Signed-off-by: Sundar Raman <sunds@ti.com>
* omap4xxx: camera: lock gralloc buffers read-rarely/write-neverIliyan Malchev2011-08-231-1/+3
| | | | | Change-Id: Iacf80f7485e78d20000df27bca9e57caafcea111 Signed-off-by: Iliyan Malchev <malchev@google.com>
* initial commitIliyan Malchev2011-08-081-0/+1399
Change-Id: I8f7a7eeece0e516efa486b77e9d97805c0e65d3e Signed-off-by: Iliyan Malchev <malchev@google.com>