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

Unified Diff: webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h

Issue 1339253003: Move AudioDecoderIsac* to its own files (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 3 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/fix/interface/audio_encoder_isacfix.h
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h b/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h
index 5bca23ec4e72fa8f222a86cb09386438977846b8..00c0987749145d6f2e6b752a21471582217bc544 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/interface/audio_encoder_isacfix.h
@@ -11,116 +11,12 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_ISACFIX_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_ISACFIX_H_
-#include "webrtc/base/checks.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h"
-#include "webrtc/modules/audio_coding/codecs/isac/fix/interface/isacfix.h"
+#include "webrtc/modules/audio_coding/codecs/isac/fix/source/isac_fix_type.h"
namespace webrtc {
-struct IsacFix {
- typedef ISACFIX_MainStruct instance_type;
- static const bool has_swb = false;
- static const uint16_t kFixSampleRate = 16000;
- static inline int16_t Control(instance_type* inst,
- int32_t rate,
- int framesize) {
- return WebRtcIsacfix_Control(inst, rate, framesize);
- }
- static inline int16_t ControlBwe(instance_type* inst,
- int32_t rate_bps,
- int frame_size_ms,
- int16_t enforce_frame_size) {
- return WebRtcIsacfix_ControlBwe(inst, rate_bps, frame_size_ms,
- enforce_frame_size);
- }
- static inline int16_t Create(instance_type** inst) {
- return WebRtcIsacfix_Create(inst);
- }
- static inline int DecodeInternal(instance_type* inst,
- const uint8_t* encoded,
- size_t len,
- int16_t* decoded,
- int16_t* speech_type) {
- return WebRtcIsacfix_Decode(inst, encoded, len, decoded, speech_type);
- }
- static inline size_t DecodePlc(instance_type* inst,
- int16_t* decoded,
- size_t num_lost_frames) {
- return WebRtcIsacfix_DecodePlc(inst, decoded, num_lost_frames);
- }
- static inline void DecoderInit(instance_type* inst) {
- WebRtcIsacfix_DecoderInit(inst);
- }
- static inline int Encode(instance_type* inst,
- const int16_t* speech_in,
- uint8_t* encoded) {
- return WebRtcIsacfix_Encode(inst, speech_in, encoded);
- }
- static inline int16_t EncoderInit(instance_type* inst, int16_t coding_mode) {
- return WebRtcIsacfix_EncoderInit(inst, coding_mode);
- }
- static inline uint16_t EncSampRate(instance_type* inst) {
- return kFixSampleRate;
- }
-
- static inline int16_t Free(instance_type* inst) {
- return WebRtcIsacfix_Free(inst);
- }
- static inline void GetBandwidthInfo(instance_type* inst,
- IsacBandwidthInfo* bwinfo) {
- WebRtcIsacfix_GetBandwidthInfo(inst, bwinfo);
- }
- static inline int16_t GetErrorCode(instance_type* inst) {
- return WebRtcIsacfix_GetErrorCode(inst);
- }
-
- static inline int16_t GetNewFrameLen(instance_type* inst) {
- return WebRtcIsacfix_GetNewFrameLen(inst);
- }
- static inline void SetBandwidthInfo(instance_type* inst,
- const IsacBandwidthInfo* bwinfo) {
- WebRtcIsacfix_SetBandwidthInfo(inst, bwinfo);
- }
- static inline int16_t SetDecSampRate(instance_type* inst,
- uint16_t sample_rate_hz) {
- RTC_DCHECK_EQ(sample_rate_hz, kFixSampleRate);
- return 0;
- }
- static inline int16_t SetEncSampRate(instance_type* inst,
- uint16_t sample_rate_hz) {
- RTC_DCHECK_EQ(sample_rate_hz, kFixSampleRate);
- return 0;
- }
- static inline void SetEncSampRateInDecoder(instance_type* inst,
- uint16_t sample_rate_hz) {
- RTC_DCHECK_EQ(sample_rate_hz, kFixSampleRate);
- }
- static inline void SetInitialBweBottleneck(
- instance_type* inst,
- int bottleneck_bits_per_second) {
- WebRtcIsacfix_SetInitialBweBottleneck(inst, bottleneck_bits_per_second);
- }
- static inline int16_t UpdateBwEstimate(instance_type* inst,
- const uint8_t* encoded,
- size_t packet_size,
- uint16_t rtp_seq_number,
- uint32_t send_ts,
- uint32_t arr_ts) {
- return WebRtcIsacfix_UpdateBwEstimate(inst, encoded, packet_size,
- rtp_seq_number, send_ts, arr_ts);
- }
- static inline int16_t SetMaxPayloadSize(instance_type* inst,
- int16_t max_payload_size_bytes) {
- return WebRtcIsacfix_SetMaxPayloadSize(inst, max_payload_size_bytes);
- }
- static inline int16_t SetMaxRate(instance_type* inst, int32_t max_bit_rate) {
- return WebRtcIsacfix_SetMaxRate(inst, max_bit_rate);
- }
-};
-
using AudioEncoderIsacFix = AudioEncoderIsacT<IsacFix>;
-using AudioDecoderIsacFix = AudioDecoderIsacT<IsacFix>;
} // namespace webrtc
#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_INTERFACE_AUDIO_ENCODER_ISACFIX_H_

Powered by Google App Engine
This is Rietveld 408576698