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> | |
8 | 7 |
9 #include "base/bind.h" | 8 #include "base/bind.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
12 #include "media/audio/fake_audio_input_stream.h" | 10 #include "media/audio/fake_audio_input_stream.h" |
13 #include "media/base/video_frame.h" | 11 #include "media/base/video_frame.h" |
14 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
15 #include "third_party/skia/include/core/SkCanvas.h" | 13 #include "third_party/skia/include/core/SkCanvas.h" |
16 #include "third_party/skia/include/core/SkPaint.h" | 14 #include "third_party/skia/include/core/SkPaint.h" |
17 | 15 |
18 namespace media { | 16 namespace media { |
19 | 17 |
20 static const int kFakeCaptureBeepCycle = 10; // Visual beep every 0.5s. | 18 static const int kFakeCaptureBeepCycle = 10; // Visual beep every 0.5s. |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Generate a synchronized beep sound every so many frames. | 200 // Generate a synchronized beep sound every so many frames. |
203 if (frame_count_++ % kFakeCaptureBeepCycle == 0) | 201 if (frame_count_++ % kFakeCaptureBeepCycle == 0) |
204 FakeAudioInputStream::BeepOnce(); | 202 FakeAudioInputStream::BeepOnce(); |
205 | 203 |
206 // Reschedule next CaptureTask. | 204 // Reschedule next CaptureTask. |
207 base::MessageLoop::current()->PostDelayedTask(FROM_HERE, next_capture, | 205 base::MessageLoop::current()->PostDelayedTask(FROM_HERE, next_capture, |
208 base::TimeDelta::FromMilliseconds(kFakeCapturePeriodMs)); | 206 base::TimeDelta::FromMilliseconds(kFakeCapturePeriodMs)); |
209 } | 207 } |
210 | 208 |
211 } // namespace media | 209 } // namespace media |
OLD | NEW |