OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 10 matching lines...) Expand all Loading... |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 | 23 |
24 const int kWidth = 320; | 24 const int kWidth = 320; |
25 const int kHeight = 240; | 25 const int kHeight = 240; |
26 const size_t kMaxPayloadSize = 800; | 26 const size_t kMaxPayloadSize = 800; |
27 | 27 |
28 class VideoEncoderSoftwareFallbackWrapperTest : public ::testing::Test { | 28 class VideoEncoderSoftwareFallbackWrapperTest : public ::testing::Test { |
29 protected: | 29 protected: |
30 VideoEncoderSoftwareFallbackWrapperTest() | 30 VideoEncoderSoftwareFallbackWrapperTest() |
31 : fallback_wrapper_(cricket::VideoCodec("VP8"), &fake_encoder_) {} | 31 : fallback_wrapper_(kVideoCodecVP8, &fake_encoder_) {} |
32 | 32 |
33 class CountingFakeEncoder : public VideoEncoder { | 33 class CountingFakeEncoder : public VideoEncoder { |
34 public: | 34 public: |
35 int32_t InitEncode(const VideoCodec* codec_settings, | 35 int32_t InitEncode(const VideoCodec* codec_settings, |
36 int32_t number_of_cores, | 36 int32_t number_of_cores, |
37 size_t max_payload_size) override { | 37 size_t max_payload_size) override { |
38 ++init_encode_count_; | 38 ++init_encode_count_; |
39 return init_encode_return_code_; | 39 return init_encode_return_code_; |
40 } | 40 } |
41 int32_t Encode(const VideoFrame& frame, | 41 int32_t Encode(const VideoFrame& frame, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 TEST_F(VideoEncoderSoftwareFallbackWrapperTest, | 309 TEST_F(VideoEncoderSoftwareFallbackWrapperTest, |
310 ReportsFallbackImplementationName) { | 310 ReportsFallbackImplementationName) { |
311 UtilizeFallbackEncoder(); | 311 UtilizeFallbackEncoder(); |
312 // Hard coded expected value since libvpx is the software implementation name | 312 // Hard coded expected value since libvpx is the software implementation name |
313 // for VP8. Change accordingly if the underlying implementation does. | 313 // for VP8. Change accordingly if the underlying implementation does. |
314 CheckLastEncoderName("libvpx"); | 314 CheckLastEncoderName("libvpx"); |
315 } | 315 } |
316 | 316 |
317 } // namespace webrtc | 317 } // namespace webrtc |
OLD | NEW |