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

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

Issue 2133903002: RELAND: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled two unittests. Created 4 years, 5 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/fake_media_source.cc ('k') | media/cast/test/simulator.cc » ('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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (remote_ip_address.empty()) 217 if (remote_ip_address.empty())
218 remote_ip_address = "127.0.0.1"; 218 remote_ip_address = "127.0.0.1";
219 int remote_port = 0; 219 int remote_port = 0;
220 if (!base::StringToInt(cmd->GetSwitchValueASCII(kSwitchPort), &remote_port) || 220 if (!base::StringToInt(cmd->GetSwitchValueASCII(kSwitchPort), &remote_port) ||
221 remote_port < 0 || remote_port > 65535) { 221 remote_port < 0 || remote_port > 65535) {
222 remote_port = 2344; 222 remote_port = 2344;
223 } 223 }
224 LOG(INFO) << "Sending to " << remote_ip_address << ":" << remote_port 224 LOG(INFO) << "Sending to " << remote_ip_address << ":" << remote_port
225 << "."; 225 << ".";
226 226
227 media::cast::AudioSenderConfig audio_config = 227 media::cast::FrameSenderConfig audio_config =
228 media::cast::GetDefaultAudioSenderConfig(); 228 media::cast::GetDefaultAudioSenderConfig();
229 media::cast::VideoSenderConfig video_config = 229 media::cast::FrameSenderConfig video_config =
230 media::cast::GetDefaultVideoSenderConfig(); 230 media::cast::GetDefaultVideoSenderConfig();
231 231
232 // Running transport on the main thread. 232 // Running transport on the main thread.
233 // Setting up transport config. 233 // Setting up transport config.
234 net::IPEndPoint remote_endpoint = 234 net::IPEndPoint remote_endpoint =
235 CreateUDPAddress(remote_ip_address, static_cast<uint16_t>(remote_port)); 235 CreateUDPAddress(remote_ip_address, static_cast<uint16_t>(remote_port));
236 236
237 // Enable raw event and stats logging. 237 // Enable raw event and stats logging.
238 // Running transport on the main thread. 238 // Running transport on the main thread.
239 scoped_refptr<media::cast::CastEnvironment> cast_environment( 239 scoped_refptr<media::cast::CastEnvironment> cast_environment(
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 FROM_HERE, base::Bind(&media::cast::CastSender::InitializeAudio, 348 FROM_HERE, base::Bind(&media::cast::CastSender::InitializeAudio,
349 base::Unretained(cast_sender.get()), audio_config, 349 base::Unretained(cast_sender.get()), audio_config,
350 base::Bind(&QuitLoopOnInitializationResult))); 350 base::Bind(&QuitLoopOnInitializationResult)));
351 io_message_loop.Run(); // Wait for audio initialization. 351 io_message_loop.Run(); // Wait for audio initialization.
352 352
353 fake_media_source->Start(cast_sender->audio_frame_input(), 353 fake_media_source->Start(cast_sender->audio_frame_input(),
354 cast_sender->video_frame_input()); 354 cast_sender->video_frame_input());
355 io_message_loop.Run(); 355 io_message_loop.Run();
356 return 0; 356 return 0;
357 } 357 }
OLDNEW
« no previous file with comments | « media/cast/test/fake_media_source.cc ('k') | media/cast/test/simulator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698