OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MEDIA_CAST_SENDER_VIDEO_SENDER_H_ | 5 #ifndef MEDIA_CAST_SENDER_VIDEO_SENDER_H_ |
6 #define MEDIA_CAST_SENDER_VIDEO_SENDER_H_ | 6 #define MEDIA_CAST_SENDER_VIDEO_SENDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // a value large enough to give the system sufficient time to encode, | 85 // a value large enough to give the system sufficient time to encode, |
86 // transmit/retransmit, receive, decode, and render; given its run-time | 86 // transmit/retransmit, receive, decode, and render; given its run-time |
87 // environment (sender/receiver hardware performance, network conditions, | 87 // environment (sender/receiver hardware performance, network conditions, |
88 // etc.). | 88 // etc.). |
89 const base::TimeDelta target_playout_delay_; | 89 const base::TimeDelta target_playout_delay_; |
90 | 90 |
91 // Maximum number of outstanding frames before the encoding and sending of | 91 // Maximum number of outstanding frames before the encoding and sending of |
92 // new frames shall halt. | 92 // new frames shall halt. |
93 const int max_unacked_frames_; | 93 const int max_unacked_frames_; |
94 | 94 |
| 95 // If this value is non zero then a fixed value is used for bitrate. |
| 96 // If external video encoder is used then bitrate will be fixed to |
| 97 // (min_bitrate + max_bitrate) / 2. |
| 98 const size_t fixed_bitrate_; |
| 99 |
95 // Encodes media::VideoFrame images into EncodedFrames. Per configuration, | 100 // Encodes media::VideoFrame images into EncodedFrames. Per configuration, |
96 // this will point to either the internal software-based encoder or a proxy to | 101 // this will point to either the internal software-based encoder or a proxy to |
97 // a hardware-based encoder. | 102 // a hardware-based encoder. |
98 scoped_ptr<VideoEncoder> video_encoder_; | 103 scoped_ptr<VideoEncoder> video_encoder_; |
99 | 104 |
100 // Counts how many RTCP reports are being "aggressively" sent (i.e., one per | 105 // Counts how many RTCP reports are being "aggressively" sent (i.e., one per |
101 // frame) at the start of the session. Once a threshold is reached, RTCP | 106 // frame) at the start of the session. Once a threshold is reached, RTCP |
102 // reports are instead sent at the configured interval + random drift. | 107 // reports are instead sent at the configured interval + random drift. |
103 int num_aggressive_rtcp_reports_sent_; | 108 int num_aggressive_rtcp_reports_sent_; |
104 | 109 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // NOTE: Weak pointers must be invalidated before all other member variables. | 146 // NOTE: Weak pointers must be invalidated before all other member variables. |
142 base::WeakPtrFactory<VideoSender> weak_factory_; | 147 base::WeakPtrFactory<VideoSender> weak_factory_; |
143 | 148 |
144 DISALLOW_COPY_AND_ASSIGN(VideoSender); | 149 DISALLOW_COPY_AND_ASSIGN(VideoSender); |
145 }; | 150 }; |
146 | 151 |
147 } // namespace cast | 152 } // namespace cast |
148 } // namespace media | 153 } // namespace media |
149 | 154 |
150 #endif // MEDIA_CAST_SENDER_VIDEO_SENDER_H_ | 155 #endif // MEDIA_CAST_SENDER_VIDEO_SENDER_H_ |
OLD | NEW |