Delete a few unused methods on DecoderDatabase
Bug: none Change-Id: Ic0a20036b92e0f1d088bae88724a777eca93760d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262763 Reviewed-by: Minyue Li <minyue@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36924}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
0ac50b9dfd
commit
304b78d3d9
@ -113,12 +113,6 @@ int DecoderDatabase::Size() const {
|
||||
return static_cast<int>(decoders_.size());
|
||||
}
|
||||
|
||||
void DecoderDatabase::Reset() {
|
||||
decoders_.clear();
|
||||
active_decoder_type_ = -1;
|
||||
active_cng_decoder_type_ = -1;
|
||||
}
|
||||
|
||||
std::vector<int> DecoderDatabase::SetCodecs(
|
||||
const std::map<int, SdpAudioFormat>& codecs) {
|
||||
// First collect all payload types that we'll remove or reassign, then remove
|
||||
@ -263,16 +257,6 @@ AudioDecoder* DecoderDatabase::GetDecoder(uint8_t rtp_payload_type) const {
|
||||
return info ? info->GetDecoder() : nullptr;
|
||||
}
|
||||
|
||||
bool DecoderDatabase::IsType(uint8_t rtp_payload_type, const char* name) const {
|
||||
const DecoderInfo* info = GetDecoderInfo(rtp_payload_type);
|
||||
return info && info->IsType(name);
|
||||
}
|
||||
|
||||
bool DecoderDatabase::IsType(uint8_t rtp_payload_type,
|
||||
const std::string& name) const {
|
||||
return IsType(rtp_payload_type, name.c_str());
|
||||
}
|
||||
|
||||
bool DecoderDatabase::IsComfortNoise(uint8_t rtp_payload_type) const {
|
||||
const DecoderInfo* info = GetDecoderInfo(rtp_payload_type);
|
||||
return info && info->IsComfortNoise();
|
||||
|
||||
@ -130,11 +130,6 @@ class DecoderDatabase {
|
||||
// Returns the number of decoders registered in the database.
|
||||
virtual int Size() const;
|
||||
|
||||
// Resets the database, erasing all registered payload types, and deleting
|
||||
// any AudioDecoder objects that were not externally created and inserted
|
||||
// using InsertExternal().
|
||||
virtual void Reset();
|
||||
|
||||
// Replaces the existing set of decoders with the given set. Returns the
|
||||
// payload types that were reassigned or removed while doing so.
|
||||
virtual std::vector<int> SetCodecs(
|
||||
@ -182,12 +177,6 @@ class DecoderDatabase {
|
||||
// object does not exist for that decoder, the object is created.
|
||||
AudioDecoder* GetDecoder(uint8_t rtp_payload_type) const;
|
||||
|
||||
// Returns if `rtp_payload_type` is registered with a format named `name`.
|
||||
bool IsType(uint8_t rtp_payload_type, const char* name) const;
|
||||
|
||||
// Returns if `rtp_payload_type` is registered with a format named `name`.
|
||||
bool IsType(uint8_t rtp_payload_type, const std::string& name) const;
|
||||
|
||||
// Returns true if `rtp_payload_type` is registered as comfort noise.
|
||||
bool IsComfortNoise(uint8_t rtp_payload_type) const;
|
||||
|
||||
|
||||
@ -127,8 +127,6 @@ TEST(DecoderDatabase, TypeTests) {
|
||||
EXPECT_FALSE(db.IsComfortNoise(kPayloadTypePcmU));
|
||||
EXPECT_FALSE(db.IsDtmf(kPayloadTypePcmU));
|
||||
EXPECT_FALSE(db.IsRed(kPayloadTypePcmU));
|
||||
EXPECT_FALSE(db.IsType(kPayloadTypePcmU, "isac"));
|
||||
EXPECT_TRUE(db.IsType(kPayloadTypePcmU, "pcmu"));
|
||||
EXPECT_TRUE(db.IsComfortNoise(kPayloadTypeCng));
|
||||
EXPECT_TRUE(db.IsDtmf(kPayloadTypeDtmf));
|
||||
EXPECT_TRUE(db.IsRed(kPayloadTypeRed));
|
||||
|
||||
@ -27,7 +27,6 @@ class MockDecoderDatabase : public DecoderDatabase {
|
||||
MOCK_METHOD(void, Die, ());
|
||||
MOCK_METHOD(bool, Empty, (), (const, override));
|
||||
MOCK_METHOD(int, Size, (), (const, override));
|
||||
MOCK_METHOD(void, Reset, (), (override));
|
||||
MOCK_METHOD(int,
|
||||
RegisterPayload,
|
||||
(int rtp_payload_type, const SdpAudioFormat& audio_format),
|
||||
|
||||
Reference in New Issue
Block a user