From 29bedbbf1e6d3342ae4b9b04043144a5450b49b1 Mon Sep 17 00:00:00 2001
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Date: Thu, 12 Apr 2012 15:58:11 +0200
Subject: [PATCH] omap4xxx-camera: update for the new camera_request_memory type

Change-Id: I246a6d6c7374fef3282b762f5302e9f7c7fdeb56
---
 camera/AppCallbackNotifier.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp b/hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp
index bfdd671..0423c94 100644
--- a/hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp
+++ b/hardware/ti/omap4xxx/camera/AppCallbackNotifier.cpp
@@ -396,7 +396,7 @@ void AppCallbackNotifier::notifyEvent()
                          ( mCameraHal->msgTypeEnabled(CAMERA_MSG_PREVIEW_METADATA) ) )
                         {
                         // WA for an issue inside CameraService
-                        camera_memory_t *tmpBuffer = mRequestMemory(-1, 1, 1, NULL);
+                        camera_memory_t *tmpBuffer = mRequestMemory(-1, 1, 1, 0, NULL);
 
                         mDataCb(CAMERA_MSG_PREVIEW_METADATA,
                                 tmpBuffer,
@@ -617,7 +617,7 @@ void AppCallbackNotifier::copyAndSendPictureFrame(CameraFrame* frame, int32_t ms
             goto exit;
         }
 
-        picture = mRequestMemory(-1, frame->mLength, 1, NULL);
+        picture = mRequestMemory(-1, frame->mLength, 1, 0, NULL);
 
         if (NULL != picture) {
             dest = picture->data;
@@ -727,7 +727,7 @@ status_t AppCallbackNotifier::dummyRaw()
          ( NULL != mNotifyCb ) ){
 
         if ( mCameraHal->msgTypeEnabled(CAMERA_MSG_RAW_IMAGE) ) {
-            camera_memory_t *dummyRaw = mRequestMemory(-1, 1, 1, NULL);
+            camera_memory_t *dummyRaw = mRequestMemory(-1, 1, 1, 0, NULL);
 
             if ( NULL == dummyRaw ) {
                 CAMHAL_LOGEA("Dummy raw buffer allocation failed!");
@@ -817,7 +817,7 @@ void AppCallbackNotifier::notifyFrame()
                     unsigned int current_snapshot = 0;
                     Encoder_libjpeg::params *main_jpeg = NULL, *tn_jpeg = NULL;
                     void* exif_data = NULL;
-                    camera_memory_t* raw_picture = mRequestMemory(-1, frame->mLength, 1, NULL);
+                    camera_memory_t* raw_picture = mRequestMemory(-1, frame->mLength, 1, 0, NULL);
 
                     if(raw_picture) {
                         buf = raw_picture->data;
@@ -1016,7 +1016,7 @@ void AppCallbackNotifier::notifyFrame()
                         else
                             {
                             //TODO: Need to revisit this, should ideally be mapping the TILER buffer using mRequestMemory
-                            camera_memory_t* fakebuf = mRequestMemory(-1, 4, 1, NULL);
+                            camera_memory_t* fakebuf = mRequestMemory(-1, 4, 1, 0, NULL);
                             if( (NULL == fakebuf) || ( NULL == fakebuf->data) || ( NULL == frame->mBuffer))
                                 {
                                 CAMHAL_LOGEA("Error! One of the video buffers is NULL");
@@ -1398,7 +1398,7 @@ status_t AppCallbackNotifier::startPreviewCallbacks(CameraParameters &params, vo
         mPreviewPixelFormat = CameraParameters::PIXEL_FORMAT_RGB565;
         }
 
-    mPreviewMemory = mRequestMemory(-1, size, AppCallbackNotifier::MAX_BUFFERS, NULL);
+    mPreviewMemory = mRequestMemory(-1, size, AppCallbackNotifier::MAX_BUFFERS, 0, NULL);
     if (!mPreviewMemory) {
         return NO_MEMORY;
     }
@@ -1547,7 +1547,7 @@ status_t AppCallbackNotifier::initSharedVideoBuffers(void *buffers, uint32_t *of
 
         for (uint32_t i = 0; i < count; i++)
             {
-            videoMedatadaBufferMemory = mRequestMemory(-1, sizeof(video_metadata_t), 1, NULL);
+            videoMedatadaBufferMemory = mRequestMemory(-1, sizeof(video_metadata_t), 1, 0, NULL);
             if((NULL == videoMedatadaBufferMemory) || (NULL == videoMedatadaBufferMemory->data))
                 {
                 CAMHAL_LOGEA("Error! Could not allocate memory for Video Metadata Buffers");
-- 
1.7.2.5

