Fix VideoStreamEncoder QP tests to not use SetHasInternalSource

The has_internal_source feature is deprecated, and unrelated to the
tests of QP parsing.

Bug: webtc:12875
Change-Id: Ib43063ebf49e6e0bd7a5328a04ba2816f3a7ecb2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/222400
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34280}
This commit is contained in:
Niels Möller 2021-06-14 12:04:57 +02:00 committed by WebRTC LUCI CQ
parent b237a87a25
commit 8b6929081e

View File

@ -8095,10 +8095,13 @@ TEST_F(VideoStreamEncoderTest, EncoderResolutionsExposedInSimulcast) {
}
TEST_F(VideoStreamEncoderTest, QpPresent_QpKept) {
// Enable encoder source to force encoder reconfig.
encoder_factory_.SetHasInternalSource(true);
ResetEncoder("VP8", 1, 1, 1, false);
// Force encoder reconfig.
video_source_.IncomingCapturedFrame(
CreateFrame(1, codec_width_, codec_height_));
video_stream_encoder_->WaitUntilTaskQueueIsIdle();
// Set QP on encoded frame and pass the frame to encode complete callback.
// Since QP is present QP parsing won't be triggered and the original value
// should be kept.
@ -8115,10 +8118,13 @@ TEST_F(VideoStreamEncoderTest, QpPresent_QpKept) {
}
TEST_F(VideoStreamEncoderTest, QpAbsent_QpParsed) {
// Enable encoder source to force encoder reconfig.
encoder_factory_.SetHasInternalSource(true);
ResetEncoder("VP8", 1, 1, 1, false);
// Force encoder reconfig.
video_source_.IncomingCapturedFrame(
CreateFrame(1, codec_width_, codec_height_));
video_stream_encoder_->WaitUntilTaskQueueIsIdle();
// Pass an encoded frame without QP to encode complete callback. QP should be
// parsed and set.
EncodedImage encoded_image;
@ -8137,10 +8143,13 @@ TEST_F(VideoStreamEncoderTest, QpAbsentParsingDisabled_QpAbsent) {
webrtc::test::ScopedFieldTrials field_trials(
"WebRTC-QpParsingKillSwitch/Enabled/");
// Enable encoder source to force encoder reconfig.
encoder_factory_.SetHasInternalSource(true);
ResetEncoder("VP8", 1, 1, 1, false);
// Force encoder reconfig.
video_source_.IncomingCapturedFrame(
CreateFrame(1, codec_width_, codec_height_));
video_stream_encoder_->WaitUntilTaskQueueIsIdle();
EncodedImage encoded_image;
encoded_image.qp_ = -1;
encoded_image.SetEncodedData(EncodedImageBuffer::Create(