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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 channel_->SetSource(kSsrc + 2, video_capturer_2_.get()); | 144 channel_->SetSource(kSsrc + 2, video_capturer_2_.get()); |
145 } | 145 } |
146 virtual void TearDown() { | 146 virtual void TearDown() { |
147 channel_.reset(); | 147 channel_.reset(); |
148 } | 148 } |
149 bool SetDefaultCodec() { | 149 bool SetDefaultCodec() { |
150 return SetOneCodec(DefaultCodec()); | 150 return SetOneCodec(DefaultCodec()); |
151 } | 151 } |
152 | 152 |
153 bool SetOneCodec(int pt, const char* name, int w, int h, int fr) { | 153 bool SetOneCodec(int pt, const char* name, int w, int h, int fr) { |
154 return SetOneCodec(cricket::VideoCodec(pt, name, w, h, fr, 0)); | 154 return SetOneCodec(cricket::VideoCodec(pt, name, w, h, fr)); |
155 } | 155 } |
156 bool SetOneCodec(const cricket::VideoCodec& codec) { | 156 bool SetOneCodec(const cricket::VideoCodec& codec) { |
157 cricket::VideoFormat capture_format(codec.width, codec.height, | 157 cricket::VideoFormat capture_format(codec.width, codec.height, |
158 cricket::VideoFormat::FpsToInterval(codec.framerate), | 158 cricket::VideoFormat::FpsToInterval(codec.framerate), |
159 cricket::FOURCC_I420); | 159 cricket::FOURCC_I420); |
160 | 160 |
161 if (video_capturer_) { | 161 if (video_capturer_) { |
162 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format)); | 162 EXPECT_EQ(cricket::CS_RUNNING, video_capturer_->Start(capture_format)); |
163 } | 163 } |
164 if (video_capturer_2_) { | 164 if (video_capturer_2_) { |
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1077 std::unique_ptr<C> channel_; | 1077 std::unique_ptr<C> channel_; |
1078 cricket::FakeNetworkInterface network_interface_; | 1078 cricket::FakeNetworkInterface network_interface_; |
1079 cricket::FakeVideoRenderer renderer_; | 1079 cricket::FakeVideoRenderer renderer_; |
1080 cricket::VideoMediaChannel::Error media_error_; | 1080 cricket::VideoMediaChannel::Error media_error_; |
1081 | 1081 |
1082 // Used by test cases where 2 streams are run on the same channel. | 1082 // Used by test cases where 2 streams are run on the same channel. |
1083 cricket::FakeVideoRenderer renderer2_; | 1083 cricket::FakeVideoRenderer renderer2_; |
1084 }; | 1084 }; |
1085 | 1085 |
1086 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT | 1086 #endif // WEBRTC_MEDIA_BASE_VIDEOENGINE_UNITTEST_H_ NOLINT |
OLD | NEW |