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

Unified Diff: talk/media/base/mediachannel.h

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanups. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: talk/media/base/mediachannel.h
diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h
index dd46a2ff1a89ca9f7d7f4663831b4cd6f3b594a1..4907310dc199cadd8440be70062e173abf2cb65b 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 OnSentPacket(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

Powered by Google App Engine
This is Rietveld 408576698