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

Unified Diff: remoting/protocol/session_config.cc

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: remoting/protocol/session_config.cc
diff --git a/remoting/protocol/session_config.cc b/remoting/protocol/session_config.cc
index 460da2807bfa7bd13b1cbdbca1eac2b837b08e66..d85990db382c8abd4014e9e139cdb526bdcb03d9 100644
--- a/remoting/protocol/session_config.cc
+++ b/remoting/protocol/session_config.cc
@@ -9,8 +9,11 @@
namespace remoting {
namespace protocol {
-const int kDefaultStreamVersion = 2;
+const int kEventStreamVersion = 2;
+const int kAudioStreamVersion = 2;
const int kControlStreamVersion = 3;
+const int kVideoStreamVersion = 3;
+const int kVideoStreamVersionNoAck = 2;
ChannelConfig ChannelConfig::None() {
return ChannelConfig();
@@ -45,13 +48,13 @@ SessionConfig SessionConfig::ForTest() {
kControlStreamVersion,
ChannelConfig::CODEC_UNDEFINED));
result.set_event_config(ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM,
- kDefaultStreamVersion,
+ kEventStreamVersion,
ChannelConfig::CODEC_UNDEFINED));
result.set_video_config(ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
- kDefaultStreamVersion,
+ kVideoStreamVersion,
ChannelConfig::CODEC_VP8));
result.set_audio_config(ChannelConfig(ChannelConfig::TRANSPORT_NONE,
- kDefaultStreamVersion,
+ kAudioStreamVersion,
ChannelConfig::CODEC_UNDEFINED));
return result;
}
@@ -177,19 +180,21 @@ scoped_ptr<CandidateSessionConfig> CandidateSessionConfig::CreateDefault() {
// Event channel.
result->mutable_event_configs()->push_back(
ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM,
- kDefaultStreamVersion,
+ kEventStreamVersion,
ChannelConfig::CODEC_UNDEFINED));
// Video channel.
result->mutable_video_configs()->push_back(
- ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
- kDefaultStreamVersion,
+ ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kVideoStreamVersion,
+ ChannelConfig::CODEC_VP8));
+ result->mutable_video_configs()->push_back(
+ ChannelConfig(ChannelConfig::TRANSPORT_STREAM, kVideoStreamVersionNoAck,
ChannelConfig::CODEC_VP8));
// Audio channel.
result->mutable_audio_configs()->push_back(
ChannelConfig(ChannelConfig::TRANSPORT_MUX_STREAM,
- kDefaultStreamVersion,
+ kAudioStreamVersion,
ChannelConfig::CODEC_OPUS));
result->mutable_audio_configs()->push_back(ChannelConfig::None());
@@ -202,10 +207,10 @@ void CandidateSessionConfig::DisableAudioChannel() {
}
void CandidateSessionConfig::EnableVideoCodec(ChannelConfig::Codec codec) {
- mutable_video_configs()->push_front(
- ChannelConfig(ChannelConfig::TRANSPORT_STREAM,
- kDefaultStreamVersion,
- codec));
+ mutable_video_configs()->push_front(ChannelConfig(
+ ChannelConfig::TRANSPORT_STREAM, kVideoStreamVersion, codec));
+ mutable_video_configs()->push_front(ChannelConfig(
+ ChannelConfig::TRANSPORT_STREAM, kVideoStreamVersionNoAck, codec));
}
} // namespace protocol

Powered by Google App Engine
This is Rietveld 408576698