Extend EVS interfaces and data types

This change extends the definition of CameraDesc with the additional
camera metadata field that various camera module informaiton will be
stored.

IEvsEnumerator is extended with three new methods:
    - getCameraList_1_1() returns a list of new camera descriptors
    - openCamera_1_1() tries to open a camera device with a given
      stream configuration.

IEvsCameraStream has below changes:
    - deliverFrame_1_1() method is added to handle a frame in new
      BufferDesc.
    - Rename notifyEvent() as notify().

IEvsCamera also has below new methods:
    - getCameraInfo_1_1() returns a new camera descriptor.
    - getParameterList() returns a list of camera control parameters
      supported by the camera device.
    - getIntParameterRange() returns a valid range of parameter values.
    - Parameter setter and getter methods are renamed.

VTS test cases are updated to use new methods and below test cases are
added to validate their behaviors:
    - CameraUseStreamConfigToDisplay verifies end-to-end video stream
      with a stream configuration it finds from CameraDesc's metadata.
    - MultiCameraStreamUseConfig verifies two clients can start and
      stop video streams on the same underlying camera with same stream
      configuration.

Bug: 128851019
Test: VtsHalEvsV1_1Target
Change-Id: Ia6b0b94aff869129cb400d0a4c4df91e72682784
Signed-off-by: Changyeon Jo <changyeon@google.com>
diff --git a/automotive/evs/1.1/default/EvsCamera.h b/automotive/evs/1.1/default/EvsCamera.h
index 47a3164..c15b4b1 100644
--- a/automotive/evs/1.1/default/EvsCamera.h
+++ b/automotive/evs/1.1/default/EvsCamera.h
@@ -25,6 +25,8 @@
 
 #include <thread>
 
+#include "ConfigManager.h"
+
 using BufferDesc_1_0 = ::android::hardware::automotive::evs::V1_0::BufferDesc;
 using BufferDesc_1_1 = ::android::hardware::automotive::evs::V1_1::BufferDesc;
 using IEvsCameraStream_1_0 = ::android::hardware::automotive::evs::V1_0::IEvsCameraStream;
@@ -59,18 +61,28 @@
     Return<EvsResult> setExtendedInfo(uint32_t opaqueIdentifier, int32_t opaqueValue) override;
 
     // Methods from ::android::hardware::automotive::evs::V1_1::IEvsCamera follow.
+    Return<void>      getCameraInfo_1_1(getCameraInfo_1_1_cb _hidl_cb)  override;
     Return<EvsResult> pauseVideoStream() override;
     Return<EvsResult> resumeVideoStream() override;
     Return<EvsResult> doneWithFrame_1_1(const BufferDesc_1_1& buffer) override;
     Return<EvsResult> setMaster() override;
     Return<EvsResult> forceMaster(const sp<IEvsDisplay>& display) override;
     Return<EvsResult> unsetMaster() override;
-    Return<void>      setParameter(CameraParam id, int32_t value,
-                                   setParameter_cb _hidl_cb) override;
-    Return<void>      getParameter(CameraParam id, getParameter_cb _hidl_cb) override;
+    Return<void>      getParameterList(getParameterList_cb _hidl_cb) override;
+    Return<void>      getIntParameterRange(CameraParam id,
+                                           getIntParameterRange_cb _hidl_cb) override;
+    Return<void>      setIntParameter(CameraParam id, int32_t value,
+                                      setIntParameter_cb _hidl_cb) override;
+    Return<void>      getIntParameter(CameraParam id,
+                                      getIntParameter_cb _hidl_cb) override;
 
-    // Implementation details
-    EvsCamera(const char *id);
+    static sp<EvsCamera> Create(const char *deviceName);
+    static sp<EvsCamera> Create(const char *deviceName,
+                                unique_ptr<ConfigManager::CameraInfo> &camInfo,
+                                const Stream *streamCfg = nullptr);
+    EvsCamera(const EvsCamera&) = delete;
+    EvsCamera& operator=(const EvsCamera&) = delete;
+
     virtual ~EvsCamera() override;
     void forceShutdown();   // This gets called if another caller "steals" ownership of the camera
 
@@ -79,7 +91,10 @@
     static const char kCameraName_Backup[];
 
 private:
+    EvsCamera(const char *id,
+              unique_ptr<ConfigManager::CameraInfo> &camInfo);
     // These three functions are expected to be called while mAccessLock is held
+    //
     bool setAvailableFrames_Locked(unsigned bufferCount);
     unsigned increaseAvailableFrames_Locked(unsigned numToAdd);
     unsigned decreaseAvailableFrames_Locked(unsigned numToRemove);
@@ -124,6 +139,9 @@
 
     // Synchronization necessary to deconflict mCaptureThread from the main service thread
     std::mutex mAccessLock;
+
+    // Static camera module information
+    unique_ptr<ConfigManager::CameraInfo> &mCameraInfo;
 };
 
 } // namespace implementation