OLD | NEW |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
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(RtcpMode rtcp_mode) { |
115 newapi::RtcpMode rtcp_mode) { | |
116 switch (rtcp_mode) { | 115 switch (rtcp_mode) { |
117 case newapi::kRtcpCompound: | 116 case RtcpMode::kCompound: |
118 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; | 117 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; |
119 case newapi::kRtcpReducedSize: | 118 case RtcpMode::kReducedSize: |
120 return rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE; | 119 return rtclog::VideoReceiveConfig::RTCP_REDUCEDSIZE; |
| 120 case RtcpMode::kOff: |
| 121 RTC_NOTREACHED(); |
| 122 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; |
121 } | 123 } |
122 RTC_NOTREACHED(); | 124 RTC_NOTREACHED(); |
123 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; | 125 return rtclog::VideoReceiveConfig::RTCP_COMPOUND; |
124 } | 126 } |
125 | 127 |
126 rtclog::MediaType ConvertMediaType(MediaType media_type) { | 128 rtclog::MediaType ConvertMediaType(MediaType media_type) { |
127 switch (media_type) { | 129 switch (media_type) { |
128 case MediaType::ANY: | 130 case MediaType::ANY: |
129 return rtclog::MediaType::ANY; | 131 return rtclog::MediaType::ANY; |
130 case MediaType::AUDIO: | 132 case MediaType::AUDIO: |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 return result->ParseFromString(dump_buffer); | 398 return result->ParseFromString(dump_buffer); |
397 } | 399 } |
398 | 400 |
399 #endif // ENABLE_RTC_EVENT_LOG | 401 #endif // ENABLE_RTC_EVENT_LOG |
400 | 402 |
401 // RtcEventLog member functions. | 403 // RtcEventLog member functions. |
402 rtc::scoped_ptr<RtcEventLog> RtcEventLog::Create() { | 404 rtc::scoped_ptr<RtcEventLog> RtcEventLog::Create() { |
403 return rtc::scoped_ptr<RtcEventLog>(new RtcEventLogImpl()); | 405 return rtc::scoped_ptr<RtcEventLog>(new RtcEventLogImpl()); |
404 } | 406 } |
405 } // namespace webrtc | 407 } // namespace webrtc |
OLD | NEW |