Remove some unused RentACodec static methods
We want to get rid of the whole thing, really, but these two were easy. Bug: webrtc:8396 Change-Id: I9292bf077caca171c9f5fe63695b6333cf22547d Reviewed-on: https://webrtc-review.googlesource.com/c/104763 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25618}
This commit is contained in:
@ -298,7 +298,7 @@ int ACMCodecDB::CodecId(const CodecInst& codec_inst) {
|
||||
int ACMCodecDB::CodecId(const char* payload_name,
|
||||
int frequency,
|
||||
size_t channels) {
|
||||
for (const CodecInst& ci : RentACodec::Database()) {
|
||||
for (const CodecInst& ci : database_) {
|
||||
bool name_match = false;
|
||||
bool frequency_match = false;
|
||||
bool channels_match = false;
|
||||
@ -318,7 +318,7 @@ int ACMCodecDB::CodecId(const char* payload_name,
|
||||
|
||||
if (name_match && frequency_match && channels_match) {
|
||||
// We have found a matching codec in the list.
|
||||
return &ci - RentACodec::Database().data();
|
||||
return &ci - database_;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,8 @@ absl::optional<RentACodec::CodecId> RentACodec::CodecIdByParams(
|
||||
|
||||
absl::optional<CodecInst> RentACodec::CodecInstById(CodecId codec_id) {
|
||||
absl::optional<int> mi = CodecIndexFromId(codec_id);
|
||||
return mi ? absl::optional<CodecInst>(Database()[*mi]) : absl::nullopt;
|
||||
return mi ? absl::optional<CodecInst>(ACMCodecDB::database_[*mi])
|
||||
: absl::nullopt;
|
||||
}
|
||||
|
||||
absl::optional<RentACodec::CodecId> RentACodec::CodecIdByInst(
|
||||
@ -55,20 +56,6 @@ absl::optional<CodecInst> RentACodec::CodecInstByParams(
|
||||
return ci;
|
||||
}
|
||||
|
||||
absl::optional<bool> RentACodec::IsSupportedNumChannels(CodecId codec_id,
|
||||
size_t num_channels) {
|
||||
auto i = CodecIndexFromId(codec_id);
|
||||
return i ? absl::optional<bool>(
|
||||
ACMCodecDB::codec_settings_[*i].channel_support >=
|
||||
num_channels)
|
||||
: absl::nullopt;
|
||||
}
|
||||
|
||||
rtc::ArrayView<const CodecInst> RentACodec::Database() {
|
||||
return rtc::ArrayView<const CodecInst>(ACMCodecDB::database_,
|
||||
NumberOfCodecs());
|
||||
}
|
||||
|
||||
absl::optional<NetEqDecoder> RentACodec::NetEqDecoderFromCodecId(
|
||||
CodecId codec_id,
|
||||
size_t num_channels) {
|
||||
|
@ -132,11 +132,6 @@ struct RentACodec {
|
||||
return payload_type >= 0 && payload_type <= 127;
|
||||
}
|
||||
|
||||
static rtc::ArrayView<const CodecInst> Database();
|
||||
|
||||
static absl::optional<bool> IsSupportedNumChannels(CodecId codec_id,
|
||||
size_t num_channels);
|
||||
|
||||
static absl::optional<NetEqDecoder> NetEqDecoderFromCodecId(
|
||||
CodecId codec_id,
|
||||
size_t num_channels);
|
||||
|
Reference in New Issue
Block a user