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

Side by Side Diff: webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc

Issue 1408773005: Remove ACMCodecDB::CodecFreq (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac-static
Patch Set: 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
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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 // We didn't find a matching codec. 334 // We didn't find a matching codec.
335 return -1; 335 return -1;
336 } 336 }
337 // Gets codec id number from database for the receiver. 337 // Gets codec id number from database for the receiver.
338 int ACMCodecDB::ReceiverCodecNumber(const CodecInst& codec_inst) { 338 int ACMCodecDB::ReceiverCodecNumber(const CodecInst& codec_inst) {
339 // Look for a matching codec in the database. 339 // Look for a matching codec in the database.
340 return CodecId(codec_inst); 340 return CodecId(codec_inst);
341 } 341 }
342 342
343 // Returns the codec sampling frequency for codec with id = "codec_id" in
344 // database.
345 int ACMCodecDB::CodecFreq(int codec_id) {
346 const size_t i = static_cast<size_t>(codec_id);
347 const auto db = RentACodec::Database();
348 return i < db.size() ? db[i].plfreq : -1;
349 }
350
351 } // namespace acm2 343 } // namespace acm2
352 344
353 } // namespace webrtc 345 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/acm2/acm_codec_database.h ('k') | webrtc/modules/audio_coding/main/acm2/acm_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698