OLD | NEW |
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 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "media/base/video_frame.h" | 10 #include "media/base/video_frame.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 base::TimeTicks expected_capture_time_; | 58 base::TimeTicks expected_capture_time_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(TestVideoEncoderCallback); | 60 DISALLOW_COPY_AND_ASSIGN(TestVideoEncoderCallback); |
61 }; | 61 }; |
62 } // namespace | 62 } // namespace |
63 | 63 |
64 class VideoEncoderImplTest : public ::testing::Test { | 64 class VideoEncoderImplTest : public ::testing::Test { |
65 protected: | 65 protected: |
66 VideoEncoderImplTest() | 66 VideoEncoderImplTest() |
67 : test_video_encoder_callback_(new TestVideoEncoderCallback()) { | 67 : test_video_encoder_callback_(new TestVideoEncoderCallback()) { |
68 video_config_.sender_ssrc = 1; | 68 video_config_.rtp_config.ssrc = 1; |
69 video_config_.incoming_feedback_ssrc = 2; | 69 video_config_.incoming_feedback_ssrc = 2; |
70 video_config_.rtp_config.payload_type = 127; | 70 video_config_.rtp_config.payload_type = 127; |
71 video_config_.use_external_encoder = false; | 71 video_config_.use_external_encoder = false; |
72 video_config_.width = 320; | 72 video_config_.width = 320; |
73 video_config_.height = 240; | 73 video_config_.height = 240; |
74 video_config_.max_bitrate = 5000000; | 74 video_config_.max_bitrate = 5000000; |
75 video_config_.min_bitrate = 1000000; | 75 video_config_.min_bitrate = 1000000; |
76 video_config_.start_bitrate = 2000000; | 76 video_config_.start_bitrate = 2000000; |
77 video_config_.max_qp = 56; | 77 video_config_.max_qp = 56; |
78 video_config_.min_qp = 0; | 78 video_config_.min_qp = 0; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 for (int i = 5; i < 17; ++i) { | 250 for (int i = 5; i < 17; ++i) { |
251 test_video_encoder_callback_->SetExpectedResult(false, i, 4, capture_time); | 251 test_video_encoder_callback_->SetExpectedResult(false, i, 4, capture_time); |
252 EXPECT_TRUE(video_encoder_->EncodeVideoFrame( | 252 EXPECT_TRUE(video_encoder_->EncodeVideoFrame( |
253 video_frame_, capture_time, frame_encoded_callback)); | 253 video_frame_, capture_time, frame_encoded_callback)); |
254 task_runner_->RunTasks(); | 254 task_runner_->RunTasks(); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 } // namespace cast | 258 } // namespace cast |
259 } // namespace media | 259 } // namespace media |
OLD | NEW |