Chromium Code Reviews| 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); |