| OLD | NEW | 
|---|
| 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 // This test generate synthetic data. For audio it's a sinusoid waveform with | 5 // This test generate synthetic data. For audio it's a sinusoid waveform with | 
| 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern | 6 // frequency kSoundFrequency and different amplitudes. For video it's a pattern | 
| 7 // that is shifting by one pixel per frame, each pixels neighbors right and down | 7 // that is shifting by one pixel per frame, each pixels neighbors right and down | 
| 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap | 8 // is this pixels value +1, since the pixel value is 8 bit it will wrap | 
| 9 // frequently within the image. Visually this will create diagonally color bands | 9 // frequently within the image. Visually this will create diagonally color bands | 
| 10 // that moves across the screen | 10 // that moves across the screen | 
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 451     frame_input_ = cast_sender_->frame_input(); | 451     frame_input_ = cast_sender_->frame_input(); | 
| 452     frame_receiver_ = cast_receiver_->frame_receiver(); | 452     frame_receiver_ = cast_receiver_->frame_receiver(); | 
| 453 | 453 | 
| 454     audio_bus_factory_.reset(new TestAudioBusFactory( | 454     audio_bus_factory_.reset(new TestAudioBusFactory( | 
| 455         audio_sender_config_.channels, audio_sender_config_.frequency, | 455         audio_sender_config_.channels, audio_sender_config_.frequency, | 
| 456         kSoundFrequency, kSoundVolume)); | 456         kSoundFrequency, kSoundVolume)); | 
| 457   } | 457   } | 
| 458 | 458 | 
| 459   virtual ~End2EndTest() {} | 459   virtual ~End2EndTest() {} | 
| 460 | 460 | 
|  | 461   virtual void TearDown() OVERRIDE { | 
|  | 462     cast_sender_.reset(); | 
|  | 463     cast_receiver_.reset(); | 
|  | 464     task_runner_->RunTasks(); | 
|  | 465   } | 
|  | 466 | 
| 461   void SendVideoFrame(int start_value, const base::TimeTicks& capture_time) { | 467   void SendVideoFrame(int start_value, const base::TimeTicks& capture_time) { | 
| 462     if (start_time_.is_null()) | 468     if (start_time_.is_null()) | 
| 463       start_time_ = testing_clock_->NowTicks(); | 469       start_time_ = testing_clock_->NowTicks(); | 
| 464       start_time_ = testing_clock_->NowTicks(); | 470       start_time_ = testing_clock_->NowTicks(); | 
| 465     base::TimeDelta time_diff = testing_clock_->NowTicks() - start_time_; | 471     base::TimeDelta time_diff = testing_clock_->NowTicks() - start_time_; | 
| 466     gfx::Size size(kVideoWidth, kVideoHeight); | 472     gfx::Size size(kVideoWidth, kVideoHeight); | 
| 467     EXPECT_TRUE(VideoFrame::IsValidConfig(VideoFrame::I420, | 473     EXPECT_TRUE(VideoFrame::IsValidConfig(VideoFrame::I420, | 
| 468                                           size, gfx::Rect(size), size)); | 474                                           size, gfx::Rect(size), size)); | 
| 469     scoped_refptr<media::VideoFrame> video_frame = | 475     scoped_refptr<media::VideoFrame> video_frame = | 
| 470         media::VideoFrame::CreateFrame( | 476         media::VideoFrame::CreateFrame( | 
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1124 } | 1130 } | 
| 1125 | 1131 | 
| 1126 | 1132 | 
| 1127 // TODO(pwestin): Add repeatable packet loss test. | 1133 // TODO(pwestin): Add repeatable packet loss test. | 
| 1128 // TODO(pwestin): Add test for misaligned send get calls. | 1134 // TODO(pwestin): Add test for misaligned send get calls. | 
| 1129 // TODO(pwestin): Add more tests that does not resample. | 1135 // TODO(pwestin): Add more tests that does not resample. | 
| 1130 // TODO(pwestin): Add test when we have starvation for our RunTask. | 1136 // TODO(pwestin): Add test when we have starvation for our RunTask. | 
| 1131 | 1137 | 
| 1132 }  // namespace cast | 1138 }  // namespace cast | 
| 1133 }  // namespace media | 1139 }  // namespace media | 
| OLD | NEW | 
|---|