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

Side by Side Diff: media/cast/test/simulator.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/sender.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Simulate end to end streaming. 5 // Simulate end to end streaming.
6 // 6 //
7 // Input: 7 // Input:
8 // --source= 8 // --source=
9 // WebM used as the source of video and audio frames. 9 // WebM used as the source of video and audio frames.
10 // --output= 10 // --output=
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 sender_to_receiver.Initialize( 473 sender_to_receiver.Initialize(
474 scoped_ptr<test::PacketPipe>(), 474 scoped_ptr<test::PacketPipe>(),
475 transport_receiver->PacketReceiverForTesting(), task_runner, 475 transport_receiver->PacketReceiverForTesting(), task_runner,
476 &testing_clock); 476 &testing_clock);
477 } 477 }
478 478
479 // Initialize a fake media source and a tracker to encoded video frames. 479 // Initialize a fake media source and a tracker to encoded video frames.
480 const bool quality_test = !metrics_output_path.empty(); 480 const bool quality_test = !metrics_output_path.empty();
481 FakeMediaSource media_source(task_runner, 481 FakeMediaSource media_source(task_runner,
482 &testing_clock, 482 &testing_clock,
483 audio_sender_config,
483 video_sender_config, 484 video_sender_config,
484 quality_test); 485 quality_test);
485 scoped_ptr<EncodedVideoFrameTracker> video_frame_tracker; 486 scoped_ptr<EncodedVideoFrameTracker> video_frame_tracker;
486 if (quality_test) { 487 if (quality_test) {
487 video_frame_tracker.reset(new EncodedVideoFrameTracker(&media_source)); 488 video_frame_tracker.reset(new EncodedVideoFrameTracker(&media_source));
488 sender_env->Logging()->AddRawEventSubscriber(video_frame_tracker.get()); 489 sender_env->Logging()->AddRawEventSubscriber(video_frame_tracker.get());
489 } 490 }
490 491
491 // Quality metrics computed for each frame decoded. 492 // Quality metrics computed for each frame decoded.
492 GotVideoFrameOutput metrics_output; 493 GotVideoFrameOutput metrics_output;
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 values.SetString("sim-id", sim_id); 766 values.SetString("sim-id", sim_id);
766 767
767 std::string extra_data; 768 std::string extra_data;
768 base::JSONWriter::Write(&values, &extra_data); 769 base::JSONWriter::Write(&values, &extra_data);
769 770
770 // Run. 771 // Run.
771 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path, 772 media::cast::RunSimulation(source_path, log_output_path, metrics_output_path,
772 yuv_output_path, extra_data, model); 773 yuv_output_path, extra_data, model);
773 return 0; 774 return 0;
774 } 775 }
OLDNEW
« no previous file with comments | « media/cast/test/sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698