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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/neteq_quality_test.h

Issue 1725143003: Changed AudioEncoder::Encode to take an rtc::Buffer* instead of uint8_t* and a maximum size. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed use of <functional> and moved MockAudioEncoderHelper things into the respective MockAudioEn… Created 4 years, 9 months 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
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 virtual ~NetEqQualityTest(); 70 virtual ~NetEqQualityTest();
71 71
72 void SetUp() override; 72 void SetUp() override;
73 73
74 // EncodeBlock(...) does the following: 74 // EncodeBlock(...) does the following:
75 // 1. encodes a block of audio, saved in |in_data| and has a length of 75 // 1. encodes a block of audio, saved in |in_data| and has a length of
76 // |block_size_samples| (samples per channel), 76 // |block_size_samples| (samples per channel),
77 // 2. save the bit stream to |payload| of |max_bytes| bytes in size, 77 // 2. save the bit stream to |payload| of |max_bytes| bytes in size,
78 // 3. returns the length of the payload (in bytes), 78 // 3. returns the length of the payload (in bytes),
79 virtual int EncodeBlock(int16_t* in_data, size_t block_size_samples, 79 virtual int EncodeBlock(int16_t* in_data, size_t block_size_samples,
80 uint8_t* payload, size_t max_bytes) = 0; 80 rtc::Buffer* payload, size_t max_bytes) = 0;
81 81
82 // PacketLost(...) determines weather a packet sent at an indicated time gets 82 // PacketLost(...) determines weather a packet sent at an indicated time gets
83 // lost or not. 83 // lost or not.
84 bool PacketLost(); 84 bool PacketLost();
85 85
86 // DecodeBlock() decodes a block of audio using the payload stored in 86 // DecodeBlock() decodes a block of audio using the payload stored in
87 // |payload_| with the length of |payload_size_bytes_| (bytes). The decoded 87 // |payload_| with the length of |payload_size_bytes_| (bytes). The decoded
88 // audio is to be stored in |out_data_|. 88 // audio is to be stored in |out_data_|.
89 int DecodeBlock(); 89 int DecodeBlock();
90 90
(...skipping 30 matching lines...) Expand all
121 121
122 std::unique_ptr<InputAudioFile> in_file_; 122 std::unique_ptr<InputAudioFile> in_file_;
123 std::unique_ptr<AudioSink> output_; 123 std::unique_ptr<AudioSink> output_;
124 std::ofstream log_file_; 124 std::ofstream log_file_;
125 125
126 std::unique_ptr<RtpGenerator> rtp_generator_; 126 std::unique_ptr<RtpGenerator> rtp_generator_;
127 std::unique_ptr<NetEq> neteq_; 127 std::unique_ptr<NetEq> neteq_;
128 std::unique_ptr<LossModel> loss_model_; 128 std::unique_ptr<LossModel> loss_model_;
129 129
130 std::unique_ptr<int16_t[]> in_data_; 130 std::unique_ptr<int16_t[]> in_data_;
131 std::unique_ptr<uint8_t[]> payload_; 131 rtc::Buffer payload_;
132 std::unique_ptr<int16_t[]> out_data_; 132 std::unique_ptr<int16_t[]> out_data_;
133 WebRtcRTPHeader rtp_header_; 133 WebRtcRTPHeader rtp_header_;
134 134
135 size_t total_payload_size_bytes_; 135 size_t total_payload_size_bytes_;
136 }; 136 };
137 137
138 } // namespace test 138 } // namespace test
139 } // namespace webrtc 139 } // namespace webrtc
140 140
141 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_ 141 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_TOOLS_NETEQ_QUALITY_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698