Add ability to provide TEXT hint only when requested in PC framework
Bug: webrtc:10138
Change-Id: I1e4d14d7dd02091c656643a77d2d858d5dd606ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151913
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29123}
diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h
index 91a1a2a..fa63ca0 100644
--- a/api/test/peerconnection_quality_test_fixture.h
+++ b/api/test/peerconnection_quality_test_fixture.h
@@ -110,6 +110,9 @@
// must be equal to |kDefaultSlidesWidth| and
// |ScrollingParams::source_height| must be equal to |kDefaultSlidesHeight|.
std::vector<std::string> 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 47f2b43..cf1f095 100644
--- a/test/pc/e2e/peer_connection_quality_test.cc
+++ b/test/pc/e2e/peer_connection_quality_test.cc
@@ -691,14 +691,16 @@
rtc::scoped_refptr<FrameGeneratorCapturerVideoTrackSource> source =
new rtc::RefCountedObject<FrameGeneratorCapturerVideoTrackSource>(
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<VideoTrackInterface> 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<rtc::scoped_refptr<RtpSenderInterface>> sender =