| 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 // Implementation of a fake VideoCaptureDevice class. Used for testing other | 5 // Implementation of a fake VideoCaptureDevice class. Used for testing other |
| 6 // video capture classes when no real hardware is available. | 6 // video capture classes when no real hardware is available. |
| 7 | 7 |
| 8 #ifndef MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ | 8 #ifndef MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ |
| 9 #define MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ | 9 #define MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 | 12 |
| 13 #include "base/atomicops.h" | 13 #include "base/atomicops.h" |
| 14 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 16 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 17 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
| 18 #include "base/time/time.h" | 19 #include "base/time/time.h" |
| 19 #include "media/capture/video/video_capture_device.h" | 20 #include "media/capture/video/video_capture_device.h" |
| 20 | 21 |
| 21 namespace media { | 22 namespace media { |
| 22 | 23 |
| 23 class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice { | 24 class MEDIA_EXPORT FakeVideoCaptureDevice : public VideoCaptureDevice { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // FakeVideoCaptureDevice post tasks to itself for frame construction and | 73 // FakeVideoCaptureDevice post tasks to itself for frame construction and |
| 73 // needs to deal with asynchronous StopAndDeallocate(). | 74 // needs to deal with asynchronous StopAndDeallocate(). |
| 74 base::WeakPtrFactory<FakeVideoCaptureDevice> weak_factory_; | 75 base::WeakPtrFactory<FakeVideoCaptureDevice> weak_factory_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice); | 77 DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureDevice); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace media | 80 } // namespace media |
| 80 | 81 |
| 81 #endif // MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ | 82 #endif // MEDIA_VIDEO_CAPTURE_FAKE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |