Add emulated camera device support

This change implements logics to emulate camera devices for EVS clients.
As the first milestone, this synthesizes a video stream from images
stored on the device in YUYV format.  Source images must be in the same
resolution and accessible by automotive_evs user/group.

This feature helps the developers to verify and validate their EVS
service implementations on predefined static image sequence and
therefore also debug the issues more efficiently.

"(?i)emulated/[0-9]+" pattern is reserved only for emulated camera
devices.

Below example command adds an emulated camera device as "emulated/0" and
configures it to generate 640x360 video stream from images stored at
/data/vendor/evs/, at every 100ms.
$ adb shell lshal debug \
  android.hardware.automotive.evs@1.1::IEvsEnumerator/default \
  --configure-emulated-camera emulated/0 /data/vendor/evs/ 640 360 100

If a emulated camera device with a given identifier is active, updated
configurations will be effective when it is closed.

Bug: 157678559
Test: Run above example
Change-Id: Ib2610f9d2f5bd07246abbf36be07eeaee9ef59d1
7 files changed
tree: 63c191ff8a86470e5ce6500168f44eac5095213c
  1. car-bugreportd/
  2. car-internal-lib/
  3. car-lib/
  4. car-maps-placeholder/
  5. car-systemtest-lib/
  6. car-test-lib/
  7. car-usb-handler/
  8. car_product/
  9. cpp/
  10. experimental/
  11. FrameworkPackageStubs/
  12. obd2-lib/
  13. packages/
  14. procfs-inspector/
  15. service/
  16. tests/
  17. tools/
  18. user/
  19. vehicle-hal-support-lib/
  20. .clang-format
  21. .gitignore
  22. Android.mk
  23. CleanSpec.mk
  24. CPPLINT.cfg
  25. OWNERS
  26. PREUPLOAD.cfg
  27. README.md
  28. TEST_MAPPING
README.md

Native (C++) code format is required to be compatible with .clang-format file. Run

git clang-format --style=file --extension='h,cpp,cc' HEAD~

Note that clang-format is not desirable for Android java files. Therefore the command line above is limited to specific extensions.