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

Unified Diff: webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc

Issue 1425233003: Hide ACMCodecDB::database_ behind accessors (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@rac-static
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc b/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc
index f7842ce5b174dcb279c2dac07d98063eff2050b1..59bb233eef92cb77976471bff7b83f23a6c8a3f9 100644
--- a/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc
+++ b/webrtc/modules/audio_coding/main/acm2/acm_codec_database.cc
@@ -29,11 +29,6 @@ namespace acm2 {
namespace {
-// Checks if the bitrate is valid for the codec.
-bool IsRateValid(int codec_id, int rate) {
- return ACMCodecDB::database_[codec_id].rate == rate;
-}
-
// Checks if the bitrate is valid for iSAC.
bool IsISACRateValid(int rate) {
return (rate == -1) || ((rate <= 56000) && (rate >= 10000));
@@ -298,8 +293,7 @@ int ACMCodecDB::CodecNumber(const CodecInst& codec_inst) {
? codec_id : kInvalidRate;
}
- return IsRateValid(codec_id, codec_inst.rate) ?
- codec_id : kInvalidRate;
+ return database_[codec_id].rate == codec_inst.rate ? codec_id : kInvalidRate;
}
// Looks for a matching payload name, frequency, and channels in the
« 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