OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/video/capture/fake_video_capture_device.h" | 5 #include "media/video/capture/fake_video_capture_device.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "media/audio/fake_audio_input_stream.h" | 12 #include "media/audio/fake_audio_input_stream.h" |
13 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
14 #include "third_party/skia/include/core/SkCanvas.h" | 14 #include "third_party/skia/include/core/SkCanvas.h" |
15 #include "third_party/skia/include/core/SkPaint.h" | 15 #include "third_party/skia/include/core/SkPaint.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 | 18 |
19 static const int kFakeCaptureTimeoutMs = 50; | 19 static const int kFakeCaptureTimeoutMs = 50; |
20 static const int kFakeCaptureBeepCycle = 20; // Visual beep every 1s. | 20 static const int kFakeCaptureBeepCycle = 20; // Visual beep every 1s. |
21 enum { kNumberOfFakeDevices = 2 }; | 21 enum { kNumberOfFakeDevices = 2 }; |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 fake_frame_.get(), frame_size_, base::Time::Now(), 0, false, false); | 196 fake_frame_.get(), frame_size_, base::Time::Now(), 0, false, false); |
197 // Reschedule next CaptureTask. | 197 // Reschedule next CaptureTask. |
198 capture_thread_.message_loop()->PostDelayedTask( | 198 capture_thread_.message_loop()->PostDelayedTask( |
199 FROM_HERE, | 199 FROM_HERE, |
200 base::Bind(&FakeVideoCaptureDevice::OnCaptureTask, | 200 base::Bind(&FakeVideoCaptureDevice::OnCaptureTask, |
201 base::Unretained(this)), | 201 base::Unretained(this)), |
202 base::TimeDelta::FromMilliseconds(kFakeCaptureTimeoutMs)); | 202 base::TimeDelta::FromMilliseconds(kFakeCaptureTimeoutMs)); |
203 } | 203 } |
204 | 204 |
205 } // namespace media | 205 } // namespace media |
OLD | NEW |