| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ | 11 #ifndef WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ |
| 12 #define WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ | 12 #define WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ |
| 13 | 13 |
| 14 #include <string.h> | 14 #include <string.h> |
| 15 | 15 |
| 16 #include <memory> | 16 #include <memory> |
| 17 #include <vector> | 17 #include <vector> |
| 18 | 18 |
| 19 #include "webrtc/api/video/i420_buffer.h" | 19 #include "webrtc/api/video/i420_buffer.h" |
| 20 #include "webrtc/api/video/video_frame.h" | 20 #include "webrtc/api/video/video_frame.h" |
| 21 #include "webrtc/base/timeutils.h" |
| 21 #include "webrtc/media/base/videocapturer.h" | 22 #include "webrtc/media/base/videocapturer.h" |
| 22 #include "webrtc/media/base/videocommon.h" | 23 #include "webrtc/media/base/videocommon.h" |
| 23 #include "webrtc/rtc_base/timeutils.h" | |
| 24 | 24 |
| 25 namespace cricket { | 25 namespace cricket { |
| 26 | 26 |
| 27 // Fake video capturer that allows the test to manually pump in frames. | 27 // Fake video capturer that allows the test to manually pump in frames. |
| 28 class FakeVideoCapturer : public cricket::VideoCapturer { | 28 class FakeVideoCapturer : public cricket::VideoCapturer { |
| 29 public: | 29 public: |
| 30 explicit FakeVideoCapturer(bool is_screencast) | 30 explicit FakeVideoCapturer(bool is_screencast) |
| 31 : running_(false), | 31 : running_(false), |
| 32 initial_timestamp_(rtc::TimeNanos()), | 32 initial_timestamp_(rtc::TimeNanos()), |
| 33 next_timestamp_(rtc::kNumNanosecsPerMillisec), | 33 next_timestamp_(rtc::kNumNanosecsPerMillisec), |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 bool running_; | 143 bool running_; |
| 144 int64_t initial_timestamp_; | 144 int64_t initial_timestamp_; |
| 145 int64_t next_timestamp_; | 145 int64_t next_timestamp_; |
| 146 const bool is_screencast_; | 146 const bool is_screencast_; |
| 147 webrtc::VideoRotation rotation_; | 147 webrtc::VideoRotation rotation_; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace cricket | 150 } // namespace cricket |
| 151 | 151 |
| 152 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ | 152 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEOCAPTURER_H_ |
| OLD | NEW |