OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 extern const char kMediaProtocolSctp[]; | 70 extern const char kMediaProtocolSctp[]; |
71 extern const char kMediaProtocolDtlsSctp[]; | 71 extern const char kMediaProtocolDtlsSctp[]; |
72 extern const char kMediaProtocolUdpDtlsSctp[]; | 72 extern const char kMediaProtocolUdpDtlsSctp[]; |
73 extern const char kMediaProtocolTcpDtlsSctp[]; | 73 extern const char kMediaProtocolTcpDtlsSctp[]; |
74 | 74 |
75 // Options to control how session descriptions are generated. | 75 // Options to control how session descriptions are generated. |
76 const int kAutoBandwidth = -1; | 76 const int kAutoBandwidth = -1; |
77 const int kBufferedModeDisabled = 0; | 77 const int kBufferedModeDisabled = 0; |
78 | 78 |
| 79 // Default RTCP CNAME for unit tests. |
| 80 const char kDefaultRtcpCname[] = "DefaultRtcpCname"; |
| 81 |
79 struct MediaSessionOptions { | 82 struct MediaSessionOptions { |
80 MediaSessionOptions() : | 83 MediaSessionOptions() |
81 recv_audio(true), | 84 : recv_audio(true), |
82 recv_video(false), | 85 recv_video(false), |
83 data_channel_type(DCT_NONE), | 86 data_channel_type(DCT_NONE), |
84 is_muc(false), | 87 is_muc(false), |
85 vad_enabled(true), // When disabled, removes all CN codecs from SDP. | 88 vad_enabled(true), // When disabled, removes all CN codecs from SDP. |
86 rtcp_mux_enabled(true), | 89 rtcp_mux_enabled(true), |
87 bundle_enabled(false), | 90 bundle_enabled(false), |
88 video_bandwidth(kAutoBandwidth), | 91 video_bandwidth(kAutoBandwidth), |
89 data_bandwidth(kDataMaxBandwidth) { | 92 data_bandwidth(kDataMaxBandwidth), |
90 } | 93 rtcp_cname(kDefaultRtcpCname) {} |
91 | 94 |
92 bool has_audio() const { | 95 bool has_audio() const { |
93 return recv_audio || HasSendMediaStream(MEDIA_TYPE_AUDIO); | 96 return recv_audio || HasSendMediaStream(MEDIA_TYPE_AUDIO); |
94 } | 97 } |
95 bool has_video() const { | 98 bool has_video() const { |
96 return recv_video || HasSendMediaStream(MEDIA_TYPE_VIDEO); | 99 return recv_video || HasSendMediaStream(MEDIA_TYPE_VIDEO); |
97 } | 100 } |
98 bool has_data() const { return data_channel_type != DCT_NONE; } | 101 bool has_data() const { return data_channel_type != DCT_NONE; } |
99 | 102 |
100 // Add a stream with MediaType type and id. | 103 // Add a stream with MediaType type and id. |
(...skipping 25 matching lines...) Expand all Loading... |
126 DataChannelType data_channel_type; | 129 DataChannelType data_channel_type; |
127 bool is_muc; | 130 bool is_muc; |
128 bool vad_enabled; | 131 bool vad_enabled; |
129 bool rtcp_mux_enabled; | 132 bool rtcp_mux_enabled; |
130 bool bundle_enabled; | 133 bool bundle_enabled; |
131 // bps. -1 == auto. | 134 // bps. -1 == auto. |
132 int video_bandwidth; | 135 int video_bandwidth; |
133 int data_bandwidth; | 136 int data_bandwidth; |
134 // content name ("mid") => options. | 137 // content name ("mid") => options. |
135 std::map<std::string, TransportOptions> transport_options; | 138 std::map<std::string, TransportOptions> transport_options; |
| 139 std::string rtcp_cname; |
136 | 140 |
137 struct Stream { | 141 struct Stream { |
138 Stream(MediaType type, | 142 Stream(MediaType type, |
139 const std::string& id, | 143 const std::string& id, |
140 const std::string& sync_label, | 144 const std::string& sync_label, |
141 int num_sim_layers) | 145 int num_sim_layers) |
142 : type(type), id(id), sync_label(sync_label), | 146 : type(type), id(id), sync_label(sync_label), |
143 num_sim_layers(num_sim_layers) { | 147 num_sim_layers(num_sim_layers) { |
144 } | 148 } |
145 MediaType type; | 149 MediaType type; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 void GetSupportedVideoCryptoSuiteNames( | 542 void GetSupportedVideoCryptoSuiteNames( |
539 std::vector<std::string>* crypto_suite_names); | 543 std::vector<std::string>* crypto_suite_names); |
540 void GetSupportedDataCryptoSuiteNames( | 544 void GetSupportedDataCryptoSuiteNames( |
541 std::vector<std::string>* crypto_suite_names); | 545 std::vector<std::string>* crypto_suite_names); |
542 void GetDefaultSrtpCryptoSuiteNames( | 546 void GetDefaultSrtpCryptoSuiteNames( |
543 std::vector<std::string>* crypto_suite_names); | 547 std::vector<std::string>* crypto_suite_names); |
544 | 548 |
545 } // namespace cricket | 549 } // namespace cricket |
546 | 550 |
547 #endif // WEBRTC_PC_MEDIASESSION_H_ | 551 #endif // WEBRTC_PC_MEDIASESSION_H_ |
OLD | NEW |