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

Unified Diff: media/cast/test/sender.cc

Issue 144033004: Cast: Replace string+int x2 with net::IPEndPoint in CastTransportConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | media/cast/transport/cast_transport_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/sender.cc
diff --git a/media/cast/test/sender.cc b/media/cast/test/sender.cc
index d66165c4215a2db4d2c69fd44ff9d2d60b3b29ec..fbc861c4ee9c8ca689239cb32e473863ce86532a 100644
--- a/media/cast/test/sender.cc
+++ b/media/cast/test/sender.cc
@@ -296,8 +296,15 @@ namespace {
void UpdateCastTransportStatus(media::cast::transport::CastTransportStatus
status) {
}
+
+net::IPEndPoint CreateUDPAddress(std::string ip_str, int port) {
+ net::IPAddressNumber ip_number;
+ CHECK(net::ParseIPLiteralToNumber(ip_str, &ip_number));
+ return net::IPEndPoint(ip_number, port);
}
+} // namespace
+
int main(int argc, char** argv) {
base::AtExitManager at_exit;
VLOG(1) << "Cast Sender";
@@ -325,10 +332,10 @@ int main(int argc, char** argv) {
// Setting up transport config.
media::cast::transport::CastTransportConfig config;
- config.receiver_ip_address = remote_ip_address;
- config.local_ip_address = local_ip_address;
- config.receive_port = local_port;
- config.send_port = remote_port;
+ config.receiver_endpoint = CreateUDPAddress(remote_ip_address,
+ remote_port);
+ config.local_endpoint = CreateUDPAddress(local_ip_address,
+ local_port);
config.audio_ssrc = audio_config.sender_ssrc;
config.video_ssrc = video_config.sender_ssrc;
config.audio_rtp_payload_type = audio_config.rtp_payload_type;
« no previous file with comments | « no previous file | media/cast/transport/cast_transport_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698