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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 encoded.data()); | 96 encoded.data()); |
97 }); | 97 }); |
98 speech_buffer_.clear(); | 98 speech_buffer_.clear(); |
99 return info; | 99 return info; |
100 } | 100 } |
101 | 101 |
102 void AudioEncoderPcm::Reset() { | 102 void AudioEncoderPcm::Reset() { |
103 speech_buffer_.clear(); | 103 speech_buffer_.clear(); |
104 } | 104 } |
105 | 105 |
106 const char* AudioEncoderPcm::GetCodecName() const { | |
107 return "g711"; | |
hlundin-webrtc
2016/05/11 08:27:26
Must distinguish between types "A" and "U".
aleloi
2016/05/11 11:16:13
Acknowledged.
| |
108 } | |
109 | |
106 AudioEncoderPcmA::AudioEncoderPcmA(const CodecInst& codec_inst) | 110 AudioEncoderPcmA::AudioEncoderPcmA(const CodecInst& codec_inst) |
107 : AudioEncoderPcmA(CreateConfig<AudioEncoderPcmA>(codec_inst)) {} | 111 : AudioEncoderPcmA(CreateConfig<AudioEncoderPcmA>(codec_inst)) {} |
108 | 112 |
109 size_t AudioEncoderPcmA::EncodeCall(const int16_t* audio, | 113 size_t AudioEncoderPcmA::EncodeCall(const int16_t* audio, |
110 size_t input_len, | 114 size_t input_len, |
111 uint8_t* encoded) { | 115 uint8_t* encoded) { |
112 return WebRtcG711_EncodeA(audio, input_len, encoded); | 116 return WebRtcG711_EncodeA(audio, input_len, encoded); |
113 } | 117 } |
114 | 118 |
115 size_t AudioEncoderPcmA::BytesPerSample() const { | 119 size_t AudioEncoderPcmA::BytesPerSample() const { |
116 return 1; | 120 return 1; |
117 } | 121 } |
118 | 122 |
119 AudioEncoderPcmU::AudioEncoderPcmU(const CodecInst& codec_inst) | 123 AudioEncoderPcmU::AudioEncoderPcmU(const CodecInst& codec_inst) |
120 : AudioEncoderPcmU(CreateConfig<AudioEncoderPcmU>(codec_inst)) {} | 124 : AudioEncoderPcmU(CreateConfig<AudioEncoderPcmU>(codec_inst)) {} |
121 | 125 |
122 size_t AudioEncoderPcmU::EncodeCall(const int16_t* audio, | 126 size_t AudioEncoderPcmU::EncodeCall(const int16_t* audio, |
123 size_t input_len, | 127 size_t input_len, |
124 uint8_t* encoded) { | 128 uint8_t* encoded) { |
125 return WebRtcG711_EncodeU(audio, input_len, encoded); | 129 return WebRtcG711_EncodeU(audio, input_len, encoded); |
126 } | 130 } |
127 | 131 |
128 size_t AudioEncoderPcmU::BytesPerSample() const { | 132 size_t AudioEncoderPcmU::BytesPerSample() const { |
129 return 1; | 133 return 1; |
130 } | 134 } |
131 | 135 |
132 } // namespace webrtc | 136 } // namespace webrtc |
OLD | NEW |