OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return 0; | 135 return 0; |
136 | 136 |
137 rtp_header_.header.payloadType = payload_type; | 137 rtp_header_.header.payloadType = payload_type; |
138 rtp_header_.frameType = frame_type; | 138 rtp_header_.frameType = frame_type; |
139 if (frame_type == kAudioFrameSpeech) | 139 if (frame_type == kAudioFrameSpeech) |
140 rtp_header_.type.Audio.isCNG = false; | 140 rtp_header_.type.Audio.isCNG = false; |
141 else | 141 else |
142 rtp_header_.type.Audio.isCNG = true; | 142 rtp_header_.type.Audio.isCNG = true; |
143 rtp_header_.header.timestamp = timestamp; | 143 rtp_header_.header.timestamp = timestamp; |
144 | 144 |
145 int ret_val = receiver_->InsertPacket(rtp_header_, payload_data, | 145 int ret_val = receiver_->InsertPacket( |
146 payload_len_bytes); | 146 rtp_header_, |
| 147 rtc::ArrayView<const uint8_t>(payload_data, payload_len_bytes)); |
147 if (ret_val < 0) { | 148 if (ret_val < 0) { |
148 assert(false); | 149 assert(false); |
149 return -1; | 150 return -1; |
150 } | 151 } |
151 rtp_header_.header.sequenceNumber++; | 152 rtp_header_.header.sequenceNumber++; |
152 packet_sent_ = true; | 153 packet_sent_ = true; |
153 last_frame_type_ = frame_type; | 154 last_frame_type_ = frame_type; |
154 return 0; | 155 return 0; |
155 } | 156 } |
156 | 157 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 } | 360 } |
360 EXPECT_EQ(c.id, receiver_->last_audio_codec_id()); | 361 EXPECT_EQ(c.id, receiver_->last_audio_codec_id()); |
361 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); | 362 EXPECT_EQ(0, receiver_->LastAudioCodec(&codec)); |
362 EXPECT_TRUE(CodecsEqual(c.inst, codec)); | 363 EXPECT_TRUE(CodecsEqual(c.inst, codec)); |
363 } | 364 } |
364 } | 365 } |
365 | 366 |
366 } // namespace acm2 | 367 } // namespace acm2 |
367 | 368 |
368 } // namespace webrtc | 369 } // namespace webrtc |
OLD | NEW |