OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 EXPECT_TRUE(channel_->SetCapturer(kSsrc + 2, video_capturer_2_.get())); | 165 EXPECT_TRUE(channel_->SetCapturer(kSsrc + 2, video_capturer_2_.get())); |
166 } | 166 } |
167 virtual void TearDown() { | 167 virtual void TearDown() { |
168 channel_.reset(); | 168 channel_.reset(); |
169 } | 169 } |
170 bool SetDefaultCodec() { | 170 bool SetDefaultCodec() { |
171 return SetOneCodec(DefaultCodec()); | 171 return SetOneCodec(DefaultCodec()); |
172 } | 172 } |
173 | 173 |
174 bool SetOneCodec(int pt, const char* name, int w, int h, int fr) { | 174 bool SetOneCodec(int pt, const char* name, int w, int h, int fr) { |
175 return SetOneCodec(cricket::VideoCodec(pt, name, w, h, fr, 0)); | 175 return SetOneCodec(cricket::VideoCodec(pt, name, w, h, fr)); |
176 } | 176 } |
177 bool SetOneCodec(const cricket::VideoCodec& codec) { | 177 bool SetOneCodec(const cricket::VideoCodec& codec) { |
178 cricket::VideoFormat capture_format(codec.width, codec.height, | 178 cricket::VideoFormat capture_format(codec.width, codec.height, |
179 cricket::VideoFormat::FpsToInterval(codec.framerate), | 179 cricket::VideoFormat::FpsToInterval(codec.framerate), |
180 cricket::FOURCC_I420); | 180 cricket::FOURCC_I420); |
181 | 181 |
182 if (video_capturer_) { | 182 if (video_capturer_) { |
183 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format)); | 183 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format)); |
184 } | 184 } |
185 if (video_capturer_2_) { | 185 if (video_capturer_2_) { |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 std::unique_ptr<C> channel_; | 1152 std::unique_ptr<C> channel_; |
1153 cricket::FakeNetworkInterface network_interface_; | 1153 cricket::FakeNetworkInterface network_interface_; |
1154 cricket::FakeVideoRenderer renderer_; | 1154 cricket::FakeVideoRenderer renderer_; |
1155 cricket::VideoMediaChannel::Error media_error_; | 1155 cricket::VideoMediaChannel::Error media_error_; |
1156 | 1156 |
1157 // Used by test cases where 2 streams are run on the same channel. | 1157 // Used by test cases where 2 streams are run on the same channel. |
1158 cricket::FakeVideoRenderer renderer2_; | 1158 cricket::FakeVideoRenderer renderer2_; |
1159 }; | 1159 }; |
1160 | 1160 |
1161 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 1161 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
OLD | NEW |