Add support for content-hint value "text"
This involves treating it just like "detailed", for now. At a later stage we might want to modify codec parameters for it. Bug: chromium:852701 Change-Id: I24678e1f7711bf03ca22273afaaf338e9e3ba1fe Reviewed-on: https://webrtc-review.googlesource.com/83582 Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Peter Boström <pbos@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23701}
This commit is contained in:

committed by
Commit Bot

parent
0a1d189e50
commit
c19ab07134
@ -155,8 +155,8 @@ class VideoTrackInterface : public MediaStreamTrackInterface,
|
||||
public:
|
||||
// Video track content hint, used to override the source is_screencast
|
||||
// property.
|
||||
// See https://crbug.com/653531 and https://github.com/WICG/mst-content-hint.
|
||||
enum class ContentHint { kNone, kFluid, kDetailed };
|
||||
// See https://crbug.com/653531 and https://w3c.github.io/mst-content-hint.
|
||||
enum class ContentHint { kNone, kFluid, kDetailed, kText };
|
||||
|
||||
// Register a video sink for this track. Used to connect the track to the
|
||||
// underlying video engine.
|
||||
|
@ -549,6 +549,7 @@ void VideoRtpSender::SetVideoSend() {
|
||||
options.is_screencast = false;
|
||||
break;
|
||||
case VideoTrackInterface::ContentHint::kDetailed:
|
||||
case VideoTrackInterface::ContentHint::kText:
|
||||
options.is_screencast = true;
|
||||
break;
|
||||
}
|
||||
|
@ -1084,6 +1084,9 @@ TEST_F(RtpSenderReceiverTest, PropagatesVideoTrackContentHint) {
|
||||
// Setting fluid should remain in non-screencast mode (its default).
|
||||
video_track_->set_content_hint(VideoTrackInterface::ContentHint::kFluid);
|
||||
EXPECT_EQ(false, video_media_channel_->options().is_screencast);
|
||||
// Setting text should have the same effect as Detailed
|
||||
video_track_->set_content_hint(VideoTrackInterface::ContentHint::kText);
|
||||
EXPECT_EQ(true, video_media_channel_->options().is_screencast);
|
||||
|
||||
DestroyVideoRtpSender();
|
||||
}
|
||||
@ -1110,6 +1113,9 @@ TEST_F(RtpSenderReceiverTest,
|
||||
// Setting detailed should still remain in screencast mode (its default).
|
||||
video_track_->set_content_hint(VideoTrackInterface::ContentHint::kDetailed);
|
||||
EXPECT_EQ(true, video_media_channel_->options().is_screencast);
|
||||
// Setting text should have the same effect as Detailed
|
||||
video_track_->set_content_hint(VideoTrackInterface::ContentHint::kText);
|
||||
EXPECT_EQ(true, video_media_channel_->options().is_screencast);
|
||||
|
||||
DestroyVideoRtpSender();
|
||||
}
|
||||
|
Reference in New Issue
Block a user