Align the order of buffers to the listed cameras

There is no guarantee that the order of the EVS incoming buffers follows
the order of listed cameras in the config. So I added a logic to check
the deviceId of the buffers, and re-order them based on the camera ids.

Also added locks to protect the doneWithFrame_1_1 method calls.

Bug:160805910
Bug: 162599435
Test: Build and run on local machine.

Change-Id: I150b1fa5f38c83d6a5a4385d03181878ba3182b5
Merged-In: I150b1fa5f38c83d6a5a4385d03181878ba3182b5
(cherry picked from commit cf3ea74f7a528e16966330a4199c6e4cd78c7189)
2 files changed
tree: a2ccd6074f62a0fea86d40f6153f326a2c848168
  1. car-bugreportd/
  2. car-default-input-service/
  3. car-internal-lib/
  4. car-lib/
  5. car-maps-placeholder/
  6. car-systemtest-lib/
  7. car-test-lib/
  8. car-usb-handler/
  9. car_product/
  10. computepipe/
  11. EncryptionRunner/
  12. evs/
  13. experimental/
  14. FrameworkPackageStubs/
  15. obd2-lib/
  16. procfs-inspector/
  17. service/
  18. surround_view/
  19. tests/
  20. tools/
  21. user/
  22. vehicle-hal-support-lib/
  23. watchdog/
  24. .clang-format
  25. .gitignore
  26. Android.mk
  27. CleanSpec.mk
  28. CPPLINT.cfg
  29. OWNERS
  30. PREUPLOAD.cfg
  31. README.md
  32. 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.