[CTS10R3]android.hardware.camera2.cts.CaptureRequestTest#testDigitalZoomPreviewCombinations fail

[CTS10R3]android.hardware.camera2.cts.CaptureRequestTest#testDigitalZoomPreviewCombinations fail
内容 (2020-04-30)
[DESCRIPTION]
CtsCameraTestCases
android.hardware.camera2.cts.CaptureRequestTest#testDigitalZoomPreviewCombinations
Fail:
java.lang.Exception: There were 30 errors:
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:0, y:0, w:2559, h:1919, wt:1)] does not match actual one: [] (expected = [(x:0, y:0, w:2559, h:1919, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:214, y:161, w:2131, h:1597, wt:1)] does not match actual one: [] (expected = [(x:214, y:161, w:2131, h:1597, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:366, y:275, w:1827, h:1369, wt:1)] does not match actual one: [] (expected = [(x:366, y:275, w:1827, h:1369, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:480, y:360, w:1599, h:1199, wt:1)] does not match actual one: [] (expected = [(x:480, y:360, w:1599, h:1199, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:569, y:427, w:1421, h:1065, wt:1)] does not match actual one: [] (expected = [(x:569, y:427, w:1421, h:1065, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:640, y:480, w:1279, h:959, wt:1)] does not match actual one: [] (expected = [(x:640, y:480, w:1279, h:959, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:699, y:524, w:1161, h:871, wt:1)] does not match actual one: [] (expected = [(x:699, y:524, w:1161, h:871, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:747, y:561, w:1065, h:797, wt:1)] does not match actual one: [] (expected = [(x:747, y:561, w:1065, h:797, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:788, y:591, w:983, h:737, wt:1)] does not match actual one: [] (expected = [(x:788, y:591, w:983, h:737, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:823, y:618, w:913, h:683, wt:1)] does not match actual one: [] (expected = [(x:823, y:618, w:913, h:683, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:854, y:640, w:851, h:639, wt:1)] does not match actual one: [] (expected = [(x:854, y:640, w:851, h:639, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:880, y:660, w:799, h:599, wt:1)] does not match actual one: [] (expected = [(x:880, y:660, w:799, h:599, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:904, y:678, w:751, h:563, wt:1)] does not match actual one: [] (expected = [(x:904, y:678, w:751, h:563, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:925, y:694, w:709, h:531, wt:1)] does not match actual one: [] (expected = [(x:925, y:694, w:709, h:531, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 0: Expected 3A regions: [(x:944, y:708, w:671, h:503, wt:1)] does not match actual one: [] (expected = [(x:944, y:708, w:671, h:503, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:0, y:0, w:1599, h:1199, wt:1)] does not match actual one: [] (expected = [(x:0, y:0, w:1599, h:1199, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:134, y:101, w:1331, h:997, wt:1)] does not match actual one: [] (expected = [(x:134, y:101, w:1331, h:997, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:229, y:172, w:1141, h:855, wt:1)] does not match actual one: [] (expected = [(x:229, y:172, w:1141, h:855, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:300, y:225, w:999, h:749, wt:1)] does not match actual one: [] (expected = [(x:300, y:225, w:999, h:749, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:356, y:267, w:887, h:665, wt:1)] does not match actual one: [] (expected = [(x:356, y:267, w:887, h:665, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:400, y:300, w:799, h:599, wt:1)] does not match actual one: [] (expected = [(x:400, y:300, w:799, h:599, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:437, y:328, w:725, h:543, wt:1)] does not match actual one: [] (expected = [(x:437, y:328, w:725, h:543, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:467, y:351, w:665, h:497, wt:1)] does not match actual one: [] (expected = [(x:467, y:351, w:665, h:497, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:493, y:370, w:613, h:459, wt:1)] does not match actual one: [] (expected = [(x:493, y:370, w:613, h:459, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:515, y:386, w:569, h:427, wt:1)] does not match actual one: [] (expected = [(x:515, y:386, w:569, h:427, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:534, y:400, w:531, h:399, wt:1)] does not match actual one: [] (expected = [(x:534, y:400, w:531, h:399, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:550, y:413, w:499, h:373, wt:1)] does not match actual one: [] (expected = [(x:550, y:413, w:499, h:373, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:565, y:424, w:469, h:351, wt:1)] does not match actual one: [] (expected = [(x:565, y:424, w:469, h:351, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:578, y:434, w:443, h:331, wt:1)] does not match actual one: [] (expected = [(x:578, y:434, w:443, h:331, wt:1)], actual = []) )
  java.lang.Throwable(Test failed for camera 1: Expected 3A regions: [(x:590, y:443, w:419, h:313, wt:1)] does not match actual one: [] (expected = [(x:590, y:443, w:419, h:313, wt:1)], actual = []) )
[SOLUTION]
 加入以下判断条件:        //just for fix google camera ,preview & capture always capture intent 2
MINT32 rawType = 0; // ERawType_Proc
+    char AppPackageName[256]={'\0'};
+    ::property_get("com.android.camera2", AppPackageName, "com.mediatek.com");
+    if(strcmp(AppPackageName,"com.android.camera2") == 0){
IMetadata::IEntry entry(MTK_P1NODE_RAW_TYPE);
sp<IMetaStreamBuffer> pStremBuf = request.vIMetaBuffers[0];
IMetadata* pMetadata = pStremBuf->tryWriteLock(LOG_TAG);  //tryReadLock ==> tryWriteLock
@@ -415,7 +418,7 @@ submitRequest(AppRequest& request)
MY_LOGE("Preview:MTK_P1NODE_RAW_TYPE:%d",entry.itemAt(0,Type2Type<MINT32>()));
}
pStremBuf->unlock(LOG_TAG,pMetadata);
-
+   }

作者: RESSRC

个人资源站

发表评论

邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据