| OLD | NEW |
| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 return rtc::DSCP_DEFAULT; | 368 return rtc::DSCP_DEFAULT; |
| 369 } | 369 } |
| 370 // Called when a RTP packet is received. | 370 // Called when a RTP packet is received. |
| 371 virtual void OnPacketReceived(rtc::Buffer* packet, | 371 virtual void OnPacketReceived(rtc::Buffer* packet, |
| 372 const rtc::PacketTime& packet_time) = 0; | 372 const rtc::PacketTime& packet_time) = 0; |
| 373 // Called when a RTCP packet is received. | 373 // Called when a RTCP packet is received. |
| 374 virtual void OnRtcpReceived(rtc::Buffer* packet, | 374 virtual void OnRtcpReceived(rtc::Buffer* packet, |
| 375 const rtc::PacketTime& packet_time) = 0; | 375 const rtc::PacketTime& packet_time) = 0; |
| 376 // Called when the socket's ability to send has changed. | 376 // Called when the socket's ability to send has changed. |
| 377 virtual void OnReadyToSend(bool ready) = 0; | 377 virtual void OnReadyToSend(bool ready) = 0; |
| 378 // Called when the network used for sending packets changed. |
| 379 virtual void OnNetworkChanged(int local_net_id, int remote_net_id) = 0; |
| 378 // Creates a new outgoing media stream with SSRCs and CNAME as described | 380 // Creates a new outgoing media stream with SSRCs and CNAME as described |
| 379 // by sp. | 381 // by sp. |
| 380 virtual bool AddSendStream(const StreamParams& sp) = 0; | 382 virtual bool AddSendStream(const StreamParams& sp) = 0; |
| 381 // Removes an outgoing media stream. | 383 // Removes an outgoing media stream. |
| 382 // ssrc must be the first SSRC of the media stream if the stream uses | 384 // ssrc must be the first SSRC of the media stream if the stream uses |
| 383 // multiple SSRCs. | 385 // multiple SSRCs. |
| 384 virtual bool RemoveSendStream(uint32_t ssrc) = 0; | 386 virtual bool RemoveSendStream(uint32_t ssrc) = 0; |
| 385 // Creates a new incoming media stream with SSRCs and CNAME as described | 387 // Creates a new incoming media stream with SSRCs and CNAME as described |
| 386 // by sp. | 388 // by sp. |
| 387 virtual bool AddRecvStream(const StreamParams& sp) = 0; | 389 virtual bool AddRecvStream(const StreamParams& sp) = 0; |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 | 1093 |
| 1092 virtual bool SetSendParameters(const DataSendParameters& params) = 0; | 1094 virtual bool SetSendParameters(const DataSendParameters& params) = 0; |
| 1093 virtual bool SetRecvParameters(const DataRecvParameters& params) = 0; | 1095 virtual bool SetRecvParameters(const DataRecvParameters& params) = 0; |
| 1094 | 1096 |
| 1095 // TODO(pthatcher): Implement this. | 1097 // TODO(pthatcher): Implement this. |
| 1096 virtual bool GetStats(DataMediaInfo* info) { return true; } | 1098 virtual bool GetStats(DataMediaInfo* info) { return true; } |
| 1097 | 1099 |
| 1098 virtual bool SetSend(bool send) = 0; | 1100 virtual bool SetSend(bool send) = 0; |
| 1099 virtual bool SetReceive(bool receive) = 0; | 1101 virtual bool SetReceive(bool receive) = 0; |
| 1100 | 1102 |
| 1103 virtual void OnNetworkChanged(int local_net_id, int remote_net_id) {} |
| 1104 |
| 1101 virtual bool SendData( | 1105 virtual bool SendData( |
| 1102 const SendDataParams& params, | 1106 const SendDataParams& params, |
| 1103 const rtc::Buffer& payload, | 1107 const rtc::Buffer& payload, |
| 1104 SendDataResult* result = NULL) = 0; | 1108 SendDataResult* result = NULL) = 0; |
| 1105 // Signals when data is received (params, data, len) | 1109 // Signals when data is received (params, data, len) |
| 1106 sigslot::signal3<const ReceiveDataParams&, | 1110 sigslot::signal3<const ReceiveDataParams&, |
| 1107 const char*, | 1111 const char*, |
| 1108 size_t> SignalDataReceived; | 1112 size_t> SignalDataReceived; |
| 1109 // Signal when the media channel is ready to send the stream. Arguments are: | 1113 // Signal when the media channel is ready to send the stream. Arguments are: |
| 1110 // writable(bool) | 1114 // writable(bool) |
| 1111 sigslot::signal1<bool> SignalReadyToSend; | 1115 sigslot::signal1<bool> SignalReadyToSend; |
| 1112 // Signal for notifying that the remote side has closed the DataChannel. | 1116 // Signal for notifying that the remote side has closed the DataChannel. |
| 1113 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1117 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
| 1114 }; | 1118 }; |
| 1115 | 1119 |
| 1116 } // namespace cricket | 1120 } // namespace cricket |
| 1117 | 1121 |
| 1118 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ | 1122 #endif // WEBRTC_MEDIA_BASE_MEDIACHANNEL_H_ |
| OLD | NEW |