Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: webrtc/media/engine/videodecodersoftwarefallbackwrapper_unittest.cc

Issue 2649133005: Add QP sum stats for received streams. (Closed)
Patch Set: Fix error. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 int32_t Decoded(webrtc::VideoFrame& decodedImage,
145 rtc::Optional<int32_t> decode_time_ms,
146 rtc::Optional<uint8_t> qp) override {
147 RTC_NOTREACHED();
148 return -1;
149 }
144 } callback, callback2; 150 } callback, callback2;
145 151
146 VideoCodec codec = {}; 152 VideoCodec codec = {};
147 fallback_wrapper_.InitDecode(&codec, 2); 153 fallback_wrapper_.InitDecode(&codec, 2);
148 fallback_wrapper_.RegisterDecodeCompleteCallback(&callback); 154 fallback_wrapper_.RegisterDecodeCompleteCallback(&callback);
149 EXPECT_EQ(&callback, fake_decoder_.decode_complete_callback_); 155 EXPECT_EQ(&callback, fake_decoder_.decode_complete_callback_);
150 156
151 fake_decoder_.decode_return_code_ = WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; 157 fake_decoder_.decode_return_code_ = WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE;
152 EncodedImage encoded_image; 158 EncodedImage encoded_image;
153 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); 159 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1);
(...skipping 10 matching lines...) Expand all
164 EncodedImage encoded_image; 170 EncodedImage encoded_image;
165 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); 171 fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1);
166 // Hard coded expected value since libvpx is the software implementation name 172 // Hard coded expected value since libvpx is the software implementation name
167 // for VP8. Change accordingly if the underlying implementation does. 173 // for VP8. Change accordingly if the underlying implementation does.
168 EXPECT_STREQ("libvpx (fallback from: fake-decoder)", 174 EXPECT_STREQ("libvpx (fallback from: fake-decoder)",
169 fallback_wrapper_.ImplementationName()); 175 fallback_wrapper_.ImplementationName());
170 fallback_wrapper_.Release(); 176 fallback_wrapper_.Release();
171 } 177 }
172 178
173 } // namespace webrtc 179 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698