| 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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 cast_sender_ = | 605 cast_sender_ = |
| 606 CastSender::Create(cast_environment_sender_, transport_sender_.get()); | 606 CastSender::Create(cast_environment_sender_, transport_sender_.get()); |
| 607 | 607 |
| 608 // Initializing audio and video senders. | 608 // Initializing audio and video senders. |
| 609 cast_sender_->InitializeAudio(audio_sender_config_, | 609 cast_sender_->InitializeAudio(audio_sender_config_, |
| 610 base::Bind(&AudioInitializationStatus)); | 610 base::Bind(&AudioInitializationStatus)); |
| 611 cast_sender_->InitializeVideo(video_sender_config_, | 611 cast_sender_->InitializeVideo(video_sender_config_, |
| 612 base::Bind(&VideoInitializationStatus), | 612 base::Bind(&VideoInitializationStatus), |
| 613 CreateDefaultVideoEncodeAcceleratorCallback(), | 613 CreateDefaultVideoEncodeAcceleratorCallback(), |
| 614 CreateDefaultVideoEncodeMemoryCallback()); | 614 CreateDefaultVideoEncodeMemoryCallback()); |
| 615 task_runner_->RunTasks(); |
| 615 | 616 |
| 616 receiver_to_sender_.SetPacketReceiver( | 617 receiver_to_sender_.SetPacketReceiver( |
| 617 transport_sender_->PacketReceiverForTesting(), | 618 transport_sender_->PacketReceiverForTesting(), |
| 618 task_runner_, | 619 task_runner_, |
| 619 &testing_clock_); | 620 &testing_clock_); |
| 620 sender_to_receiver_.SetPacketReceiver(cast_receiver_->packet_receiver(), | 621 sender_to_receiver_.SetPacketReceiver(cast_receiver_->packet_receiver(), |
| 621 task_runner_, | 622 task_runner_, |
| 622 &testing_clock_); | 623 &testing_clock_); |
| 623 | 624 |
| 624 audio_frame_input_ = cast_sender_->audio_frame_input(); | 625 audio_frame_input_ = cast_sender_->audio_frame_input(); |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1464 EXPECT_LT(jump, 220u); | 1465 EXPECT_LT(jump, 220u); |
| 1465 } | 1466 } |
| 1466 | 1467 |
| 1467 // TODO(pwestin): Add repeatable packet loss test. | 1468 // TODO(pwestin): Add repeatable packet loss test. |
| 1468 // TODO(pwestin): Add test for misaligned send get calls. | 1469 // TODO(pwestin): Add test for misaligned send get calls. |
| 1469 // TODO(pwestin): Add more tests that does not resample. | 1470 // TODO(pwestin): Add more tests that does not resample. |
| 1470 // TODO(pwestin): Add test when we have starvation for our RunTask. | 1471 // TODO(pwestin): Add test when we have starvation for our RunTask. |
| 1471 | 1472 |
| 1472 } // namespace cast | 1473 } // namespace cast |
| 1473 } // namespace media | 1474 } // namespace media |
| OLD | NEW |