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

Unified Diff: remoting/protocol/chromium_socket_factory.cc

Issue 1574353003: Update ChromiumPacketSocket factory to apply PacketOptions it receives. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@packet_options
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/chromium_socket_factory.cc
diff --git a/remoting/protocol/chromium_socket_factory.cc b/remoting/protocol/chromium_socket_factory.cc
index 6f9dfeb12a66f0cab431661528b235afdc248431..773657d54888445a2d022fc4875dbe091130ea39 100644
--- a/remoting/protocol/chromium_socket_factory.cc
+++ b/remoting/protocol/chromium_socket_factory.cc
@@ -10,12 +10,14 @@
#include "base/logging.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/time/time.h"
#include "jingle/glue/utils.h"
#include "net/base/io_buffer.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_errors.h"
#include "net/udp/udp_server_socket.h"
#include "remoting/protocol/socket_util.h"
+#include "third_party/libjingle/source/talk/media/base/rtputils.h"
#include "third_party/webrtc/base/asyncpacketsocket.h"
#include "third_party/webrtc/base/nethelpers.h"
@@ -194,7 +196,12 @@ int UdpPacketSocket::SendTo(const void* data, size_t data_size,
return EWOULDBLOCK;
}
- send_queue_.push_back(PendingPacket(data, data_size, endpoint));
+ PendingPacket packet(data, data_size, endpoint);
+ cricket::ApplyPacketOptions(
+ reinterpret_cast<uint8_t*>(packet.data->data()), data_size,
+ options.packet_time_params,
+ (base::TimeTicks::Now() - base::TimeTicks()).InMilliseconds());
+ send_queue_.push_back(packet);
send_queue_size_ += data_size;
DoSend();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698