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

Side by Side Diff: media/cast/test/transport/transport.cc

Issue 70873002: Fix Win64 build error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/test/transport/transport.h" 5 #include "media/cast/test/transport/transport.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 VLOG(1) << "Drop packet f:" << static_cast<int>(data[12 + 1]) 96 VLOG(1) << "Drop packet f:" << static_cast<int>(data[12 + 1])
97 << " p:" << static_cast<int>(data[12 + 3]) 97 << " p:" << static_cast<int>(data[12 + 3])
98 << " m:" << static_cast<int>(data[12 + 5]); 98 << " m:" << static_cast<int>(data[12 + 5]);
99 return true; 99 return true;
100 } 100 }
101 } 101 }
102 net::TestCompletionCallback callback; 102 net::TestCompletionCallback callback;
103 scoped_refptr<net::WrappedIOBuffer> buffer( 103 scoped_refptr<net::WrappedIOBuffer> buffer(
104 new net::WrappedIOBuffer(reinterpret_cast<const char*>(data))); 104 new net::WrappedIOBuffer(reinterpret_cast<const char*>(data)));
105 int rv = udp_socket_->SendTo( 105 int rv = udp_socket_->SendTo(
106 buffer.get(), packet.size(), send_address_, callback.callback()); 106 buffer.get(), static_cast<int>(packet.size()), send_address_,
107 callback.callback());
107 return (rv == packet.size()); 108 return (rv == packet.size());
108 } 109 }
109 110
110 virtual bool SendPackets(const PacketList& packets) OVERRIDE { 111 virtual bool SendPackets(const PacketList& packets) OVERRIDE {
111 bool out_val = true; 112 bool out_val = true;
112 for (size_t i = 0; i < packets.size(); ++i) { 113 for (size_t i = 0; i < packets.size(); ++i) {
113 const Packet& packet = packets[i]; 114 const Packet& packet = packets[i];
114 out_val |= SendPacket(packet); 115 out_val |= SendPacket(packet);
115 } 116 }
116 return out_val; 117 return out_val;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 void Transport::SetSendDestination(std::string ip_address, int port) { 169 void Transport::SetSendDestination(std::string ip_address, int port) {
169 net::IPEndPoint send_address; 170 net::IPEndPoint send_address;
170 CreateUDPAddress(ip_address, port, &send_address); 171 CreateUDPAddress(ip_address, port, &send_address);
171 packet_sender_->SetSendAddress(send_address); 172 packet_sender_->SetSendAddress(send_address);
172 } 173 }
173 174
174 } // namespace test 175 } // namespace test
175 } // namespace cast 176 } // namespace cast
176 } // namespace media 177 } // namespace media
OLDNEW
« 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