Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc

Issue 1429943004: AcmReceiver::InsertPacket and NetEq::InsertPacket: Take ArrayView arguments (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix log message Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 payload_len = ReplacePayload(replacement_audio_file.get(), 540 payload_len = ReplacePayload(replacement_audio_file.get(),
541 &replacement_audio, 541 &replacement_audio,
542 &payload, 542 &payload,
543 &payload_mem_size_bytes, 543 &payload_mem_size_bytes,
544 &input_frame_size_timestamps, 544 &input_frame_size_timestamps,
545 &rtp_header, 545 &rtp_header,
546 next_packet.get()); 546 next_packet.get());
547 payload_ptr = payload.get(); 547 payload_ptr = payload.get();
548 } 548 }
549 int error = neteq->InsertPacket( 549 int error = neteq->InsertPacket(
550 rtp_header, payload_ptr, payload_len, 550 rtp_header, rtc::ArrayView<const uint8_t>(payload_ptr, payload_len),
551 static_cast<uint32_t>(packet->time_ms() * sample_rate_hz / 1000)); 551 static_cast<uint32_t>(packet->time_ms() * sample_rate_hz / 1000));
552 if (error != NetEq::kOK) { 552 if (error != NetEq::kOK) {
553 if (neteq->LastError() == NetEq::kUnknownRtpPayloadType) { 553 if (neteq->LastError() == NetEq::kUnknownRtpPayloadType) {
554 std::cerr << "RTP Payload type " 554 std::cerr << "RTP Payload type "
555 << static_cast<int>(rtp_header.header.payloadType) 555 << static_cast<int>(rtp_header.header.payloadType)
556 << " is unknown." << std::endl; 556 << " is unknown." << std::endl;
557 std::cerr << "Use --codec_map to view default mapping." << std::endl; 557 std::cerr << "Use --codec_map to view default mapping." << std::endl;
558 std::cerr << "Use --helpshort for information on how to make custom " 558 std::cerr << "Use --helpshort for information on how to make custom "
559 "mappings." << std::endl; 559 "mappings." << std::endl;
560 } else { 560 } else {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 } 631 }
632 } 632 }
633 printf("Simulation done\n"); 633 printf("Simulation done\n");
634 printf("Produced %i ms of audio\n", 634 printf("Produced %i ms of audio\n",
635 static_cast<int>(time_now_ms - start_time_ms)); 635 static_cast<int>(time_now_ms - start_time_ms));
636 636
637 delete neteq; 637 delete neteq;
638 webrtc::Trace::ReturnTrace(); 638 webrtc::Trace::ReturnTrace();
639 return 0; 639 return 0;
640 } 640 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698