diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2015-04-11 12:09:11 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2015-04-14 16:36:50 -0700 |
commit | ad916f7fd3fbb202f2993fea04b0bdad3dcd6de6 (patch) | |
tree | d076b33e830cdbd440dadfe863afc32cfae5d9de /media/tests | |
parent | 2eabe5b7a9c396b1d6baebca7505a4e921312fc2 (diff) | |
download | frameworks_base-ad916f7fd3fbb202f2993fea04b0bdad3dcd6de6.zip frameworks_base-ad916f7fd3fbb202f2993fea04b0bdad3dcd6de6.tar.gz frameworks_base-ad916f7fd3fbb202f2993fea04b0bdad3dcd6de6.tar.bz2 |
Camera2: Add prepare method for output buffer pre-allocation
Normally, buffers for camera output Surfaces are allocated as
needed. This minimizes memory overhead and time to first frame.
However, if allocation takes a long time, as it can do for full-resolution
output buffers, full frame rate may not be maintainable with the added
allocation overhead.
The prepare() method allows an application to indicate that buffers for
a given output Surface should be preallocated by the camera device.
Once the allocation is complete, the onSurfacePrepared callback is invoked.
The application may then use the prepared Surface without concerns about
allocation-caused delays.
Change-Id: I4f616dc87dd4346f408cf1ea37d48a642ceb57da
Diffstat (limited to 'media/tests')
2 files changed, 20 insertions, 0 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java index 3bb5f01..14c2619 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java @@ -261,6 +261,16 @@ public class CameraBinderTest extends AndroidTestCase { // TODO Auto-generated method stub } + + /* + * (non-Javadoc) + * @see android.hardware.camera2.ICameraDeviceCallbacks#onPrepared() + */ + @Override + public void onPrepared(int streamId) throws RemoteException { + // TODO Auto-generated method stub + + } } @SmallTest diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java index 0466540..6f33672 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java @@ -132,6 +132,16 @@ public class CameraDeviceBinderTest extends AndroidTestCase { // TODO Auto-generated method stub } + + /* + * (non-Javadoc) + * @see android.hardware.camera2.ICameraDeviceCallbacks#onPrepared() + */ + @Override + public void onPrepared(int streamId) throws RemoteException { + // TODO Auto-generated method stub + + } } class IsMetadataNotEmpty extends ArgumentMatcher<CameraMetadataNative> { |