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

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

Issue 91343002: Added supported formats caching to VideoCaptureManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased FakeVCD. Reconnected VCManager unittest for all platforms. Created 7 years 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/video/capture/fake_video_capture_device.h
diff --git a/media/video/capture/fake_video_capture_device.h b/media/video/capture/fake_video_capture_device.h
index de1fe3224458c0c50f782a148a760d866da80ee4..5397208c0bcafd6d4845526ff04f63678dc067df 100644
--- a/media/video/capture/fake_video_capture_device.h
+++ b/media/video/capture/fake_video_capture_device.h
@@ -25,10 +25,11 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
// return NULL;
static void SetFailNextCreate();
static void SetNumberOfFakeDevices(size_t number_of_devices);
+ static int NumberOfFakeDevices();
static void GetDeviceNames(Names* device_names);
static void GetDeviceSupportedFormats(const Name& device,
- VideoCaptureCapabilities* formats);
+ VideoCaptureFormats* supported_formats);
// VideoCaptureDevice implementation.
virtual void AllocateAndStart(const VideoCaptureParams& params,
@@ -47,9 +48,6 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
// Called on the capture_thread_.
void OnCaptureTask();
-
- // EXPERIMENTAL, similar to allocate, but changes resolution and calls
- // client->OnFrameInfoChanged(VideoCaptureCapability&)
void Reallocate();
void PopulateFormatRoster();
@@ -65,6 +63,7 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
std::vector<VideoCaptureFormat> format_roster_;
int format_roster_index_;
+ static int number_of_fake_devices_;
static bool fail_next_create_;
// |number_of_devices_| is atomic since tests can call SetNumberOfFakeDevices
// on the IO thread to set |number_of_devices_|. The variable can be

Powered by Google App Engine
This is Rietveld 408576698