Hi,

This fix the compilation issue for me.

Michael

The interface to the registerBuffers has changed. The user must allocate
a BufferHeap structure and use it for the registerBuffers.
Rename the setFrameCallback to setPreviewCallback

Signed-off-by: Michael Trimarchi <[email protected]>
---
diff --git a/android/android_surface_output.cpp b/android/android_surface_output.cpp
index 262a329..1c22d3b 100755
--- a/android/android_surface_output.cpp
+++ b/android/android_surface_output.cpp
@@ -1045,7 +1045,12 @@ OSCL_EXPORT_REF bool AndroidSurfaceOutput::initCheck()
                 LOGE("Error creating frame buffer heap");
                 return false;
             }
-            status_t ret = mSurface->registerBuffers(displayWidth, displayHeight, frameWidth, frameHeight, PIXEL_FORMAT_RGB_565, mFrameHeap);
+
+            ISurface::BufferHeap buffer(
+                displayWidth, displayHeight, frameWidth, frameHeight,
+                PIXEL_FORMAT_RGB_565, 0, 0, mFrameHeap);
+
+            status_t ret = mSurface->registerBuffers(buffer);
 
             // create frame buffers
             for (int i = 0; i < kBufferCount; i++) {
@@ -1075,7 +1080,11 @@ OSCL_EXPORT_REF bool AndroidSurfaceOutput::initCheck()
             mHeapPmem = new MemoryHeapPmem(master, 0);
             mHeapPmem->slap();
             master.clear();
-            status_t ret = mSurface->registerBuffers(displayWidth, displayHeight, frameWidth, frameHeight, PIXEL_FORMAT_YCbCr_420_SP, mHeapPmem);
+            ISurface::BufferHeap buffer(
+                displayWidth, displayHeight, frameWidth, frameHeight,
+                PIXEL_FORMAT_YCbCr_420_SP, 0, 0, mHeapPmem);
+
+            status_t ret = mSurface->registerBuffers(buffer);
 
             // create frame buffers
             for (int i = 0; i < kBufferCount; i++) {
@@ -1123,7 +1132,12 @@ OSCL_EXPORT_REF PVMFStatus AndroidSurfaceOutput::WriteFrameBuf(uint8* aData, uin
             master.clear();
 
             // register frame buffers with SurfaceFlinger
-            status_t ret = mSurface->registerBuffers(iVideoDisplayWidth, iVideoDisplayHeight, iVideoWidth, iVideoHeight, PIXEL_FORMAT_YCbCr_420_SP, mHeapPmem);
+            ISurface::BufferHeap buffer(
+                iVideoDisplayWidth, iVideoDisplayHeight,
+                iVideoWidth, iVideoHeight,
+                PIXEL_FORMAT_YCbCr_420_SP, 0, 0, mHeapPmem);
+
+            status_t ret = mSurface->registerBuffers(buffer);
 
             mInitialized = true;
         }
diff --git a/android/author/android_camera_input.cpp b/android/author/android_camera_input.cpp
index 7d8fae9..ba6e75b 100644
--- a/android/author/android_camera_input.cpp
+++ b/android/author/android_camera_input.cpp
@@ -65,7 +65,7 @@ AndroidCameraInput::~AndroidCameraInput()
 {
     LOGV("destructor");
     if (mCamera != NULL) {
-        mCamera->setFrameCallback(NULL, this, FRAME_CALLBACK_FLAG_NOOP);
+        mCamera->setPreviewCallback(NULL, this, FRAME_CALLBACK_FLAG_NOOP);
         if ((mFlags & FLAGS_HOT_CAMERA) == 0) {
             LOGV("camera was cold when we started, stopping preview");
             mCamera->stopPreview();
@@ -887,7 +887,7 @@ PVMFStatus AndroidCameraInput::DoStart()
 {
     LOGV("DoStart");
     iState = STATE_STARTED;
-    mCamera->setFrameCallback(preview_callback, this, FRAME_CALLBACK_FLAG_CAMCORDER);
+    mCamera->setPreviewCallback(preview_callback, this, FRAME_CALLBACK_FLAG_CAMCORDER);
     AddDataEventToQueue(iMilliSecondsPerDataEvent);
     return PVMFSuccess;
 
@@ -923,7 +923,7 @@ PVMFStatus AndroidCameraInput::DoStop(const AndroidCameraInputCmd& aCmd)
 {
     LOGV("DoStop");
     iDataEventCounter = 0;
-    mCamera->setFrameCallback(NULL, this);
+    mCamera->setPreviewCallback(NULL, this);
 
     // if no buffers pending, complete the stop command
     if (mFrameRefCount == 0) {

_______________________________________________
android-freerunner mailing list
[email protected]
http://android.koolu.org/listinfo.cgi/android-freerunner-koolu.org

Reply via email to