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

Side by Side Diff: webrtc/modules/audio_coding/codecs/isac/audio_encoder_isac_t.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, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_ 12 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_
13 13
14 #include <vector> 14 #include <vector>
15 15
16 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h"
17 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h" 16 #include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
18 #include "webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h" 17 #include "webrtc/modules/audio_coding/codecs/isac/locked_bandwidth_info.h"
19 18
20 namespace webrtc { 19 namespace webrtc {
21 20
22 struct CodecInst; 21 struct CodecInst;
23 22
24 template <typename T> 23 template <typename T>
25 class AudioEncoderIsacT final : public AudioEncoder { 24 class AudioEncoderIsacT final : public AudioEncoder {
26 public: 25 public:
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 86
88 // Timestamp of the first input of the currently in-progress packet. 87 // Timestamp of the first input of the currently in-progress packet.
89 uint32_t packet_timestamp_; 88 uint32_t packet_timestamp_;
90 89
91 // Timestamp of the previously encoded packet. 90 // Timestamp of the previously encoded packet.
92 uint32_t last_encoded_timestamp_; 91 uint32_t last_encoded_timestamp_;
93 92
94 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT); 93 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT);
95 }; 94 };
96 95
97 template <typename T>
98 class AudioDecoderIsacT final : public AudioDecoder {
99 public:
100 AudioDecoderIsacT();
101 explicit AudioDecoderIsacT(LockedIsacBandwidthInfo* bwinfo);
102 ~AudioDecoderIsacT() override;
103
104 bool HasDecodePlc() const override;
105 size_t DecodePlc(size_t num_frames, int16_t* decoded) override;
106 void Reset() override;
107 int IncomingPacket(const uint8_t* payload,
108 size_t payload_len,
109 uint16_t rtp_sequence_number,
110 uint32_t rtp_timestamp,
111 uint32_t arrival_timestamp) override;
112 int ErrorCode() override;
113 size_t Channels() const override;
114 int DecodeInternal(const uint8_t* encoded,
115 size_t encoded_len,
116 int sample_rate_hz,
117 int16_t* decoded,
118 SpeechType* speech_type) override;
119
120 private:
121 typename T::instance_type* isac_state_;
122 LockedIsacBandwidthInfo* bwinfo_;
123 int decoder_sample_rate_hz_;
124
125 RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderIsacT);
126 };
127
128 } // namespace webrtc 96 } // namespace webrtc
129 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_ 97 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698