Index: webrtc/call/call.h |
diff --git a/webrtc/call/call.h b/webrtc/call/call.h |
index f67b6907e5f7a1c3465b984dc23de768f6130631..481f7086fd7fc93138dbb20361bb05a774414f47 100644 |
--- a/webrtc/call/call.h |
+++ b/webrtc/call/call.h |
@@ -14,6 +14,7 @@ |
#include <string> |
#include <vector> |
+#include "webrtc/api/rtcerror.h" |
#include "webrtc/base/networkroute.h" |
#include "webrtc/base/platform_file.h" |
#include "webrtc/base/socket.h" |
@@ -75,6 +76,16 @@ class Call { |
int max_bitrate_bps = -1; |
} bitrate_config; |
+ // TODO(zstein): The implementaiton doesn't treat BitrateConfigMask as a |
+ // mask anymore. Come up with a better name. |
+ |
+ // Assumes that 0 <= min <= start <= max holds for set parameters. |
+ struct BitrateConfigMask { |
+ rtc::Optional<int> min_bitrate_bps; |
+ rtc::Optional<int> start_bitrate_bps; |
+ rtc::Optional<int> max_bitrate_bps; |
+ }; |
+ |
// AudioState which is possibly shared between multiple calls. |
// TODO(solenberg): Change this to a shared_ptr once we can use C++11. |
rtc::scoped_refptr<AudioState> audio_state; |
@@ -141,14 +152,21 @@ class Call { |
// pacing delay, etc. |
virtual Stats GetStats() const = 0; |
- // TODO(pbos): Like BitrateConfig above this is currently per-stream instead |
- // of maximum for entire Call. This should be fixed along with the above. |
- // Specifying a start bitrate (>0) will currently reset the current bitrate |
- // estimate. This is due to how the 'x-google-start-bitrate' flag is currently |
+ // The greater min and smaller max set by this and SetBitrateConfigMask will |
+ // be used. The latest non-negative start value from either call will be used. |
+ // Specifying a start bitrate (>0) will reset the current bitrate estimate. |
+ // This is due to how the 'x-google-start-bitrate' flag is currently |
// implemented. |
virtual void SetBitrateConfig( |
const Config::BitrateConfig& bitrate_config) = 0; |
+ // The greater min and smaller max set by this and SetBitrateConfig will be |
+ // used. The latest non-negative start value form either call will be used. |
+ // Specifying a start bitrate will reset the current bitrate estimate. |
+ // Assumes 0 <= min <= start <= max holds for set parameters. |
+ virtual void SetBitrateConfigMask( |
+ const Config::BitrateConfigMask& bitrate_mask) = 0; |
+ |
// TODO(skvlad): When the unbundled case with multiple streams for the same |
// media type going over different networks is supported, track the state |
// for each stream separately. Right now it's global per media type. |