OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 uint64_t timestamp_us, bool inbound, bool audio, | 170 uint64_t timestamp_us, bool inbound, bool audio, |
171 const RtpCodecParameters& codec_params) { | 171 const RtpCodecParameters& codec_params) { |
172 RTC_DCHECK_GE(codec_params.payload_type, 0); | 172 RTC_DCHECK_GE(codec_params.payload_type, 0); |
173 RTC_DCHECK_LE(codec_params.payload_type, 127); | 173 RTC_DCHECK_LE(codec_params.payload_type, 127); |
174 RTC_DCHECK(codec_params.clock_rate); | 174 RTC_DCHECK(codec_params.clock_rate); |
175 uint32_t payload_type = static_cast<uint32_t>(codec_params.payload_type); | 175 uint32_t payload_type = static_cast<uint32_t>(codec_params.payload_type); |
176 std::unique_ptr<RTCCodecStats> codec_stats(new RTCCodecStats( | 176 std::unique_ptr<RTCCodecStats> codec_stats(new RTCCodecStats( |
177 RTCCodecStatsIDFromDirectionMediaAndPayload(inbound, audio, payload_type), | 177 RTCCodecStatsIDFromDirectionMediaAndPayload(inbound, audio, payload_type), |
178 timestamp_us)); | 178 timestamp_us)); |
179 codec_stats->payload_type = payload_type; | 179 codec_stats->payload_type = payload_type; |
180 codec_stats->codec = codec_params.mime_type(); | 180 codec_stats->mime_type = codec_params.mime_type(); |
181 if (codec_params.clock_rate) { | 181 if (codec_params.clock_rate) { |
182 codec_stats->clock_rate = static_cast<uint32_t>(*codec_params.clock_rate); | 182 codec_stats->clock_rate = static_cast<uint32_t>(*codec_params.clock_rate); |
183 } | 183 } |
184 return codec_stats; | 184 return codec_stats; |
185 } | 185 } |
186 | 186 |
187 void SetMediaStreamTrackStatsFromMediaStreamTrackInterface( | 187 void SetMediaStreamTrackStatsFromMediaStreamTrackInterface( |
188 const MediaStreamTrackInterface& track, | 188 const MediaStreamTrackInterface& track, |
189 RTCMediaStreamTrackStats* track_stats) { | 189 RTCMediaStreamTrackStats* track_stats) { |
190 track_stats->track_identifier = track.id(); | 190 track_stats->track_identifier = track.id(); |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 const std::string& type) { | 1247 const std::string& type) { |
1248 return CandidateTypeToRTCIceCandidateType(type); | 1248 return CandidateTypeToRTCIceCandidateType(type); |
1249 } | 1249 } |
1250 | 1250 |
1251 const char* DataStateToRTCDataChannelStateForTesting( | 1251 const char* DataStateToRTCDataChannelStateForTesting( |
1252 DataChannelInterface::DataState state) { | 1252 DataChannelInterface::DataState state) { |
1253 return DataStateToRTCDataChannelState(state); | 1253 return DataStateToRTCDataChannelState(state); |
1254 } | 1254 } |
1255 | 1255 |
1256 } // namespace webrtc | 1256 } // namespace webrtc |
OLD | NEW |