Index: webrtc/p2p/base/fakepackettransport.h |
diff --git a/webrtc/p2p/base/fakepackettransport.h b/webrtc/p2p/base/fakepackettransport.h |
index 7e2f08437ec9782164e70d1007e9fcc15d749117..d8033c23c8db725580e77a9a14554e8f3810f0bc 100644 |
--- a/webrtc/p2p/base/fakepackettransport.h |
+++ b/webrtc/p2p/base/fakepackettransport.h |
@@ -16,6 +16,7 @@ |
#include "webrtc/api/ortc/packettransportinterface.h" |
#include "webrtc/base/asyncinvoker.h" |
#include "webrtc/base/copyonwritebuffer.h" |
+#include "webrtc/media/base/rtputils.h" |
joachim
2017/02/28 00:11:45
Same here.
|
#include "webrtc/p2p/base/packettransportinternal.h" |
namespace rtc { |
@@ -74,10 +75,11 @@ class FakePacketTransport : public PacketTransportInternal, |
if (async_) { |
invoker_.AsyncInvokeDelayed<void>( |
RTC_FROM_HERE, Thread::Current(), |
- Bind(&FakePacketTransport::SendPacketInternal, this, packet), |
+ Bind(&FakePacketTransport::SendPacketInternal, this, packet, |
+ options), |
async_delay_ms_); |
} else { |
- SendPacketInternal(packet); |
+ SendPacketInternal(packet, options); |
} |
SentPacket sent_packet(options.packet_id, TimeMillis()); |
SignalSentPacket(this, sent_packet); |
@@ -110,9 +112,14 @@ class FakePacketTransport : public PacketTransportInternal, |
SignalReceivingState(this); |
} |
- void SendPacketInternal(const CopyOnWriteBuffer& packet) { |
+ void SendPacketInternal(const CopyOnWriteBuffer& packet, |
+ const PacketOptions& options) { |
if (dest_) { |
- dest_->SignalReadPacket(dest_, packet.data<char>(), packet.size(), |
+ rtc::CopyOnWriteBuffer data(packet); |
+ cricket::ApplyPacketOptions( |
+ reinterpret_cast<uint8_t*>(data.data<char>()), data.size(), |
+ options.packet_time_params, 0); |
+ dest_->SignalReadPacket(dest_, data.data<char>(), data.size(), |
CreatePacketTime(0), 0); |
} |
} |