Add v4l2 enum controls.
Some V4L2 controls are simple enum menus, and are directly
analagous to metadata controls. The new V4L2EnumControl class
is a generalized converter between the two.
BUG: https://b/30140438, https://b/29394024
TEST: unit tests pass
Change-Id: I9f8bed200e21cb7e3f3336608fe210f094b7aa42
diff --git a/modules/camera/3_4/metadata/control.h b/modules/camera/3_4/metadata/control.h
index 4b4adcf..eff8c2f 100644
--- a/modules/camera/3_4/metadata/control.h
+++ b/modules/camera/3_4/metadata/control.h
@@ -46,6 +46,11 @@
inline int32_t ControlTag() const { return ControlTags()[0]; }
// Get/Set the control value. Return non-0 on failure.
+ // Controls are allowed to be unreliable, so SetValue is best-effort;
+ // GetValue immediately after may not match (SetValue may, for example,
+ // automatically replace invalid values with valid ones,
+ // or have a delay before setting the requested value).
+ // GetValue should always indicate the actual current value of the control.
virtual int GetValue(T* value) const = 0;
virtual int SetValue(const T& value) = 0;
// Helper to check if val is supported by this control.