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

Side by Side Diff: webrtc/modules/audio_coding/neteq/decoder_database_unittest.cc

Issue 2411183003: Removed RTPHeader from NetEq's Packet struct. (Closed)
Patch Set: Fixed naming of payloadType and sequenceNumber. Updated comments. Created 4 years, 2 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 const int kNumPayloads = 10; 169 const int kNumPayloads = 10;
170 for (uint8_t payload_type = 0; payload_type < kNumPayloads; ++payload_type) { 170 for (uint8_t payload_type = 0; payload_type < kNumPayloads; ++payload_type) {
171 EXPECT_EQ(DecoderDatabase::kOK, 171 EXPECT_EQ(DecoderDatabase::kOK,
172 db.RegisterPayload(payload_type, NetEqDecoder::kDecoderPCMu, "")); 172 db.RegisterPayload(payload_type, NetEqDecoder::kDecoderPCMu, ""));
173 } 173 }
174 PacketList packet_list; 174 PacketList packet_list;
175 for (int i = 0; i < kNumPayloads + 1; ++i) { 175 for (int i = 0; i < kNumPayloads + 1; ++i) {
176 // Create packet with payload type |i|. The last packet will have a payload 176 // Create packet with payload type |i|. The last packet will have a payload
177 // type that is not registered in the decoder database. 177 // type that is not registered in the decoder database.
178 Packet* packet = new Packet; 178 Packet* packet = new Packet;
179 packet->header.payloadType = i; 179 packet->payload_type = i;
180 packet_list.push_back(packet); 180 packet_list.push_back(packet);
181 } 181 }
182 182
183 // Expect to return false, since the last packet is of an unknown type. 183 // Expect to return false, since the last packet is of an unknown type.
184 EXPECT_EQ(DecoderDatabase::kDecoderNotFound, 184 EXPECT_EQ(DecoderDatabase::kDecoderNotFound,
185 db.CheckPayloadTypes(packet_list)); 185 db.CheckPayloadTypes(packet_list));
186 186
187 delete packet_list.back(); 187 delete packet_list.back();
188 packet_list.pop_back(); // Remove the unknown one. 188 packet_list.pop_back(); // Remove the unknown one.
189 189
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 EXPECT_EQ(DecoderDatabase::kOK, db.Remove(13)); 249 EXPECT_EQ(DecoderDatabase::kOK, db.Remove(13));
250 EXPECT_EQ(NULL, db.GetActiveCngDecoder()); 250 EXPECT_EQ(NULL, db.GetActiveCngDecoder());
251 251
252 // Try to set non-existing codecs as active. 252 // Try to set non-existing codecs as active.
253 EXPECT_EQ(DecoderDatabase::kDecoderNotFound, 253 EXPECT_EQ(DecoderDatabase::kDecoderNotFound,
254 db.SetActiveDecoder(17, &changed)); 254 db.SetActiveDecoder(17, &changed));
255 EXPECT_EQ(DecoderDatabase::kDecoderNotFound, 255 EXPECT_EQ(DecoderDatabase::kDecoderNotFound,
256 db.SetActiveCngDecoder(17)); 256 db.SetActiveCngDecoder(17));
257 } 257 }
258 } // namespace webrtc 258 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698