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_CALL_CALL_H_ | 10 #ifndef WEBRTC_CALL_CALL_H_ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 static const int kDefaultStartBitrateBps; | 68 static const int kDefaultStartBitrateBps; |
69 | 69 |
70 // Bitrate config used until valid bitrate estimates are calculated. Also | 70 // Bitrate config used until valid bitrate estimates are calculated. Also |
71 // used to cap total bitrate used. | 71 // used to cap total bitrate used. |
72 struct BitrateConfig { | 72 struct BitrateConfig { |
73 int min_bitrate_bps = 0; | 73 int min_bitrate_bps = 0; |
74 int start_bitrate_bps = kDefaultStartBitrateBps; | 74 int start_bitrate_bps = kDefaultStartBitrateBps; |
75 int max_bitrate_bps = -1; | 75 int max_bitrate_bps = -1; |
76 } bitrate_config; | 76 } bitrate_config; |
77 | 77 |
78 struct BitrateConfigMask { | |
79 rtc::Optional<int> min_bitrate_bps; | |
80 rtc::Optional<int> start_bitrate_bps; | |
81 rtc::Optional<int> max_bitrate_bps; | |
82 }; | |
Taylor Brandstetter
2017/04/07 03:29:12
Couldn't one struct be used by both PeerConnection
Zach Stein
2017/04/09 21:09:01
I did it this way because I wasn't sure where that
Taylor Brandstetter
2017/04/10 04:59:51
PeerConnectionInterface (being the "public interfa
stefan-webrtc
2017/04/10 13:26:58
But will we not want to have this also for ORTC at
| |
83 | |
78 // AudioState which is possibly shared between multiple calls. | 84 // AudioState which is possibly shared between multiple calls. |
79 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. | 85 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. |
80 rtc::scoped_refptr<AudioState> audio_state; | 86 rtc::scoped_refptr<AudioState> audio_state; |
81 | 87 |
82 // Audio Processing Module to be used in this call. | 88 // Audio Processing Module to be used in this call. |
83 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. | 89 // TODO(solenberg): Change this to a shared_ptr once we can use C++11. |
84 AudioProcessing* audio_processing = nullptr; | 90 AudioProcessing* audio_processing = nullptr; |
85 | 91 |
86 // RtcEventLog to use for this call. Required. | 92 // RtcEventLog to use for this call. Required. |
87 // Use webrtc::RtcEventLog::CreateNull() for a null implementation. | 93 // Use webrtc::RtcEventLog::CreateNull() for a null implementation. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
137 virtual Stats GetStats() const = 0; | 143 virtual Stats GetStats() const = 0; |
138 | 144 |
139 // TODO(pbos): Like BitrateConfig above this is currently per-stream instead | 145 // TODO(pbos): Like BitrateConfig above this is currently per-stream instead |
140 // of maximum for entire Call. This should be fixed along with the above. | 146 // of maximum for entire Call. This should be fixed along with the above. |
141 // Specifying a start bitrate (>0) will currently reset the current bitrate | 147 // Specifying a start bitrate (>0) will currently reset the current bitrate |
142 // estimate. This is due to how the 'x-google-start-bitrate' flag is currently | 148 // estimate. This is due to how the 'x-google-start-bitrate' flag is currently |
143 // implemented. | 149 // implemented. |
144 virtual void SetBitrateConfig( | 150 virtual void SetBitrateConfig( |
145 const Config::BitrateConfig& bitrate_config) = 0; | 151 const Config::BitrateConfig& bitrate_config) = 0; |
146 | 152 |
153 virtual void UpdateBitrateConfig(const Config::BitrateConfigMask& mask) = 0; | |
154 | |
147 // TODO(skvlad): When the unbundled case with multiple streams for the same | 155 // TODO(skvlad): When the unbundled case with multiple streams for the same |
148 // media type going over different networks is supported, track the state | 156 // media type going over different networks is supported, track the state |
149 // for each stream separately. Right now it's global per media type. | 157 // for each stream separately. Right now it's global per media type. |
150 virtual void SignalChannelNetworkState(MediaType media, | 158 virtual void SignalChannelNetworkState(MediaType media, |
151 NetworkState state) = 0; | 159 NetworkState state) = 0; |
152 | 160 |
153 virtual void OnTransportOverheadChanged( | 161 virtual void OnTransportOverheadChanged( |
154 MediaType media, | 162 MediaType media, |
155 int transport_overhead_per_packet) = 0; | 163 int transport_overhead_per_packet) = 0; |
156 | 164 |
157 virtual void OnNetworkRouteChanged( | 165 virtual void OnNetworkRouteChanged( |
158 const std::string& transport_name, | 166 const std::string& transport_name, |
159 const rtc::NetworkRoute& network_route) = 0; | 167 const rtc::NetworkRoute& network_route) = 0; |
160 | 168 |
161 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; | 169 virtual void OnSentPacket(const rtc::SentPacket& sent_packet) = 0; |
162 | 170 |
163 virtual ~Call() {} | 171 virtual ~Call() {} |
164 }; | 172 }; |
165 | 173 |
166 } // namespace webrtc | 174 } // namespace webrtc |
167 | 175 |
168 #endif // WEBRTC_CALL_CALL_H_ | 176 #endif // WEBRTC_CALL_CALL_H_ |
OLD | NEW |