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

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: Move GenerateCname() to PeerConnect 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..6e8ec78df1e043a693ef8054229409a5440c96c7 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[] = "DefaultCnameVal";
Taylor Brandstetter 2016/04/13 23:03:06 nit: Can just be "DefaultCname"
+
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) {}
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
Taylor Brandstetter 2016/04/13 23:03:06 nit: Capitalize "The" and add period to end of com
+ std::string cname;
struct Stream {
Stream(MediaType type,

Powered by Google App Engine
This is Rietveld 408576698