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