OLD | NEW |
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 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 ~AudioEncoderIsacT() override; | 55 ~AudioEncoderIsacT() override; |
56 | 56 |
57 size_t MaxEncodedBytes() const override; | 57 size_t MaxEncodedBytes() const override; |
58 int SampleRateHz() const override; | 58 int SampleRateHz() const override; |
59 size_t NumChannels() const override; | 59 size_t NumChannels() const override; |
60 size_t Num10MsFramesInNextPacket() const override; | 60 size_t Num10MsFramesInNextPacket() const override; |
61 size_t Max10MsFramesInAPacket() const override; | 61 size_t Max10MsFramesInAPacket() const override; |
62 int GetTargetBitrate() const override; | 62 int GetTargetBitrate() const override; |
63 EncodedInfo EncodeInternal(uint32_t rtp_timestamp, | 63 EncodedInfo EncodeInternal(uint32_t rtp_timestamp, |
64 rtc::ArrayView<const int16_t> audio, | 64 rtc::ArrayView<const int16_t> audio, |
65 size_t max_encoded_bytes, | 65 rtc::Buffer* encoded) override; |
66 uint8_t* encoded) override; | |
67 void Reset() override; | 66 void Reset() override; |
68 | 67 |
69 private: | 68 private: |
70 // This value is taken from STREAM_SIZE_MAX_60 for iSAC float (60 ms) and | 69 // This value is taken from STREAM_SIZE_MAX_60 for iSAC float (60 ms) and |
71 // STREAM_MAXW16_60MS for iSAC fix (60 ms). | 70 // STREAM_MAXW16_60MS for iSAC fix (60 ms). |
72 static const size_t kSufficientEncodeBufferSizeBytes = 400; | 71 static const size_t kSufficientEncodeBufferSizeBytes = 400; |
73 | 72 |
74 static const int kDefaultBitRate = 32000; | 73 static const int kDefaultBitRate = 32000; |
75 | 74 |
76 // Recreate the iSAC encoder instance with the given settings, and save them. | 75 // Recreate the iSAC encoder instance with the given settings, and save them. |
(...skipping 11 matching lines...) Expand all Loading... |
88 | 87 |
89 // Timestamp of the previously encoded packet. | 88 // Timestamp of the previously encoded packet. |
90 uint32_t last_encoded_timestamp_; | 89 uint32_t last_encoded_timestamp_; |
91 | 90 |
92 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT); | 91 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderIsacT); |
93 }; | 92 }; |
94 | 93 |
95 } // namespace webrtc | 94 } // namespace webrtc |
96 | 95 |
97 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_ | 96 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_AUDIO_ENCODER_ISAC_T_H_ |
OLD | NEW |