summaryrefslogtreecommitdiffstats
path: root/media/tests/MediaFrameworkTest
diff options
context:
space:
mode:
authorYin-Chia Yeh <yinchiayeh@google.com>2014-07-15 10:37:31 -0700
committerYin-Chia Yeh <yinchiayeh@google.com>2014-07-18 16:00:53 -0700
commit12da140082323d9aa048b3e928505a0a2adfdda7 (patch)
treeed8d6f11bc72817b7f9f69c6d8b3c4d2c5764109 /media/tests/MediaFrameworkTest
parenta4ab780877808dbee334f7c7cc4acefa0aa313b2 (diff)
downloadframeworks_base-12da140082323d9aa048b3e928505a0a2adfdda7.zip
frameworks_base-12da140082323d9aa048b3e928505a0a2adfdda7.tar.gz
frameworks_base-12da140082323d9aa048b3e928505a0a2adfdda7.tar.bz2
Camera2: add highSpeedVideoConfig wrapper and APIs
- Add wrapper class for highSpeedVideoConfiguration. - Add APIs to query high speed video recording configurations in StreamConfigurationMap - Fix ColorSpaceTransform unit test in CameraMetadataTest - Fix a bug in HashCodeHelper Change-Id: I192e57f6ab5dfbba6d958571352f067a9eaec7b2
Diffstat (limited to 'media/tests/MediaFrameworkTest')
-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