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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 void AudioReceiveStream::SignalNetworkState(NetworkState state) { | 80 void AudioReceiveStream::SignalNetworkState(NetworkState state) { |
81 } | 81 } |
82 | 82 |
83 bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) { | 83 bool AudioReceiveStream::DeliverRtcp(const uint8_t* packet, size_t length) { |
84 return false; | 84 return false; |
85 } | 85 } |
86 | 86 |
87 bool AudioReceiveStream::DeliverRtp(const uint8_t* packet, size_t length) { | 87 bool AudioReceiveStream::DeliverRtp(const uint8_t* packet, size_t length) { |
88 RTPHeader header; | 88 RTPHeader header; |
| 89 |
89 if (!rtp_header_parser_->Parse(packet, length, &header)) { | 90 if (!rtp_header_parser_->Parse(packet, length, &header)) { |
90 return false; | 91 return false; |
91 } | 92 } |
92 | 93 |
93 // Only forward if the parsed header has absolute sender time. RTP time stamps | 94 // Only forward if the parsed header has absolute sender time. RTP timestamps |
94 // may have different rates for audio and video and shouldn't be mixed. | 95 // may have different rates for audio and video and shouldn't be mixed. |
95 if (header.extension.hasAbsoluteSendTime) { | 96 if (config_.combined_audio_video_bwe && |
| 97 header.extension.hasAbsoluteSendTime) { |
96 int64_t arrival_time_ms = TickTime::MillisecondTimestamp(); | 98 int64_t arrival_time_ms = TickTime::MillisecondTimestamp(); |
97 size_t payload_size = length - header.headerLength; | 99 size_t payload_size = length - header.headerLength; |
98 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size, | 100 remote_bitrate_estimator_->IncomingPacket(arrival_time_ms, payload_size, |
99 header, false); | 101 header, false); |
100 } | 102 } |
101 return true; | 103 return true; |
102 } | 104 } |
103 } // namespace internal | 105 } // namespace internal |
104 } // namespace webrtc | 106 } // namespace webrtc |
OLD | NEW |