[Cast] Refactor ExternalVideoEncoder for cleaner/simpler encapsulation.
commit7ccf0ef39c36bed75b19ad08a87a0e93c60893ba
authormiu <miu@chromium.org>
Fri, 30 Jan 2015 01:24:28 +0000 (29 17:24 -0800)
committerCommit bot <commit-bot@chromium.org>
Fri, 30 Jan 2015 01:25:07 +0000 (30 01:25 +0000)
tree19b275d726c0407d449ea85b5777ff74cbdbd770
parentb4fd13cb9dca2d60333e6e9211dd5b88b0ca9739
[Cast] Refactor ExternalVideoEncoder for cleaner/simpler encapsulation.

There was a lot of hopping around between two classes, each class having
code that executes on two threads.  This change makes
ExternalVideoEncoder live entirely on the cast MAIN thread, and the VEA
client live entirely on the VEA's own thread.  This greatly simplified
the code and improved readability (especially the create/init sequence).

Also added a new FakeVideoEncodeAcceleratorFactory class to provide
common functionality for multiple unit test modules.  In a soon-upcoming
change, the video_sender_unittest.cc code will start using it.

BUG=325998, 451277

Review URL: https://codereview.chromium.org/868803007

Cr-Commit-Position: refs/heads/master@{#313852}
media/cast/BUILD.gn
media/cast/cast_testing.gypi
media/cast/sender/external_video_encoder.cc
media/cast/sender/external_video_encoder.h
media/cast/sender/external_video_encoder_unittest.cc
media/cast/sender/fake_video_encode_accelerator_factory.cc [new file with mode: 0644]
media/cast/sender/fake_video_encode_accelerator_factory.h [new file with mode: 0644]
media/cast/sender/video_sender.cc