OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ | 5 #ifndef REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ |
6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ | 6 #define REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ |
7 | 7 |
8 #include "remoting/protocol/webrtc_frame_scheduler.h" | 8 #include "remoting/protocol/webrtc_frame_scheduler.h" |
9 | 9 |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| 11 #include "remoting/base/running_samples.h" |
11 | 12 |
12 namespace remoting { | 13 namespace remoting { |
13 namespace protocol { | 14 namespace protocol { |
14 | 15 |
15 // WebrtcFrameSchedulerSimple is a simple implementation of | 16 // WebrtcFrameSchedulerSimple is a simple implementation of |
16 // WebrtcFrameScheduler that always keeps only one frame in the pipeline. | 17 // WebrtcFrameScheduler that always keeps only one frame in the pipeline. |
17 // It schedules each frame after the previous one is expected to finish sending. | 18 // It schedules each frame after the previous one is expected to finish sending. |
18 class WebrtcFrameSchedulerSimple : public WebrtcFrameScheduler { | 19 class WebrtcFrameSchedulerSimple : public WebrtcFrameScheduler { |
19 public: | 20 public: |
20 WebrtcFrameSchedulerSimple(); | 21 WebrtcFrameSchedulerSimple(); |
(...skipping 19 matching lines...) Expand all Loading... |
40 bool paused_ = false; | 41 bool paused_ = false; |
41 bool key_frame_request_ = false; | 42 bool key_frame_request_ = false; |
42 uint32_t target_bitrate_kbps_ = 1000; // Initial bitrate. | 43 uint32_t target_bitrate_kbps_ = 1000; // Initial bitrate. |
43 | 44 |
44 base::TimeTicks last_capture_started_time_; | 45 base::TimeTicks last_capture_started_time_; |
45 base::TimeTicks last_frame_send_finish_time_; | 46 base::TimeTicks last_frame_send_finish_time_; |
46 | 47 |
47 // Set to true when encoding unchanged frames for top-off. | 48 // Set to true when encoding unchanged frames for top-off. |
48 bool top_off_is_active_ = false; | 49 bool top_off_is_active_ = false; |
49 | 50 |
| 51 // Accumulator for capture and encoder delay history. |
| 52 RunningSamples frame_processing_delay_us_; |
| 53 |
50 base::OneShotTimer capture_timer_; | 54 base::OneShotTimer capture_timer_; |
51 }; | 55 }; |
52 | 56 |
53 } // namespace protocol | 57 } // namespace protocol |
54 } // namespace remoting | 58 } // namespace remoting |
55 | 59 |
56 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ | 60 #endif // REMOTING_PROTOCOL_WEBRTC_FRAME_SCHEDULER_SIMPLE_H_ |
OLD | NEW |