aboutsummaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTimothy Knight <tknight@google.com>2014-10-11 17:15:42 -0700
committerTimothy Knight <tknight@google.com>2014-10-11 17:15:42 -0700
commit5de290fad9a990d5c552416dbf0df88c93e731b0 (patch)
tree62b0c0f5f61374f230bff2db42f91680616dfa73 /apps
parentbbb866aa9470768fe6a4573888a0320093d736ea (diff)
downloadpdk-5de290fad9a990d5c552416dbf0df88c93e731b0.tar.gz
CameraITS: Updated caps, and added cap test for unified timestamps test
Change-Id: I0f59154df3385a2118314f8bb9748e172afbe670
Diffstat (limited to 'apps')
-rw-r--r--apps/CameraITS/pymodules/its/caps.py10
-rw-r--r--apps/CameraITS/tests/scene0/test_unified_timestamps.py6
2 files changed, 12 insertions, 4 deletions
diff --git a/apps/CameraITS/pymodules/its/caps.py b/apps/CameraITS/pymodules/its/caps.py
index e70853f..08817cc 100644
--- a/apps/CameraITS/pymodules/its/caps.py
+++ b/apps/CameraITS/pymodules/its/caps.py
@@ -59,8 +59,9 @@ def manual_sensor(props):
Returns:
Boolean.
"""
- return props.has_key("android.request.availableCapabilities") and \
- 1 in props["android.request.availableCapabilities"]
+ return props.has_key("android.request.availableCapabilities") and \
+ 1 in props["android.request.availableCapabilities"] \
+ or full(props)
def manual_post_proc(props):
"""Returns whether a device supports MANUAL_POST_PROCESSING capabilities.
@@ -71,8 +72,9 @@ def manual_post_proc(props):
Returns:
Boolean.
"""
- return props.has_key("android.request.availableCapabilities") and \
- 2 in props["android.request.availableCapabilities"]
+ return props.has_key("android.request.availableCapabilities") and \
+ 2 in props["android.request.availableCapabilities"] \
+ or full(props)
def raw(props):
"""Returns whether a device supports RAW capabilities.
diff --git a/apps/CameraITS/tests/scene0/test_unified_timestamps.py b/apps/CameraITS/tests/scene0/test_unified_timestamps.py
index 0359fae..f31ef22 100644
--- a/apps/CameraITS/tests/scene0/test_unified_timestamps.py
+++ b/apps/CameraITS/tests/scene0/test_unified_timestamps.py
@@ -14,6 +14,7 @@
import its.device
import its.objects
+import its.caps
import os.path
import time
@@ -25,6 +26,11 @@ def main():
with its.device.ItsSession() as cam:
props = cam.get_camera_properties()
+ # Only run test if the appropriate caps are claimed.
+ if not its.caps.sensor_fusion(props):
+ print "Test skipped"
+ return
+
# Get the timestamp of a captured image.
req, fmt = its.objects.get_fastest_manual_capture_settings(props)
cap = cam.do_capture(req, fmt)