Commit abcbc535 authored by Chih-Yu Huang's avatar Chih-Yu Huang Committed by Commit Bot

vea: Check flush behavior in VEA unittest.

This CL checks VEA flush behavior by adding two states: CS_FLUSHING
and CS_FLUSHED. Now the encoding flow becomes:

- Set state from CS_ENCODING to CS_FLUSHING
  when the client sends the last frame and calls VEA::Flush(flush_cb)
- Set state from CS_FLUSHING to CS_FINISHED
  when the client receives the last encoded frame
- Set state from CS_FINISHED to CS_FLUSHED
  when flush_cb(success=true) is called
- Set state to CS_ERROR if either of situation is true:
  - flush_cb(success=false) is called before last encoded frame is
    received
  - flush_cb(success=true) is not called in a period of time
    (e.g 200 ms) from VEA::Flush() is called.

BUG=chromium:820313
TEST=Run video_encode_accelerator_unittest at scarlet device

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I2a83b0e7f902575b084ae4ccf85f3ba7d5f74819
Reviewed-on: https://chromium-review.googlesource.com/908370Reviewed-by: default avatarKuang-che Wu <kcwu@chromium.org>
Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548288}
parent ab9d3399
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment