Fix a procedure to stop a video stream

To group frame buffers from participating physical camera devices
together, EVS manager implements a synchronization logic in
VirtualCamera with the timer, which expires if no new frame arrives from
camera devices within 5 seconds.  This was introduced to detect hanging
camera devices and, however, makes EVS manager stands still when it
handles a request to stop an active video stream.

This CL corrects this erroneous behavior by clearing pending capture
requests properly and signalling the condition to unblock a capture
thread.

Fix: 187371938
Test: Start and stop CarEvsCameraPreviewApp with below commands and
      EVS manager stops a video stream immediately.
    > adb shell cmd car_service inject-vhal-event 0x11410f10 0,1
    > adb shell cmd car_service inject-vhal-event 0x11410f10 0,0
Change-Id: I14adb22779302dee81f1c324eb1fc6a13e795683
Merged-In: I14adb22779302dee81f1c324eb1fc6a13e795683
(cherry picked from commit e6ed860cda7033243046e9a303a41ab9947e4974)
3 files changed
tree: 59414077ed2b5b60ea9e6a1470d98f9bae8eab15
  1. car-admin-ui-lib/
  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. data/
  11. experimental/
  12. FrameworkPackageStubs/
  13. obd2-lib/
  14. packages/
  15. procfs-inspector/
  16. service/
  17. tests/
  18. tools/
  19. user/
  20. vehicle-hal-support-lib/
  21. .clang-format
  22. .gitignore
  23. Android.mk
  24. CleanSpec.mk
  25. CPPLINT.cfg
  26. OWNERS
  27. PREUPLOAD.cfg
  28. README.md
  29. 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.