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

Unified Diff: webrtc/pc/mediasession.h

Issue 1871993002: Only generate one CNAME per PeerConnection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add unit tests in peerconnectioninterface_unittest Created 4 years, 8 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/pc/mediasession.h
diff --git a/webrtc/pc/mediasession.h b/webrtc/pc/mediasession.h
index 98a1f070d687ec8457f3f22a8be70899d8ee5517..6bee87240f1a16e481c18e34ae1d577a51abbb3c 100644
--- a/webrtc/pc/mediasession.h
+++ b/webrtc/pc/mediasession.h
@@ -76,18 +76,21 @@ extern const char kMediaProtocolTcpDtlsSctp[];
const int kAutoBandwidth = -1;
const int kBufferedModeDisabled = 0;
+// Default CNAME for unit tests.
+const char kDefaultCname[] = "DefaultCname";
pthatcher1 2016/05/05 18:50:52 Again, RtcpCname and "RTCP CNAME"
Zhi Huang 2016/05/06 01:36:53 Done.
+
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(kAutoBandwidth),
+ data_bandwidth(kDataMaxBandwidth),
+ cname(kDefaultCname) {}
pthatcher1 2016/05/05 18:50:51 rtcp_cname
Zhi Huang 2016/05/06 01:36:53 Done.
bool has_audio() const {
return recv_audio || HasSendMediaStream(MEDIA_TYPE_AUDIO);
@@ -133,6 +136,8 @@ struct MediaSessionOptions {
int data_bandwidth;
// content name ("mid") => options.
std::map<std::string, TransportOptions> transport_options;
+ // The CNAME of the PeerConnection.
pthatcher1 2016/05/05 18:50:51 I think it would be better to just remove this com
Zhi Huang 2016/05/06 01:36:53 Done.
+ std::string cname;
struct Stream {
Stream(MediaType type,

Powered by Google App Engine
This is Rietveld 408576698