Index: talk/media/base/mediachannel.h |
diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h |
index dd46a2ff1a89ca9f7d7f4663831b4cd6f3b594a1..ca9f23bd755a442b51c18c103d6941d2e257a978 100644 |
--- a/talk/media/base/mediachannel.h |
+++ b/talk/media/base/mediachannel.h |
@@ -523,12 +523,10 @@ class MediaChannel : public sigslot::has_slots<> { |
class NetworkInterface { |
public: |
enum SocketType { ST_RTP, ST_RTCP }; |
- virtual bool SendPacket( |
- rtc::Buffer* packet, |
- rtc::DiffServCodePoint dscp = rtc::DSCP_NO_CHANGE) = 0; |
- virtual bool SendRtcp( |
- rtc::Buffer* packet, |
- rtc::DiffServCodePoint dscp = rtc::DSCP_NO_CHANGE) = 0; |
+ virtual bool SendPacket(rtc::Buffer* packet, |
+ const rtc::PacketOptions& options) = 0; |
+ virtual bool SendRtcp(rtc::Buffer* packet, |
+ const rtc::PacketOptions& options) = 0; |
virtual int SetOption(SocketType type, rtc::Socket::Option opt, |
int option) = 0; |
virtual ~NetworkInterface() {} |
@@ -549,6 +547,7 @@ class MediaChannel : public sigslot::has_slots<> { |
// Called when a RTCP packet is received. |
virtual void OnRtcpReceived(rtc::Buffer* packet, |
const rtc::PacketTime& packet_time) = 0; |
+ virtual void OnPacketSent(const rtc::SentPacket& sent_packet) {} |
// Called when the socket's ability to send has changed. |
virtual void OnReadyToSend(bool ready) = 0; |
// Creates a new outgoing media stream with SSRCs and CNAME as described |
@@ -572,12 +571,12 @@ class MediaChannel : public sigslot::has_slots<> { |
} |
// Base method to send packet using NetworkInterface. |
- bool SendPacket(rtc::Buffer* packet) { |
- return DoSendPacket(packet, false); |
+ bool SendPacket(rtc::Buffer* packet, const rtc::PacketOptions& options) { |
+ return DoSendPacket(packet, false, options); |
} |
- bool SendRtcp(rtc::Buffer* packet) { |
- return DoSendPacket(packet, true); |
+ bool SendRtcp(rtc::Buffer* packet, const rtc::PacketOptions& options) { |
+ return DoSendPacket(packet, true, options); |
} |
int SetOption(NetworkInterface::SocketType type, |
@@ -606,13 +605,15 @@ class MediaChannel : public sigslot::has_slots<> { |
} |
private: |
- bool DoSendPacket(rtc::Buffer* packet, bool rtcp) { |
+ bool DoSendPacket(rtc::Buffer* packet, |
+ bool rtcp, |
+ const rtc::PacketOptions& options) { |
rtc::CritScope cs(&network_interface_crit_); |
if (!network_interface_) |
return false; |
- return (!rtcp) ? network_interface_->SendPacket(packet) : |
- network_interface_->SendRtcp(packet); |
+ return (!rtcp) ? network_interface_->SendPacket(packet, options) |
+ : network_interface_->SendRtcp(packet, options); |
} |
// |network_interface_| can be accessed from the worker_thread and |