Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: webrtc/media/base/fakemediaengine.h

Issue 1844773002: Update the call when the network route changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge with head Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 10
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 const std::string rtcp_cname() { 172 const std::string rtcp_cname() {
173 if (send_streams_.empty()) 173 if (send_streams_.empty())
174 return ""; 174 return "";
175 return send_streams_[0].cname; 175 return send_streams_[0].cname;
176 } 176 }
177 177
178 bool ready_to_send() const { 178 bool ready_to_send() const {
179 return ready_to_send_; 179 return ready_to_send_;
180 } 180 }
181 181
182 NetworkRoute last_network_route() const { return last_network_route_; } 182 rtc::NetworkRoute last_network_route() const { return last_network_route_; }
183 int num_network_route_changes() const { return num_network_route_changes_; } 183 int num_network_route_changes() const { return num_network_route_changes_; }
184 void set_num_network_route_changes(int changes) { 184 void set_num_network_route_changes(int changes) {
185 num_network_route_changes_ = changes; 185 num_network_route_changes_ = changes;
186 } 186 }
187 187
188 protected: 188 protected:
189 bool MuteStream(uint32_t ssrc, bool mute) { 189 bool MuteStream(uint32_t ssrc, bool mute) {
190 if (!HasSendStream(ssrc) && ssrc != 0) { 190 if (!HasSendStream(ssrc) && ssrc != 0) {
191 return false; 191 return false;
192 } 192 }
(...skipping 24 matching lines...) Expand all
217 rtp_packets_.push_back(std::string(packet->data<char>(), packet->size())); 217 rtp_packets_.push_back(std::string(packet->data<char>(), packet->size()));
218 } 218 }
219 virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, 219 virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet,
220 const rtc::PacketTime& packet_time) { 220 const rtc::PacketTime& packet_time) {
221 rtcp_packets_.push_back(std::string(packet->data<char>(), packet->size())); 221 rtcp_packets_.push_back(std::string(packet->data<char>(), packet->size()));
222 } 222 }
223 virtual void OnReadyToSend(bool ready) { 223 virtual void OnReadyToSend(bool ready) {
224 ready_to_send_ = ready; 224 ready_to_send_ = ready;
225 } 225 }
226 virtual void OnNetworkRouteChanged(const std::string& transport_name, 226 virtual void OnNetworkRouteChanged(const std::string& transport_name,
227 const NetworkRoute& network_route) { 227 const rtc::NetworkRoute& network_route) {
228 last_network_route_ = network_route; 228 last_network_route_ = network_route;
229 ++num_network_route_changes_; 229 ++num_network_route_changes_;
230 } 230 }
231 bool fail_set_send_codecs() const { return fail_set_send_codecs_; } 231 bool fail_set_send_codecs() const { return fail_set_send_codecs_; }
232 bool fail_set_recv_codecs() const { return fail_set_recv_codecs_; } 232 bool fail_set_recv_codecs() const { return fail_set_recv_codecs_; }
233 233
234 private: 234 private:
235 bool sending_; 235 bool sending_;
236 bool playout_; 236 bool playout_;
237 std::vector<RtpHeaderExtension> recv_extensions_; 237 std::vector<RtpHeaderExtension> recv_extensions_;
238 std::vector<RtpHeaderExtension> send_extensions_; 238 std::vector<RtpHeaderExtension> send_extensions_;
239 std::list<std::string> rtp_packets_; 239 std::list<std::string> rtp_packets_;
240 std::list<std::string> rtcp_packets_; 240 std::list<std::string> rtcp_packets_;
241 std::vector<StreamParams> send_streams_; 241 std::vector<StreamParams> send_streams_;
242 std::vector<StreamParams> receive_streams_; 242 std::vector<StreamParams> receive_streams_;
243 std::set<uint32_t> muted_streams_; 243 std::set<uint32_t> muted_streams_;
244 std::map<uint32_t, webrtc::RtpParameters> rtp_parameters_; 244 std::map<uint32_t, webrtc::RtpParameters> rtp_parameters_;
245 bool fail_set_send_codecs_; 245 bool fail_set_send_codecs_;
246 bool fail_set_recv_codecs_; 246 bool fail_set_recv_codecs_;
247 uint32_t send_ssrc_; 247 uint32_t send_ssrc_;
248 std::string rtcp_cname_; 248 std::string rtcp_cname_;
249 bool ready_to_send_; 249 bool ready_to_send_;
250 NetworkRoute last_network_route_; 250 rtc::NetworkRoute last_network_route_;
251 int num_network_route_changes_ = 0; 251 int num_network_route_changes_ = 0;
252 }; 252 };
253 253
254 class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> { 254 class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
255 public: 255 public:
256 struct DtmfInfo { 256 struct DtmfInfo {
257 DtmfInfo(uint32_t ssrc, int event_code, int duration) 257 DtmfInfo(uint32_t ssrc, int event_code, int duration)
258 : ssrc(ssrc), 258 : ssrc(ssrc),
259 event_code(event_code), 259 event_code(event_code),
260 duration(duration) {} 260 duration(duration) {}
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 907
908 private: 908 private:
909 std::vector<FakeDataMediaChannel*> channels_; 909 std::vector<FakeDataMediaChannel*> channels_;
910 std::vector<DataCodec> data_codecs_; 910 std::vector<DataCodec> data_codecs_;
911 DataChannelType last_channel_type_; 911 DataChannelType last_channel_type_;
912 }; 912 };
913 913
914 } // namespace cricket 914 } // namespace cricket
915 915
916 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_ 916 #endif // WEBRTC_MEDIA_BASE_FAKEMEDIAENGINE_H_
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/media/base/mediachannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698