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

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

Issue 900913004: [cast/test] Use AudioConverter in FakeMediaSource to play back 6-channel WEBM's. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 <queue> 8 #include <queue>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 new media::cast::CastEnvironment( 252 new media::cast::CastEnvironment(
253 make_scoped_ptr<base::TickClock>(new base::DefaultTickClock()), 253 make_scoped_ptr<base::TickClock>(new base::DefaultTickClock()),
254 io_message_loop.message_loop_proxy(), 254 io_message_loop.message_loop_proxy(),
255 audio_thread.message_loop_proxy(), 255 audio_thread.message_loop_proxy(),
256 video_thread.message_loop_proxy())); 256 video_thread.message_loop_proxy()));
257 257
258 // SendProcess initialization. 258 // SendProcess initialization.
259 scoped_ptr<media::cast::FakeMediaSource> fake_media_source( 259 scoped_ptr<media::cast::FakeMediaSource> fake_media_source(
260 new media::cast::FakeMediaSource(test_thread.message_loop_proxy(), 260 new media::cast::FakeMediaSource(test_thread.message_loop_proxy(),
261 cast_environment->Clock(), 261 cast_environment->Clock(),
262 video_config, false)); 262 audio_config,
263 video_config,
264 false));
263 265
264 int override_fps = 0; 266 int override_fps = 0;
265 if (!base::StringToInt(cmd->GetSwitchValueASCII(kSwitchFps), 267 if (!base::StringToInt(cmd->GetSwitchValueASCII(kSwitchFps),
266 &override_fps)){ 268 &override_fps)){
267 override_fps = 0; 269 override_fps = 0;
268 } 270 }
269 base::FilePath source_path = cmd->GetSwitchValuePath(kSwitchSourceFile); 271 base::FilePath source_path = cmd->GetSwitchValuePath(kSwitchSourceFile);
270 if (!source_path.empty()) { 272 if (!source_path.empty()) {
271 LOG(INFO) << "Source: " << source_path.value(); 273 LOG(INFO) << "Source: " << source_path.value();
272 fake_media_source->SetSourceFile(source_path, override_fps); 274 fake_media_source->SetSourceFile(source_path, override_fps);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 base::Unretained(cast_sender.get()), 373 base::Unretained(cast_sender.get()),
372 audio_config, 374 audio_config,
373 base::Bind(&QuitLoopOnInitializationResult))); 375 base::Bind(&QuitLoopOnInitializationResult)));
374 io_message_loop.Run(); // Wait for audio initialization. 376 io_message_loop.Run(); // Wait for audio initialization.
375 377
376 fake_media_source->Start(cast_sender->audio_frame_input(), 378 fake_media_source->Start(cast_sender->audio_frame_input(),
377 cast_sender->video_frame_input()); 379 cast_sender->video_frame_input());
378 io_message_loop.Run(); 380 io_message_loop.Run();
379 return 0; 381 return 0;
380 } 382 }
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