DescriptionPart of a series of CLs for FakeVideoCaptureDevice with the goal of allowing us
to expand our test coverage of the video capture pipeline.
Goal of this change:
* Make FakeVideoCaptureDeviceFactory configurable to arbitrary fake device
configurations. This includes setting up fake devices that support more than
one pixel format, e.g. I420 and MJPEG.
Approach taken:
* Remove class FakeVideoCaptureDeviceMaker and place the logic for creating
instances of FakeVideoCaptureDevice into
FakeVideoCaptureDeviceFactory::CreateDeviceWithSupportedFormats().
This requires moving the relevant class declaration from
fake_video_capture_device.cc to fake_video_capture_device.h.
* To allow being switched between different output formats, it is no longer
sufficient to provide instances of FakeVideoCaptureDevice with a fixed
FrameDeliverer at construction time. Instead, we now provide a
FrameDelivererFactory at construction time and have the FakeVideoCaptureDevice
request an appropriate FrameDeliverer in AllocateAndStart(). With a new
FrameDeliverer being created every time the device is started, there is no
longer a need for it to have an Uninitialize() method.
* Instead of just snapping to a supported size, fake devices now have to
select which supported pixel format to use (since they may support more than
one).
* Make FakeVideoCaptureDeviceFactory configurable through a public API instead
of privately pulling configuration from a command-line string. Configuration
through the command-line string still works as before when creating the
factory via VideoCaptureDeviceFactory::CreateFactory().
* Added test cases for configuring a fake device that does not support any
format.
This CL is part of the Mojo Video Capture work. For the bigger picture,
see [1] CL12b.
BUG=584797
TEST=
capture_unittests --gtest_filter="*Fake*"
content_unittests --gtest_filter="*Video*"
out/Default/chrome --use-fake-device-for-media-stream=device-count=3 https://webrtc.github.io/samples/src/content/getusermedia/gum/
[1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing
Review-Url: https://codereview.chromium.org/2715513008
Cr-Commit-Position: refs/heads/master@{#454365}
Committed: https://chromium.googlesource.com/chromium/src/+/b0ee07cd95863c50ca5bf553bab82bf54b82d500
Patch Set 1 #Patch Set 2 : Fix compiler warning. Fix WebRtcDepthCaptureBrowserTest. #
Total comments: 17
Patch Set 3 : emircan@ suggestions #
Total comments: 6
Depends on Patchset: Dependent Patchsets: Messages
Total messages: 30 (21 generated)
|