| Index: webrtc/pc/mediasession.h
|
| diff --git a/webrtc/pc/mediasession.h b/webrtc/pc/mediasession.h
|
| index ae221554e20b596a569db934fdb285b37183614d..3c34bf2a4c4bb3ea50be900464678b4bdd974baf 100644
|
| --- a/webrtc/pc/mediasession.h
|
| +++ b/webrtc/pc/mediasession.h
|
| @@ -73,21 +73,19 @@ extern const char kMediaProtocolUdpDtlsSctp[];
|
| extern const char kMediaProtocolTcpDtlsSctp[];
|
|
|
| // Options to control how session descriptions are generated.
|
| -const int kAutoBandwidth = -1;
|
| const int kBufferedModeDisabled = 0;
|
|
|
| struct MediaSessionOptions {
|
| - MediaSessionOptions() :
|
| - recv_audio(true),
|
| - recv_video(false),
|
| - data_channel_type(DCT_NONE),
|
| - is_muc(false),
|
| - vad_enabled(true), // When disabled, removes all CN codecs from SDP.
|
| - rtcp_mux_enabled(true),
|
| - bundle_enabled(false),
|
| - video_bandwidth(kAutoBandwidth),
|
| - data_bandwidth(kDataMaxBandwidth) {
|
| - }
|
| + MediaSessionOptions()
|
| + : recv_audio(true),
|
| + recv_video(false),
|
| + data_channel_type(DCT_NONE),
|
| + is_muc(false),
|
| + vad_enabled(true), // When disabled, removes all CN codecs from SDP.
|
| + rtcp_mux_enabled(true),
|
| + bundle_enabled(false),
|
| + video_bandwidth(rtc::Optional<int>()),
|
| + data_bandwidth(rtc::Optional<int>(kDataMaxBandwidth)) {}
|
|
|
| bool has_audio() const {
|
| return recv_audio || HasSendMediaStream(MEDIA_TYPE_AUDIO);
|
| @@ -128,9 +126,9 @@ struct MediaSessionOptions {
|
| bool vad_enabled;
|
| bool rtcp_mux_enabled;
|
| bool bundle_enabled;
|
| - // bps. -1 == auto.
|
| - int video_bandwidth;
|
| - int data_bandwidth;
|
| + // bps. not set == auto.
|
| + rtc::Optional<int> video_bandwidth;
|
| + rtc::Optional<int> data_bandwidth;
|
| // content name ("mid") => options.
|
| std::map<std::string, TransportOptions> transport_options;
|
|
|
| @@ -178,8 +176,8 @@ class MediaContentDescription : public ContentDescription {
|
| rtcp_reduced_size_ = reduced_size;
|
| }
|
|
|
| - int bandwidth() const { return bandwidth_; }
|
| - void set_bandwidth(int bandwidth) { bandwidth_ = bandwidth; }
|
| + rtc::Optional<int> bandwidth() const { return bandwidth_; }
|
| + void set_bandwidth(rtc::Optional<int> bandwidth) { bandwidth_ = bandwidth; }
|
|
|
| const std::vector<CryptoParams>& cryptos() const { return cryptos_; }
|
| void AddCrypto(const CryptoParams& params) {
|
| @@ -276,7 +274,7 @@ class MediaContentDescription : public ContentDescription {
|
| protected:
|
| bool rtcp_mux_ = false;
|
| bool rtcp_reduced_size_ = false;
|
| - int bandwidth_ = kAutoBandwidth;
|
| + rtc::Optional<int> bandwidth_ = rtc::Optional<int>();
|
| std::string protocol_;
|
| std::vector<CryptoParams> cryptos_;
|
| CryptoType crypto_required_ = CT_NONE;
|
|
|