| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // the software decoder. | 134 // the software decoder. |
| 135 TEST_F(VideoDecoderSoftwareFallbackWrapperTest, | 135 TEST_F(VideoDecoderSoftwareFallbackWrapperTest, |
| 136 ForwardsRegisterDecodeCompleteCallback) { | 136 ForwardsRegisterDecodeCompleteCallback) { |
| 137 class FakeDecodedImageCallback : public DecodedImageCallback { | 137 class FakeDecodedImageCallback : public DecodedImageCallback { |
| 138 int32_t Decoded(VideoFrame& decodedImage) override { return 0; } | 138 int32_t Decoded(VideoFrame& decodedImage) override { return 0; } |
| 139 int32_t Decoded( | 139 int32_t Decoded( |
| 140 webrtc::VideoFrame& decodedImage, int64_t decode_time_ms) override { | 140 webrtc::VideoFrame& decodedImage, int64_t decode_time_ms) override { |
| 141 RTC_NOTREACHED(); | 141 RTC_NOTREACHED(); |
| 142 return -1; | 142 return -1; |
| 143 } | 143 } |
| 144 void Decoded(webrtc::VideoFrame& decodedImage, |
| 145 rtc::Optional<int32_t> decode_time_ms, |
| 146 rtc::Optional<uint8_t> qp) override { |
| 147 RTC_NOTREACHED(); |
| 148 } |
| 144 } callback, callback2; | 149 } callback, callback2; |
| 145 | 150 |
| 146 VideoCodec codec = {}; | 151 VideoCodec codec = {}; |
| 147 fallback_wrapper_.InitDecode(&codec, 2); | 152 fallback_wrapper_.InitDecode(&codec, 2); |
| 148 fallback_wrapper_.RegisterDecodeCompleteCallback(&callback); | 153 fallback_wrapper_.RegisterDecodeCompleteCallback(&callback); |
| 149 EXPECT_EQ(&callback, fake_decoder_.decode_complete_callback_); | 154 EXPECT_EQ(&callback, fake_decoder_.decode_complete_callback_); |
| 150 | 155 |
| 151 fake_decoder_.decode_return_code_ = WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; | 156 fake_decoder_.decode_return_code_ = WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; |
| 152 EncodedImage encoded_image; | 157 EncodedImage encoded_image; |
| 153 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); | 158 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 164 EncodedImage encoded_image; | 169 EncodedImage encoded_image; |
| 165 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); | 170 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); |
| 166 // Hard coded expected value since libvpx is the software implementation name | 171 // Hard coded expected value since libvpx is the software implementation name |
| 167 // for VP8. Change accordingly if the underlying implementation does. | 172 // for VP8. Change accordingly if the underlying implementation does. |
| 168 EXPECT_STREQ("libvpx (fallback from: fake-decoder)", | 173 EXPECT_STREQ("libvpx (fallback from: fake-decoder)", |
| 169 fallback_wrapper_.ImplementationName()); | 174 fallback_wrapper_.ImplementationName()); |
| 170 fallback_wrapper_.Release(); | 175 fallback_wrapper_.Release(); |
| 171 } | 176 } |
| 172 | 177 |
| 173 } // namespace webrtc | 178 } // namespace webrtc |
| OLD | NEW |