Index: webrtc/video/video_decoder_unittest.cc |
diff --git a/webrtc/video/video_decoder_unittest.cc b/webrtc/video/video_decoder_unittest.cc |
index 422aca0a2cc22a685685263c5248c621718db945..4d54a3e53f46f1cd1dc163eb200f03aabebeae5e 100644 |
--- a/webrtc/video/video_decoder_unittest.cc |
+++ b/webrtc/video/video_decoder_unittest.cc |
@@ -53,6 +53,11 @@ class VideoDecoderSoftwareFallbackWrapperTest : public ::testing::Test { |
++reset_count_; |
return WEBRTC_VIDEO_CODEC_OK; |
} |
+ |
+ const char* ImplementationName() const override { |
+ return "fake-decoder"; |
+ } |
+ |
int init_decode_count_ = 0; |
int decode_count_ = 0; |
int32_t decode_return_code_ = WEBRTC_VIDEO_CODEC_OK; |
@@ -144,7 +149,7 @@ TEST_F(VideoDecoderSoftwareFallbackWrapperTest, ForwardsResetCall) { |
} |
// TODO(pbos): Fake a VP8 frame well enough to actually receive a callback from |
-// the software encoder. |
+// the software decoder. |
TEST_F(VideoDecoderSoftwareFallbackWrapperTest, |
ForwardsRegisterDecodeCompleteCallback) { |
class FakeDecodedImageCallback : public DecodedImageCallback { |
@@ -168,4 +173,19 @@ TEST_F(VideoDecoderSoftwareFallbackWrapperTest, |
EXPECT_EQ(&callback2, fake_decoder_.decode_complete_callback_); |
} |
+TEST_F(VideoDecoderSoftwareFallbackWrapperTest, |
+ ReportsFallbackImplementationName) { |
+ VideoCodec codec = {}; |
+ fallback_wrapper_.InitDecode(&codec, 2); |
+ |
+ fake_decoder_.decode_return_code_ = WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE; |
+ EncodedImage encoded_image; |
+ fallback_wrapper_.Decode(encoded_image, false, nullptr, nullptr, -1); |
+ // Hard coded expected value since libvpx is the software implementation name |
+ // for VP8. Change accordingly if the underlying implementation does. |
+ EXPECT_STREQ("libvpx (fallback from: fake-decoder)", |
+ fallback_wrapper_.ImplementationName()); |
+ fallback_wrapper_.Release(); |
+} |
+ |
} // namespace webrtc |