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

Unified Diff: content/browser/renderer_host/p2p/socket_host_tcp.cc

Issue 1577123004: Use rtppacketutil.h in socket_host*.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: content/browser/renderer_host/p2p/socket_host_tcp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_tcp.cc b/content/browser/renderer_host/p2p/socket_host_tcp.cc
index cd93a1293707231ecb120cd0ae7c12ee0ee3f066..9fa9fc4cbf205b0d18d0e12c2b9838d10fbba94e 100644
--- a/content/browser/renderer_host/p2p/socket_host_tcp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_tcp.cc
@@ -23,7 +23,7 @@
#include "net/socket/tcp_client_socket.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
-#include "third_party/webrtc/base/asyncpacketsocket.h"
+#include "third_party/libjingle/source/talk/media/base/rtputils.h"
namespace {
@@ -528,10 +528,10 @@ void P2PSocketHostTcp::DoSend(const net::IPEndPoint& to,
*reinterpret_cast<uint16_t*>(buffer->data()) = base::HostToNet16(data.size());
memcpy(buffer->data() + kPacketHeaderSize, &data[0], data.size());
- packet_processing_helpers::ApplyPacketOptions(
- buffer->data() + kPacketHeaderSize,
- buffer->BytesRemaining() - kPacketHeaderSize,
- options, 0);
+ cricket::ApplyPacketOptions(
+ reinterpret_cast<uint8_t*>(buffer->data()) + kPacketHeaderSize,
+ buffer->BytesRemaining() - kPacketHeaderSize, options.packet_time_params,
+ (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds());
WriteOrQueue(buffer);
}
@@ -601,8 +601,10 @@ void P2PSocketHostStunTcp::DoSend(const net::IPEndPoint& to,
new net::DrainableIOBuffer(new net::IOBuffer(size), size);
memcpy(buffer->data(), &data[0], data.size());
- packet_processing_helpers::ApplyPacketOptions(
- buffer->data(), data.size(), options, 0);
+ cricket::ApplyPacketOptions(
+ reinterpret_cast<uint8_t*>(buffer->data()), data.size(),
+ options.packet_time_params,
+ (base::TimeTicks::Now() - base::TimeTicks()).InMicroseconds());
if (pad_bytes) {
char padding[4] = {0};
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host.cc ('k') | content/browser/renderer_host/p2p/socket_host_udp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698