Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(963)

Unified Diff: media/capture/video/fake_video_capture_device_factory.h

Issue 2619503003: Split FakeVideoCaptureDevice into classes with single responsibility (Closed)
Patch Set: mcasas@ suggestions Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/capture/video/fake_video_capture_device_factory.h
diff --git a/media/capture/video/fake_video_capture_device_factory.h b/media/capture/video/fake_video_capture_device_factory.h
index ef510573d645b0c9455e9e1a139b9ee482324bc7..7fb0597fe7e99f61ae5def6f4ce500a1b4b738a3 100644
--- a/media/capture/video/fake_video_capture_device_factory.h
+++ b/media/capture/video/fake_video_capture_device_factory.h
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Implementation of a fake VideoCaptureDeviceFactory class.
-
#ifndef MEDIA_CAPTURE_VIDEO_FAKE_VIDEO_CAPTURE_DEVICE_FACTORY_H_
#define MEDIA_CAPTURE_VIDEO_FAKE_VIDEO_CAPTURE_DEVICE_FACTORY_H_
@@ -12,8 +10,14 @@
namespace media {
-// Extension of VideoCaptureDeviceFactory to create and manipulate fake devices,
-// not including file-based ones.
+// Implementation of VideoCaptureDeviceFactory that creates fake devices
+// that generate test output frames.
+// By default, the factory has one device outputting I420.
+// When increasing the number of devices using set_number_of_devices(), the
+// second device will use Y16, and any devices beyond that will use I420.
+// By default, the delivery mode of all devices is USE_OWN_BUFFERS.
+// This, as well as other parameters, can be changed using command-line flags.
+// See implementation of method ParseCommandLine() for details.
class CAPTURE_EXPORT FakeVideoCaptureDeviceFactory
: public VideoCaptureDeviceFactory {
public:
@@ -41,7 +45,7 @@ class CAPTURE_EXPORT FakeVideoCaptureDeviceFactory
void ParseCommandLine();
int number_of_devices_;
- FakeVideoCaptureDevice::BufferOwnership fake_vcd_ownership_;
+ FakeVideoCaptureDeviceMaker::DeliveryMode delivery_mode_;
float frame_rate_;
bool command_line_parsed_ = false;
};
« no previous file with comments | « media/capture/video/fake_video_capture_device.cc ('k') | media/capture/video/fake_video_capture_device_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698