| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ | 10 #ifndef WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 FrameGeneratorCapturer(Clock* clock, | 70 FrameGeneratorCapturer(Clock* clock, |
| 71 std::unique_ptr<FrameGenerator> frame_generator, | 71 std::unique_ptr<FrameGenerator> frame_generator, |
| 72 int target_fps); | 72 int target_fps); |
| 73 bool Init(); | 73 bool Init(); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 class InsertFrameTask; | 76 class InsertFrameTask; |
| 77 | 77 |
| 78 void InsertFrame(); | 78 void InsertFrame(); |
| 79 static bool Run(void* obj); | 79 static bool Run(void* obj); |
| 80 int GetCurrentConfiguredFramerate(); |
| 80 | 81 |
| 81 Clock* const clock_; | 82 Clock* const clock_; |
| 82 bool sending_; | 83 bool sending_; |
| 83 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(&lock_); | 84 rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(&lock_); |
| 84 SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_); | 85 SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_); |
| 85 | 86 |
| 86 rtc::CriticalSection lock_; | 87 rtc::CriticalSection lock_; |
| 87 std::unique_ptr<FrameGenerator> frame_generator_; | 88 std::unique_ptr<FrameGenerator> frame_generator_; |
| 88 | 89 |
| 89 int target_fps_; | 90 int target_fps_ GUARDED_BY(&lock_); |
| 91 rtc::Optional<int> wanted_fps_ GUARDED_BY(&lock_); |
| 90 VideoRotation fake_rotation_ = kVideoRotation_0; | 92 VideoRotation fake_rotation_ = kVideoRotation_0; |
| 91 | 93 |
| 92 int64_t first_frame_capture_time_; | 94 int64_t first_frame_capture_time_; |
| 93 // Must be the last field, so it will be deconstructed first as tasks | 95 // Must be the last field, so it will be deconstructed first as tasks |
| 94 // in the TaskQueue access other fields of the instance of this class. | 96 // in the TaskQueue access other fields of the instance of this class. |
| 95 rtc::TaskQueue task_queue_; | 97 rtc::TaskQueue task_queue_; |
| 96 }; | 98 }; |
| 97 } // namespace test | 99 } // namespace test |
| 98 } // namespace webrtc | 100 } // namespace webrtc |
| 99 | 101 |
| 100 #endif // WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ | 102 #endif // WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ |
| OLD | NEW |