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_thread.h" | 10 #include "media/cast/cast_thread.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Do nothing. | 46 // Do nothing. |
47 } | 47 } |
48 | 48 |
49 class VideoSenderTest : public ::testing::Test { | 49 class VideoSenderTest : public ::testing::Test { |
50 protected: | 50 protected: |
51 VideoSenderTest() { | 51 VideoSenderTest() { |
52 testing_clock_.Advance( | 52 testing_clock_.Advance( |
53 base::TimeDelta::FromMilliseconds(kStartMillisecond)); | 53 base::TimeDelta::FromMilliseconds(kStartMillisecond)); |
54 } | 54 } |
55 | 55 |
56 ~VideoSenderTest() {} | 56 virtual ~VideoSenderTest() {} |
57 | 57 |
58 void InitEncoder(bool external) { | 58 void InitEncoder(bool external) { |
59 VideoSenderConfig video_config; | 59 VideoSenderConfig video_config; |
60 video_config.sender_ssrc = 1; | 60 video_config.sender_ssrc = 1; |
61 video_config.incoming_feedback_ssrc = 2; | 61 video_config.incoming_feedback_ssrc = 2; |
62 video_config.rtp_payload_type = 127; | 62 video_config.rtp_payload_type = 127; |
63 video_config.use_external_encoder = external; | 63 video_config.use_external_encoder = external; |
64 video_config.width = 320; | 64 video_config.width = 320; |
65 video_config.height = 240; | 65 video_config.height = 240; |
66 video_config.max_bitrate = 5000000; | 66 video_config.max_bitrate = 5000000; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 base::TimeDelta::FromMilliseconds(1 + kDefaultRtpMaxDelayMs); | 195 base::TimeDelta::FromMilliseconds(1 + kDefaultRtpMaxDelayMs); |
196 | 196 |
197 // Make sure that we do a re-send. | 197 // Make sure that we do a re-send. |
198 testing_clock_.Advance(max_resend_timeout); | 198 testing_clock_.Advance(max_resend_timeout); |
199 task_runner_->RunTasks(); | 199 task_runner_->RunTasks(); |
200 } | 200 } |
201 | 201 |
202 } // namespace cast | 202 } // namespace cast |
203 } // namespace media | 203 } // namespace media |
204 | 204 |
OLD | NEW |