OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 int packet_input_time_ms = | 370 int packet_input_time_ms = |
371 rtp_generator_->GetRtpHeader(kPayloadType, in_size_samples_, | 371 rtp_generator_->GetRtpHeader(kPayloadType, in_size_samples_, |
372 &rtp_header_); | 372 &rtp_header_); |
373 Log() << "Packet of size " | 373 Log() << "Packet of size " |
374 << payload_size_bytes_ | 374 << payload_size_bytes_ |
375 << " bytes, for frame at " | 375 << " bytes, for frame at " |
376 << packet_input_time_ms | 376 << packet_input_time_ms |
377 << " ms "; | 377 << " ms "; |
378 if (payload_size_bytes_ > 0) { | 378 if (payload_size_bytes_ > 0) { |
379 if (!PacketLost()) { | 379 if (!PacketLost()) { |
380 int ret = neteq_->InsertPacket(rtp_header_, &payload_[0], | 380 int ret = neteq_->InsertPacket( |
381 payload_size_bytes_, | 381 rtp_header_, |
382 packet_input_time_ms * in_sampling_khz_); | 382 rtc::ArrayView<const uint8_t>(payload_.get(), payload_size_bytes_), |
| 383 packet_input_time_ms * in_sampling_khz_); |
383 if (ret != NetEq::kOK) | 384 if (ret != NetEq::kOK) |
384 return -1; | 385 return -1; |
385 Log() << "was sent."; | 386 Log() << "was sent."; |
386 } else { | 387 } else { |
387 Log() << "was lost."; | 388 Log() << "was lost."; |
388 } | 389 } |
389 } | 390 } |
390 Log() << std::endl; | 391 Log() << std::endl; |
391 return packet_input_time_ms; | 392 return packet_input_time_ms; |
392 } | 393 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 } | 427 } |
427 } | 428 } |
428 Log() << "Average bit rate was " | 429 Log() << "Average bit rate was " |
429 << 8.0f * total_payload_size_bytes_ / FLAGS_runtime_ms | 430 << 8.0f * total_payload_size_bytes_ / FLAGS_runtime_ms |
430 << " kbps" | 431 << " kbps" |
431 << std::endl; | 432 << std::endl; |
432 } | 433 } |
433 | 434 |
434 } // namespace test | 435 } // namespace test |
435 } // namespace webrtc | 436 } // namespace webrtc |
OLD | NEW |