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

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

Issue 1803063004: Reset the BWE when the network changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Removed changes in call dir and leave that in a separate CL. 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/media/base/fakemediaengine.h ('k') | webrtc/media/engine/webrtcvideoengine2.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
11 #ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 11 #ifndef WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
12 #define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 12 #define WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
13 13
14 #include <memory> 14 #include <memory>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/api/rtpparameters.h" 18 #include "webrtc/api/rtpparameters.h"
19 #include "webrtc/base/basictypes.h" 19 #include "webrtc/base/basictypes.h"
20 #include "webrtc/base/copyonwritebuffer.h" 20 #include "webrtc/base/copyonwritebuffer.h"
21 #include "webrtc/base/dscp.h" 21 #include "webrtc/base/dscp.h"
22 #include "webrtc/base/logging.h" 22 #include "webrtc/base/logging.h"
23 #include "webrtc/base/networkroute.h"
23 #include "webrtc/base/optional.h" 24 #include "webrtc/base/optional.h"
24 #include "webrtc/base/sigslot.h" 25 #include "webrtc/base/sigslot.h"
25 #include "webrtc/base/socket.h" 26 #include "webrtc/base/socket.h"
26 #include "webrtc/base/window.h" 27 #include "webrtc/base/window.h"
27 #include "webrtc/media/base/codec.h" 28 #include "webrtc/media/base/codec.h"
28 #include "webrtc/media/base/mediaconstants.h" 29 #include "webrtc/media/base/mediaconstants.h"
29 #include "webrtc/media/base/streamparams.h" 30 #include "webrtc/media/base/streamparams.h"
30 #include "webrtc/media/base/videosinkinterface.h" 31 #include "webrtc/media/base/videosinkinterface.h"
31 // TODO(juberti): re-evaluate this include 32 // TODO(juberti): re-evaluate this include
32 #include "webrtc/pc/audiomonitor.h" 33 #include "webrtc/pc/audiomonitor.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 return rtc::DSCP_DEFAULT; 381 return rtc::DSCP_DEFAULT;
381 } 382 }
382 // Called when a RTP packet is received. 383 // Called when a RTP packet is received.
383 virtual void OnPacketReceived(rtc::CopyOnWriteBuffer* packet, 384 virtual void OnPacketReceived(rtc::CopyOnWriteBuffer* packet,
384 const rtc::PacketTime& packet_time) = 0; 385 const rtc::PacketTime& packet_time) = 0;
385 // Called when a RTCP packet is received. 386 // Called when a RTCP packet is received.
386 virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet, 387 virtual void OnRtcpReceived(rtc::CopyOnWriteBuffer* packet,
387 const rtc::PacketTime& packet_time) = 0; 388 const rtc::PacketTime& packet_time) = 0;
388 // Called when the socket's ability to send has changed. 389 // Called when the socket's ability to send has changed.
389 virtual void OnReadyToSend(bool ready) = 0; 390 virtual void OnReadyToSend(bool ready) = 0;
391 // Called when the network route used for sending packets changed.
392 virtual void OnNetworkRouteChanged(const std::string& transport_name,
393 const NetworkRoute& network_route) = 0;
390 // Creates a new outgoing media stream with SSRCs and CNAME as described 394 // Creates a new outgoing media stream with SSRCs and CNAME as described
391 // by sp. 395 // by sp.
392 virtual bool AddSendStream(const StreamParams& sp) = 0; 396 virtual bool AddSendStream(const StreamParams& sp) = 0;
393 // Removes an outgoing media stream. 397 // Removes an outgoing media stream.
394 // ssrc must be the first SSRC of the media stream if the stream uses 398 // ssrc must be the first SSRC of the media stream if the stream uses
395 // multiple SSRCs. 399 // multiple SSRCs.
396 virtual bool RemoveSendStream(uint32_t ssrc) = 0; 400 virtual bool RemoveSendStream(uint32_t ssrc) = 0;
397 // Creates a new incoming media stream with SSRCs and CNAME as described 401 // Creates a new incoming media stream with SSRCs and CNAME as described
398 // by sp. 402 // by sp.
399 virtual bool AddRecvStream(const StreamParams& sp) = 0; 403 virtual bool AddRecvStream(const StreamParams& sp) = 0;
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 1101
1098 virtual bool SetSendParameters(const DataSendParameters& params) = 0; 1102 virtual bool SetSendParameters(const DataSendParameters& params) = 0;
1099 virtual bool SetRecvParameters(const DataRecvParameters& params) = 0; 1103 virtual bool SetRecvParameters(const DataRecvParameters& params) = 0;
1100 1104
1101 // TODO(pthatcher): Implement this. 1105 // TODO(pthatcher): Implement this.
1102 virtual bool GetStats(DataMediaInfo* info) { return true; } 1106 virtual bool GetStats(DataMediaInfo* info) { return true; }
1103 1107
1104 virtual bool SetSend(bool send) = 0; 1108 virtual bool SetSend(bool send) = 0;
1105 virtual bool SetReceive(bool receive) = 0; 1109 virtual bool SetReceive(bool receive) = 0;
1106 1110
1111 virtual void OnNetworkRouteChanged(const std::string& transport_name,
1112 const NetworkRoute& network_route) {}
1113
1107 virtual bool SendData( 1114 virtual bool SendData(
1108 const SendDataParams& params, 1115 const SendDataParams& params,
1109 const rtc::CopyOnWriteBuffer& payload, 1116 const rtc::CopyOnWriteBuffer& payload,
1110 SendDataResult* result = NULL) = 0; 1117 SendDataResult* result = NULL) = 0;
1111 // Signals when data is received (params, data, len) 1118 // Signals when data is received (params, data, len)
1112 sigslot::signal3<const ReceiveDataParams&, 1119 sigslot::signal3<const ReceiveDataParams&,
1113 const char*, 1120 const char*,
1114 size_t> SignalDataReceived; 1121 size_t> SignalDataReceived;
1115 // Signal when the media channel is ready to send the stream. Arguments are: 1122 // Signal when the media channel is ready to send the stream. Arguments are:
1116 // writable(bool) 1123 // writable(bool)
1117 sigslot::signal1<bool> SignalReadyToSend; 1124 sigslot::signal1<bool> SignalReadyToSend;
1118 // Signal for notifying that the remote side has closed the DataChannel. 1125 // Signal for notifying that the remote side has closed the DataChannel.
1119 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; 1126 sigslot::signal1<uint32_t> SignalStreamClosedRemotely;
1120 }; 1127 };
1121 1128
1122 } // namespace cricket 1129 } // namespace cricket
1123 1130
1124 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ 1131 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/fakemediaengine.h ('k') | webrtc/media/engine/webrtcvideoengine2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698