summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-03-09 13:49:21 -0800
committerWu-cheng Li <wuchengli@google.com>2010-03-09 13:55:27 -0800
commitc10275abd6a494c93a025f683dde104a5d4f2793 (patch)
tree89f8b128350c8da36714b10b02f20f073bbfe1b6
parent90ebc55f35ca0b3f5294c0bf7b15981178199bc4 (diff)
downloadframeworks_base-c10275abd6a494c93a025f683dde104a5d4f2793.zip
frameworks_base-c10275abd6a494c93a025f683dde104a5d4f2793.tar.gz
frameworks_base-c10275abd6a494c93a025f683dde104a5d4f2793.tar.bz2
Document new preview callback methods more clearly.
bug:2358064 Change-Id: If6af1fbf81b78b2a7ad98ce2c398145fd33200ce
-rw-r--r--core/java/android/hardware/Camera.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 5a63ae1..3484d55 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -270,7 +270,13 @@ public class Camera {
}
/**
- * Adds a pre-allocated buffer to the callback buffer queue.
+ * Adds a pre-allocated buffer to the callback buffer queue. Applications
+ * can add one or more buffers to the queue. When a preview frame arrives
+ * and there is still available buffer, buffer will be filled and it is
+ * removed from the queue. Then preview callback is invoked with the buffer.
+ * If a frame arrives and there is no buffer left, the frame is discarded.
+ * Applications should add the buffers back when they finish the processing.
+ *
* Preview width and height can be determined from getPreviewSize, and bitsPerPixel can be
* found from {@link android.hardware.Camera.Parameters#getPreviewFormat()}
* and {@link android.graphics.ImageFormat#getBitsPerPixel(int)}.