From b3f1487cbe7f8a1466d659e23171ade3b8f6ab64 Mon Sep 17 00:00:00 2001 From: Artem Titov Date: Mon, 9 Sep 2019 13:48:21 +0200 Subject: [PATCH] Add ability to provide TEXT hint only when requested in PC framework MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:10138 Change-Id: I1e4d14d7dd02091c656643a77d2d858d5dd606ad Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151913 Reviewed-by: Patrik Höglund Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Artem Titov Cr-Commit-Position: refs/heads/master@{#29123} --- api/test/peerconnection_quality_test_fixture.h | 3 +++ test/pc/e2e/peer_connection_quality_test.cc | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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 =