aboutsummaryrefslogtreecommitdiff
path: root/evs/sampleDriver/EvsEnumerator.cpp
diff options
context:
space:
mode:
authorScott Randolph <randolphs@google.com>2017-05-05 17:03:40 -0700
committerScott Randolph <randolphs@google.com>2017-05-05 17:07:23 -0700
commitfcde9da7aef6231cdb60975ccf06997444783de5 (patch)
treedc000fc8fd497965970d0579ee47d23677fe0b0d /evs/sampleDriver/EvsEnumerator.cpp
parentfb6472fcbb10800e9ec6cfdfa8780870fd625286 (diff)
downloadCar-fcde9da7aef6231cdb60975ccf06997444783de5.tar.gz
Don't use V4L2_PIX_FMT_ARGB32 if its not defined
Fixes the build for targets using headers from pre 3.17 kernels Test: lunch bullhead-userdebug & m -j android.hardware.automotive.evs@1.0-sample Change-Id: Ic830d6c89b733d6cd6aa83c1b294731123f7506c
Diffstat (limited to 'evs/sampleDriver/EvsEnumerator.cpp')
-rw-r--r--evs/sampleDriver/EvsEnumerator.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/evs/sampleDriver/EvsEnumerator.cpp b/evs/sampleDriver/EvsEnumerator.cpp
index 795af6b3ad..25b8133b7d 100644
--- a/evs/sampleDriver/EvsEnumerator.cpp
+++ b/evs/sampleDriver/EvsEnumerator.cpp
@@ -257,8 +257,10 @@ bool EvsEnumerator::qualifyCaptureDevice(const char* deviceName) {
case V4L2_PIX_FMT_NV16: return true;
case V4L2_PIX_FMT_YVU420: return true;
case V4L2_PIX_FMT_RGB32: return true;
+#ifdef V4L2_PIX_FMT_ARGB32 // introduced with kernel v3.17
case V4L2_PIX_FMT_ARGB32: return true;
case V4L2_PIX_FMT_XRGB32: return true;
+#endif // V4L2_PIX_FMT_ARGB32
default: break;
}
} else {