diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h index 91a1a2a162..fa63ca01e1 100644 --- a/api/test/peerconnection_quality_test_fixture.h +++ b/api/test/peerconnection_quality_test_fixture.h @@ -110,6 +110,9 @@ class PeerConnectionE2EQualityTestFixture { // must be equal to |kDefaultSlidesWidth| and // |ScrollingParams::source_height| must be equal to |kDefaultSlidesHeight|. std::vector slides_yuv_file_names; + // If true will set VideoTrackInterface::ContentHint::kText for current + // video track. + bool use_text_content_hint = true; }; enum VideoGeneratorType { kDefault, kI420A, kI010 }; diff --git a/test/pc/e2e/peer_connection_quality_test.cc b/test/pc/e2e/peer_connection_quality_test.cc index 47f2b43425..cf1f095b4b 100644 --- a/test/pc/e2e/peer_connection_quality_test.cc +++ b/test/pc/e2e/peer_connection_quality_test.cc @@ -691,14 +691,16 @@ PeerConnectionE2EQualityTest::MaybeAddVideo(TestPeer* peer) { rtc::scoped_refptr source = new rtc::RefCountedObject( std::move(capturer), - /*is_screencast=*/video_config.screen_share_config.has_value()); + /*is_screencast=*/video_config.screen_share_config && + video_config.screen_share_config->use_text_content_hint); out.push_back(source); RTC_LOG(INFO) << "Adding video with video_config.stream_label=" << video_config.stream_label.value(); rtc::scoped_refptr track = peer->pc_factory()->CreateVideoTrack(video_config.stream_label.value(), source); - if (video_config.screen_share_config) { + if (video_config.screen_share_config && + video_config.screen_share_config->use_text_content_hint) { track->set_content_hint(VideoTrackInterface::ContentHint::kText); } RTCErrorOr> sender =