| 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 #include <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/test/simple_test_tick_clock.h" | 9 #include "base/test/simple_test_tick_clock.h" |
| 10 #include "media/cast/cast_environment.h" | 10 #include "media/cast/cast_environment.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 video_config, &mock_video_encoder_controller_, &mock_transport_)); | 80 video_config, &mock_video_encoder_controller_, &mock_transport_)); |
| 81 } else { | 81 } else { |
| 82 video_sender_.reset(new PeerVideoSender(cast_environment_, video_config, | 82 video_sender_.reset(new PeerVideoSender(cast_environment_, video_config, |
| 83 NULL, &mock_transport_)); | 83 NULL, &mock_transport_)); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 virtual void SetUp() { | 87 virtual void SetUp() { |
| 88 task_runner_ = new test::FakeTaskRunner(&testing_clock_); | 88 task_runner_ = new test::FakeTaskRunner(&testing_clock_); |
| 89 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, | 89 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, |
| 90 task_runner_, task_runner_, task_runner_, task_runner_); | 90 task_runner_, task_runner_, task_runner_, task_runner_, |
| 91 false, false, false); |
| 91 } | 92 } |
| 92 | 93 |
| 93 I420VideoFrame* AllocateNewVideoFrame() { | 94 I420VideoFrame* AllocateNewVideoFrame() { |
| 94 I420VideoFrame* video_frame = new I420VideoFrame(); | 95 I420VideoFrame* video_frame = new I420VideoFrame(); |
| 95 video_frame->width = 320; | 96 video_frame->width = 320; |
| 96 video_frame->height = 240; | 97 video_frame->height = 240; |
| 97 | 98 |
| 98 video_frame->y_plane.stride = video_frame->width; | 99 video_frame->y_plane.stride = video_frame->width; |
| 99 video_frame->y_plane.length = video_frame->width; | 100 video_frame->y_plane.length = video_frame->width; |
| 100 video_frame->y_plane.data = | 101 video_frame->y_plane.data = |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 base::TimeDelta::FromMilliseconds(1 + kDefaultRtpMaxDelayMs); | 198 base::TimeDelta::FromMilliseconds(1 + kDefaultRtpMaxDelayMs); |
| 198 | 199 |
| 199 // Make sure that we do a re-send. | 200 // Make sure that we do a re-send. |
| 200 testing_clock_.Advance(max_resend_timeout); | 201 testing_clock_.Advance(max_resend_timeout); |
| 201 task_runner_->RunTasks(); | 202 task_runner_->RunTasks(); |
| 202 } | 203 } |
| 203 | 204 |
| 204 } // namespace cast | 205 } // namespace cast |
| 205 } // namespace media | 206 } // namespace media |
| 206 | 207 |
| OLD | NEW |