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

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

Issue 2113783002: Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (remote_ip_address.empty()) 216 if (remote_ip_address.empty())
217 remote_ip_address = "127.0.0.1"; 217 remote_ip_address = "127.0.0.1";
218 int remote_port = 0; 218 int remote_port = 0;
219 if (!base::StringToInt(cmd->GetSwitchValueASCII(kSwitchPort), &remote_port) || 219 if (!base::StringToInt(cmd->GetSwitchValueASCII(kSwitchPort), &remote_port) ||
220 remote_port < 0 || remote_port > 65535) { 220 remote_port < 0 || remote_port > 65535) {
221 remote_port = 2344; 221 remote_port = 2344;
222 } 222 }
223 LOG(INFO) << "Sending to " << remote_ip_address << ":" << remote_port 223 LOG(INFO) << "Sending to " << remote_ip_address << ":" << remote_port
224 << "."; 224 << ".";
225 225
226 media::cast::AudioSenderConfig audio_config = 226 media::cast::FrameSenderConfig audio_config =
227 media::cast::GetDefaultAudioSenderConfig(); 227 media::cast::GetDefaultAudioSenderConfig();
228 media::cast::VideoSenderConfig video_config = 228 media::cast::FrameSenderConfig video_config =
229 media::cast::GetDefaultVideoSenderConfig(); 229 media::cast::GetDefaultVideoSenderConfig();
230 230
231 // Running transport on the main thread. 231 // Running transport on the main thread.
232 // Setting up transport config. 232 // Setting up transport config.
233 net::IPEndPoint remote_endpoint = 233 net::IPEndPoint remote_endpoint =
234 CreateUDPAddress(remote_ip_address, static_cast<uint16_t>(remote_port)); 234 CreateUDPAddress(remote_ip_address, static_cast<uint16_t>(remote_port));
235 235
236 // Enable raw event and stats logging. 236 // Enable raw event and stats logging.
237 // Running transport on the main thread. 237 // Running transport on the main thread.
238 scoped_refptr<media::cast::CastEnvironment> cast_environment( 238 scoped_refptr<media::cast::CastEnvironment> cast_environment(
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 base::Unretained(cast_sender.get()), 349 base::Unretained(cast_sender.get()),
350 audio_config, 350 audio_config,
351 base::Bind(&QuitLoopOnInitializationResult))); 351 base::Bind(&QuitLoopOnInitializationResult)));
352 io_message_loop.Run(); // Wait for audio initialization. 352 io_message_loop.Run(); // Wait for audio initialization.
353 353
354 fake_media_source->Start(cast_sender->audio_frame_input(), 354 fake_media_source->Start(cast_sender->audio_frame_input(),
355 cast_sender->video_frame_input()); 355 cast_sender->video_frame_input());
356 io_message_loop.Run(); 356 io_message_loop.Run();
357 return 0; 357 return 0;
358 } 358 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698