Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1182)

Unified Diff: webrtc/media/base/mediachannel.h

Issue 1711763003: New flag is_screencast in VideoOptions. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: In WebRtcVideoSendStream::SetOptions, modify only options specified by the caller. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/media/base/mediachannel.h
diff --git a/webrtc/media/base/mediachannel.h b/webrtc/media/base/mediachannel.h
index 8f15878ecd80efcff2fe1c4a438bf8f30a52003e..3830abf916c938eab80231285b443361897218fc 100644
--- a/webrtc/media/base/mediachannel.h
+++ b/webrtc/media/base/mediachannel.h
@@ -254,12 +254,14 @@ struct VideoOptions {
SetFrom(&video_noise_reduction, change.video_noise_reduction);
SetFrom(&suspend_below_min_bitrate, change.suspend_below_min_bitrate);
SetFrom(&screencast_min_bitrate_kbps, change.screencast_min_bitrate_kbps);
+ SetFrom(&is_screencast, change.is_screencast);
}
bool operator==(const VideoOptions& o) const {
return video_noise_reduction == o.video_noise_reduction &&
suspend_below_min_bitrate == o.suspend_below_min_bitrate &&
- screencast_min_bitrate_kbps == o.screencast_min_bitrate_kbps;
+ screencast_min_bitrate_kbps == o.screencast_min_bitrate_kbps &&
+ is_screencast == o.is_screencast;
}
std::string ToString() const {
@@ -270,6 +272,7 @@ struct VideoOptions {
suspend_below_min_bitrate);
ost << ToStringIfSet("screencast min bitrate kbps",
screencast_min_bitrate_kbps);
+ ost << ToStringIfSet("is_screencast ", is_screencast);
ost << "}";
return ost.str();
}
@@ -288,6 +291,11 @@ struct VideoOptions {
// the PeerConnection constraint 'googScreencastMinBitrate'. It is
// copied to the encoder config by WebRtcVideoChannel2.
rtc::Optional<int> screencast_min_bitrate_kbps;
+ // Set by screencast sources. Implies selection of encoding settings
+ // suitable for screencast. Most likely not the right way to do
+ // things, e.g., screencast of a text document and screencast of a
+ // youtube video have different needs.
+ rtc::Optional<bool> is_screencast;
private:
template <typename T>

Powered by Google App Engine
This is Rietveld 408576698