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

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

Issue 1360523002: Cleanup: Pass std::string as const reference from media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/cast/test/receiver.cc ('k') | media/cast/test/utility/input_builder.h » ('j') | 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 // Test application that simulates a cast sender - Data can be either generated 5 // Test application that simulates a cast sender - Data can be either generated
6 // or read from a file. 6 // or read from a file.
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 it->frame_id); 100 it->frame_id);
101 } 101 }
102 } 102 }
103 103
104 void QuitLoopOnInitializationResult(media::cast::OperationalStatus result) { 104 void QuitLoopOnInitializationResult(media::cast::OperationalStatus result) {
105 CHECK(result == media::cast::STATUS_INITIALIZED) 105 CHECK(result == media::cast::STATUS_INITIALIZED)
106 << "Cast sender uninitialized"; 106 << "Cast sender uninitialized";
107 base::MessageLoop::current()->Quit(); 107 base::MessageLoop::current()->Quit();
108 } 108 }
109 109
110 net::IPEndPoint CreateUDPAddress(std::string ip_str, uint16 port) { 110 net::IPEndPoint CreateUDPAddress(const std::string& ip_str, uint16 port) {
111 net::IPAddressNumber ip_number; 111 net::IPAddressNumber ip_number;
112 CHECK(net::ParseIPLiteralToNumber(ip_str, &ip_number)); 112 CHECK(net::ParseIPLiteralToNumber(ip_str, &ip_number));
113 return net::IPEndPoint(ip_number, port); 113 return net::IPEndPoint(ip_number, port);
114 } 114 }
115 115
116 void DumpLoggingData(const media::cast::proto::LogMetadata& log_metadata, 116 void DumpLoggingData(const media::cast::proto::LogMetadata& log_metadata,
117 const media::cast::FrameEventList& frame_events, 117 const media::cast::FrameEventList& frame_events,
118 const media::cast::PacketEventList& packet_events, 118 const media::cast::PacketEventList& packet_events,
119 base::ScopedFILE log_file) { 119 base::ScopedFILE log_file) {
120 VLOG(0) << "Frame map size: " << frame_events.size(); 120 VLOG(0) << "Frame map size: " << frame_events.size();
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 base::Unretained(cast_sender.get()), 366 base::Unretained(cast_sender.get()),
367 audio_config, 367 audio_config,
368 base::Bind(&QuitLoopOnInitializationResult))); 368 base::Bind(&QuitLoopOnInitializationResult)));
369 io_message_loop.Run(); // Wait for audio initialization. 369 io_message_loop.Run(); // Wait for audio initialization.
370 370
371 fake_media_source->Start(cast_sender->audio_frame_input(), 371 fake_media_source->Start(cast_sender->audio_frame_input(),
372 cast_sender->video_frame_input()); 372 cast_sender->video_frame_input());
373 io_message_loop.Run(); 373 io_message_loop.Run();
374 return 0; 374 return 0;
375 } 375 }
OLDNEW
« no previous file with comments | « media/cast/test/receiver.cc ('k') | media/cast/test/utility/input_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698