Index: webrtc/media/base/rtpdataengine.cc |
diff --git a/webrtc/media/base/rtpdataengine.cc b/webrtc/media/base/rtpdataengine.cc |
index 705ccbdaff771842e3838c6a0341299145541690..ae3617455573754271c16d94dcd6125083aaa991 100644 |
--- a/webrtc/media/base/rtpdataengine.cc |
+++ b/webrtc/media/base/rtpdataengine.cc |
@@ -10,7 +10,7 @@ |
#include "webrtc/media/base/rtpdataengine.h" |
-#include "webrtc/base/buffer.h" |
+#include "webrtc/base/copyonwritebuffer.h" |
#include "webrtc/base/helpers.h" |
#include "webrtc/base/logging.h" |
#include "webrtc/base/ratelimiter.h" |
@@ -205,9 +205,9 @@ bool RtpDataMediaChannel::RemoveRecvStream(uint32_t ssrc) { |
} |
void RtpDataMediaChannel::OnPacketReceived( |
- rtc::Buffer* packet, const rtc::PacketTime& packet_time) { |
+ rtc::CopyOnWriteBuffer* packet, const rtc::PacketTime& packet_time) { |
RtpHeader header; |
- if (!GetRtpHeader(packet->data(), packet->size(), &header)) { |
+ if (!GetRtpHeader(packet->cdata(), packet->size(), &header)) { |
// Don't want to log for every corrupt packet. |
// LOG(LS_WARNING) << "Could not read rtp header from packet of length " |
// << packet->length() << "."; |
@@ -215,7 +215,7 @@ void RtpDataMediaChannel::OnPacketReceived( |
} |
size_t header_length; |
- if (!GetRtpHeaderLen(packet->data(), packet->size(), &header_length)) { |
+ if (!GetRtpHeaderLen(packet->cdata(), packet->size(), &header_length)) { |
// Don't want to log for every corrupt packet. |
// LOG(LS_WARNING) << "Could not read rtp header" |
// << length from packet of length " |
@@ -223,7 +223,7 @@ void RtpDataMediaChannel::OnPacketReceived( |
return; |
} |
const char* data = |
- packet->data<char>() + header_length + sizeof(kReservedSpace); |
+ packet->cdata<char>() + header_length + sizeof(kReservedSpace); |
size_t data_len = packet->size() - header_length - sizeof(kReservedSpace); |
if (!receiving_) { |
@@ -276,7 +276,7 @@ bool RtpDataMediaChannel::SetMaxSendBandwidth(int bps) { |
bool RtpDataMediaChannel::SendData( |
const SendDataParams& params, |
- const rtc::Buffer& payload, |
+ const rtc::CopyOnWriteBuffer& payload, |
SendDataResult* result) { |
if (result) { |
// If we return true, we'll set this to SDR_SUCCESS. |
@@ -329,7 +329,7 @@ bool RtpDataMediaChannel::SendData( |
rtp_clock_by_send_ssrc_[header.ssrc]->Tick( |
now, &header.seq_num, &header.timestamp); |
- rtc::Buffer packet(kMinRtpPacketLen, packet_len); |
+ rtc::CopyOnWriteBuffer packet(kMinRtpPacketLen, packet_len); |
if (!SetRtpHeader(packet.data(), packet.size(), header)) { |
return false; |
} |