summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorYin-Chia Yeh <yinchiayeh@google.com>2014-07-18 23:02:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-18 18:24:25 +0000
commit8f8141e24f4d890b4281b8c558ecc60efe5831c4 (patch)
tree6cc21cff5e53e22aff75b5d52d9f9efc2c96d806 /media
parent7bf379c8af399626d5b8b568fe1d4f96f56badcc (diff)
parent12da140082323d9aa048b3e928505a0a2adfdda7 (diff)
downloadframeworks_base-8f8141e24f4d890b4281b8c558ecc60efe5831c4.zip
frameworks_base-8f8141e24f4d890b4281b8c558ecc60efe5831c4.tar.gz
frameworks_base-8f8141e24f4d890b4281b8c558ecc60efe5831c4.tar.bz2
Merge "Camera2: add highSpeedVideoConfig wrapper and APIs" into lmp-dev
Diffstat (limited to 'media')
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java30
1 files changed, 28 insertions, 2 deletions
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
index ef06d2c..29c3c75 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
@@ -36,6 +36,7 @@ import android.hardware.camera2.impl.CameraMetadataNative;
import android.hardware.camera2.marshal.impl.MarshalQueryableEnum;
import android.hardware.camera2.params.ColorSpaceTransform;
import android.hardware.camera2.params.Face;
+import android.hardware.camera2.params.HighSpeedVideoConfiguration;
import android.hardware.camera2.params.MeteringRectangle;
import android.hardware.camera2.params.ReprocessFormatsMap;
import android.hardware.camera2.params.RggbChannelVector;
@@ -51,7 +52,6 @@ import static com.android.mediaframeworktest.unit.ByteArrayHelpers.*;
import java.lang.reflect.Array;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
-import java.util.Arrays;
import java.util.List;
/**
@@ -730,6 +730,32 @@ public class CameraMetadataTest extends junit.framework.TestCase {
}
@SmallTest
+ public void testReadWriteHighSpeedVideoConfiguration() {
+ // int32 x 4 x 1
+ checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations",
+ new HighSpeedVideoConfiguration(
+ /*width*/1000, /*height*/255, /*fpsMin*/30, /*fpsMax*/200),
+ /* width, height, fpsMin, fpsMax */
+ toByteArray(1000, 255, 30, 200));
+
+ // int32 x 4 x 3
+ checkKeyMarshal("android.control.availableHighSpeedVideoConfigurations",
+ new HighSpeedVideoConfiguration[] {
+ new HighSpeedVideoConfiguration(
+ /*width*/1280, /*height*/720, /*fpsMin*/60, /*fpsMax*/120),
+ new HighSpeedVideoConfiguration(
+ /*width*/123, /*height*/456, /*fpsMin*/1, /*fpsMax*/200),
+ new HighSpeedVideoConfiguration(
+ /*width*/4096, /*height*/2592, /*fpsMin*/30, /*fpsMax*/60)
+ },
+ toByteArray(
+ 1280, 720, 60, 120,
+ 123, 456, 1, 200,
+ 4096, 2592, 30, 60
+ ));
+ }
+
+ @SmallTest
public void testReadWriteColorSpaceTransform() {
// rational x 3 x 3
checkKeyMarshal("android.colorCorrection.transform",
@@ -741,7 +767,7 @@ public class CameraMetadataTest extends junit.framework.TestCase {
toByteArray(
1, 2, 3, 4, 5, 6,
7, 8, 8, 9, 10, 11,
- 1, 5, 2, 8, 3, 9));
+ 1, 5, 1, 4, 1, 3));
}
@SmallTest