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

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: Created 7 years, 1 month 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 7d5de57d2ce0df9b75fc7bd1113eaf838346794c..c9c35e9f73c0204dbfda385da6c64bc0f8a68151 100644
--- a/media/video/capture/fake_video_capture_device.h
+++ b/media/video/capture/fake_video_capture_device.h
@@ -23,10 +23,12 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
// Used for testing. This will make sure the next call to Create will
// return NULL;
static void SetFailNextCreate();
+ static void SetNumberOfFakeDevices(int num);
+ static int NumberOfFakeDevices();
perkj_chrome 2013/11/27 17:53:12 Fyi- I am trying to do the same thing in https://c
mcasas 2013/12/03 14:28:41 First one wins! :) Kidding: I'll rebase against yo
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,
@@ -45,9 +47,6 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
// Called on the capture_thread_.
void OnCaptureTask();
-
- // EXPERIMENTAL, similar to allocate, but changes resolution and calls
perkj_chrome 2013/11/27 17:53:12 And this - is this intentional?
mcasas 2013/12/03 14:28:41 Well, this code is not experimental anymore (I add
- // client->OnFrameInfoChanged(VideoCaptureCapability&)
void Reallocate();
void PopulateFormatRoster();
@@ -63,6 +62,7 @@ class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice {
std::vector<VideoCaptureFormat> format_roster_;
int format_roster_index_;
+ static int number_of_fake_devices_;
perkj_chrome 2013/11/27 17:53:12 atomic32 if you touch this from several threads li
mcasas 2013/12/03 14:28:41 If you only have one setter and multiple getters,
static bool fail_next_create_;
DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice);

Powered by Google App Engine
This is Rietveld 408576698