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

Unified Diff: webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h

Issue 3003603002: Remove dead code (Closed)
Patch Set: Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
diff --git a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
index bda379c8d256e0da8fcb064321c48f7e05d474a2..854f2eef0cfc059921c9ee0c0b38077268b0188d 100644
--- a/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
+++ b/webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t_impl.h
@@ -13,14 +13,8 @@
#include "webrtc/common_types.h"
#include "webrtc/rtc_base/checks.h"
-#include "webrtc/rtc_base/string_to_number.h"
namespace webrtc {
-namespace { // NOLINT (not a "regular" header file)
-int GetIsacMaxBitrate(int clockrate_hz) {
- return (clockrate_hz == 32000) ? 56000 : 32000;
-}
-} // namespace
template <typename T>
typename AudioEncoderIsacT<T>::Config CreateIsacConfig(
@@ -38,33 +32,6 @@ typename AudioEncoderIsacT<T>::Config CreateIsacConfig(
return config;
}
-template <typename T>
-typename AudioEncoderIsacT<T>::Config CreateIsacConfig(
- int payload_type,
- const SdpAudioFormat& format) {
- typename AudioEncoderIsacT<T>::Config config;
- config.payload_type = payload_type;
- config.sample_rate_hz = format.clockrate_hz;
-
- // We only support different frame sizes at 16000 Hz.
- if (config.sample_rate_hz == 16000) {
- auto ptime_iter = format.parameters.find("ptime");
- if (ptime_iter != format.parameters.end()) {
- auto ptime = rtc::StringToNumber<int>(ptime_iter->second);
- if (ptime && *ptime >= 60) {
- config.frame_size_ms = 60;
- } else {
- config.frame_size_ms = 30;
- }
- }
- }
-
- // Set the default bitrate for ISAC to the maximum bitrate allowed at this
- // clockrate. At this point, adaptive mode is not used by WebRTC.
- config.bit_rate = GetIsacMaxBitrate(format.clockrate_hz);
- return config;
-}
-
template <typename T>
bool AudioEncoderIsacT<T>::Config::IsOk() const {
if (max_bit_rate < 32000 && max_bit_rate != -1)
@@ -105,25 +72,6 @@ AudioEncoderIsacT<T>::AudioEncoderIsacT(
const rtc::scoped_refptr<LockedIsacBandwidthInfo>& bwinfo)
: AudioEncoderIsacT(CreateIsacConfig<T>(codec_inst, bwinfo)) {}
-template <typename T>
-AudioEncoderIsacT<T>::AudioEncoderIsacT(int payload_type,
- const SdpAudioFormat& format)
- : AudioEncoderIsacT(CreateIsacConfig<T>(payload_type, format)) {}
-
-template <typename T>
-rtc::Optional<AudioCodecInfo> AudioEncoderIsacT<T>::QueryAudioEncoder(
- const SdpAudioFormat& format) {
- if (STR_CASE_CMP(format.name.c_str(), GetPayloadName()) == 0) {
- Config config = CreateIsacConfig<T>(0, format);
- if (config.IsOk()) {
- return rtc::Optional<AudioCodecInfo>(
- {config.sample_rate_hz, 1, config.bit_rate, 10000,
- GetIsacMaxBitrate(format.clockrate_hz)});
- }
- }
- return rtc::Optional<AudioCodecInfo>();
-}
-
template <typename T>
AudioEncoderIsacT<T>::~AudioEncoderIsacT() {
RTC_CHECK_EQ(0, T::Free(isac_state_));

Powered by Google App Engine
This is Rietveld 408576698