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 30 matching lines...) Expand all Loading... |
41 return ss.str(); | 41 return ss.str(); |
42 } | 42 } |
43 | 43 |
44 namespace internal { | 44 namespace internal { |
45 AudioReceiveStream::AudioReceiveStream( | 45 AudioReceiveStream::AudioReceiveStream( |
46 RemoteBitrateEstimator* remote_bitrate_estimator, | 46 RemoteBitrateEstimator* remote_bitrate_estimator, |
47 const webrtc::AudioReceiveStream::Config& config) | 47 const webrtc::AudioReceiveStream::Config& config) |
48 : remote_bitrate_estimator_(remote_bitrate_estimator), | 48 : remote_bitrate_estimator_(remote_bitrate_estimator), |
49 config_(config), | 49 config_(config), |
50 rtp_header_parser_(RtpHeaderParser::Create()) { | 50 rtp_header_parser_(RtpHeaderParser::Create()) { |
51 DCHECK(config.voe_channel_id != -1); | 51 RTC_DCHECK(config.voe_channel_id != -1); |
52 DCHECK(remote_bitrate_estimator_ != nullptr); | 52 RTC_DCHECK(remote_bitrate_estimator_ != nullptr); |
53 DCHECK(rtp_header_parser_ != nullptr); | 53 RTC_DCHECK(rtp_header_parser_ != nullptr); |
54 for (const auto& ext : config.rtp.extensions) { | 54 for (const auto& ext : config.rtp.extensions) { |
55 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 55 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
56 DCHECK_GE(ext.id, 1); | 56 RTC_DCHECK_GE(ext.id, 1); |
57 DCHECK_LE(ext.id, 14); | 57 RTC_DCHECK_LE(ext.id, 14); |
58 if (ext.name == RtpExtension::kAudioLevel) { | 58 if (ext.name == RtpExtension::kAudioLevel) { |
59 CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( | 59 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( |
60 kRtpExtensionAudioLevel, ext.id)); | 60 kRtpExtensionAudioLevel, ext.id)); |
61 } else if (ext.name == RtpExtension::kAbsSendTime) { | 61 } else if (ext.name == RtpExtension::kAbsSendTime) { |
62 CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( | 62 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( |
63 kRtpExtensionAbsoluteSendTime, ext.id)); | 63 kRtpExtensionAbsoluteSendTime, ext.id)); |
64 } else if (ext.name == RtpExtension::kTransportSequenceNumber) { | 64 } else if (ext.name == RtpExtension::kTransportSequenceNumber) { |
65 CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( | 65 RTC_CHECK(rtp_header_parser_->RegisterRtpHeaderExtension( |
66 kRtpExtensionTransportSequenceNumber, ext.id)); | 66 kRtpExtensionTransportSequenceNumber, ext.id)); |
67 } else { | 67 } else { |
68 RTC_NOTREACHED() << "Unsupported RTP extension."; | 68 RTC_NOTREACHED() << "Unsupported RTP extension."; |
69 } | 69 } |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { | 73 webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { |
74 return webrtc::AudioReceiveStream::Stats(); | 74 return webrtc::AudioReceiveStream::Stats(); |
75 } | 75 } |
(...skipping 28 matching lines...) Expand all Loading... |
104 if (packet_time.timestamp >= 0) | 104 if (packet_time.timestamp >= 0) |
105 arrival_time_ms = packet_time.timestamp; | 105 arrival_time_ms = packet_time.timestamp; |
106 size_t payload_size = length - header.headerLength; | 106 size_t payload_size = length - header.headerLength; |
107 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size, | 107 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size, |
108 header, false); | 108 header, false); |
109 } | 109 } |
110 return true; | 110 return true; |
111 } | 111 } |
112 } // namespace internal | 112 } // namespace internal |
113 } // namespace webrtc | 113 } // namespace webrtc |
OLD | NEW |