Changed FakeVp8Encoder to write dimensions in payload.
Add FakeVp8Decoder that parse width and height from the payload.
Add unit test for testing that width and height is set when decoding frames.
Bug: none
Change-Id: Ifbfff4f62f99625309ce0ef21cf89c76448769d8
Reviewed-on: https://webrtc-review.googlesource.com/c/103140
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25038}
diff --git a/test/fake_vp8_encoder_unittest.cc b/test/fake_vp8_encoder_unittest.cc
index c79ba0c..d881edc 100644
--- a/test/fake_vp8_encoder_unittest.cc
+++ b/test/fake_vp8_encoder_unittest.cc
@@ -15,7 +15,7 @@
#include "api/test/create_simulcast_test_fixture.h"
#include "api/test/simulcast_test_fixture.h"
#include "modules/video_coding/utility/simulcast_test_fixture_impl.h"
-#include "test/fake_decoder.h"
+#include "test/fake_vp8_decoder.h"
#include "test/fake_vp8_encoder.h"
#include "test/function_video_decoder_factory.h"
#include "test/function_video_encoder_factory.h"
@@ -32,7 +32,7 @@
});
std::unique_ptr<VideoDecoderFactory> decoder_factory =
absl::make_unique<FunctionVideoDecoderFactory>(
- []() { return absl::make_unique<FakeDecoder>(); });
+ []() { return absl::make_unique<FakeVp8Decoder>(); });
return CreateSimulcastTestFixture(std::move(encoder_factory),
std::move(decoder_factory),
SdpVideoFormat("VP8"));
@@ -99,5 +99,10 @@
fixture->TestSpatioTemporalLayers333PatternEncoder();
}
+TEST(TestFakeVp8Codec, TestDecodeWidthHeightSet) {
+ auto fixture = CreateSpecificSimulcastTestFixture();
+ fixture->TestDecodeWidthHeightSet();
+}
+
} // namespace test
} // namespace webrtc