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

Side by Side Diff: webrtc/call/rtc_event_log.cc

Issue 1373903003: Unify newapi::RtcpMode and RTCPMethod. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: enum class Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 namespace { 105 namespace {
106 // The functions in this namespace convert enums from the runtime format 106 // The functions in this namespace convert enums from the runtime format
107 // that the rest of the WebRtc project can use, to the corresponding 107 // that the rest of the WebRtc project can use, to the corresponding
108 // serialized enum which is defined by the protobuf. 108 // serialized enum which is defined by the protobuf.
109 109
110 // Do not add default return values to the conversion functions in this 110 // Do not add default return values to the conversion functions in this
111 // unnamed namespace. The intention is to make the compiler warn if anyone 111 // unnamed namespace. The intention is to make the compiler warn if anyone
112 // adds unhandled new events/modes/etc. 112 // adds unhandled new events/modes/etc.
113 113
114 rtclog::VideoReceiveConfig_RtcpMode ConvertRtcpMode( 114 rtclog::VideoReceiveConfig_RtcpMode ConvertRtcpMode(
115 newapi::RtcpMode rtcp_mode) { 115 RtcpMode rtcp_mode) {
116 switch (rtcp_mode) { 116 switch (rtcp_mode) {
117 case newapi::kRtcpCompound: 117 case RtcpMode::COMPOUND:
118 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; 118 return rtclog::VideoReceiveConfig::RTCP_COMPOUND;
119 case newapi::kRtcpReducedSize: 119 case RtcpMode::REDUCED_SIZE:
120 return rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE; 120 return rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE;
121 case RtcpMode::OFF:
122 RTC_NOTREACHED();
123 return rtclog::VideoReceiveConfig::RTCP_COMPOUND;
121 } 124 }
122 RTC_NOTREACHED(); 125 RTC_NOTREACHED();
123 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; 126 return rtclog::VideoReceiveConfig::RTCP_COMPOUND;
124 } 127 }
125 128
126 rtclog::MediaType ConvertMediaType(MediaType media_type) { 129 rtclog::MediaType ConvertMediaType(MediaType media_type) {
127 switch (media_type) { 130 switch (media_type) {
128 case MediaType::ANY: 131 case MediaType::ANY:
129 return rtclog::MediaType::ANY; 132 return rtclog::MediaType::ANY;
130 case MediaType::AUDIO: 133 case MediaType::AUDIO:
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return result->ParseFromString(dump_buffer); 399 return result->ParseFromString(dump_buffer);
397 } 400 }
398 401
399 #endif // ENABLE_RTC_EVENT_LOG 402 #endif // ENABLE_RTC_EVENT_LOG
400 403
401 // RtcEventLog member functions. 404 // RtcEventLog member functions.
402 rtc::scoped_ptr<RtcEventLog> RtcEventLog::Create() { 405 rtc::scoped_ptr<RtcEventLog> RtcEventLog::Create() {
403 return rtc::scoped_ptr<RtcEventLog>(new RtcEventLogImpl()); 406 return rtc::scoped_ptr<RtcEventLog>(new RtcEventLogImpl());
404 } 407 }
405 } // namespace webrtc 408 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698