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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 interleave_buffer_.data()[2 * j + 1]; | 141 interleave_buffer_.data()[2 * j + 1]; |
142 } | 142 } |
143 | 143 |
144 return bytes_to_encode; | 144 return bytes_to_encode; |
145 }); | 145 }); |
146 info.encoded_timestamp = first_timestamp_in_buffer_; | 146 info.encoded_timestamp = first_timestamp_in_buffer_; |
147 info.payload_type = payload_type_; | 147 info.payload_type = payload_type_; |
148 return info; | 148 return info; |
149 } | 149 } |
150 | 150 |
| 151 const char* AudioEncoderG722::GetCodecName() const { |
| 152 return "g722"; |
| 153 } |
| 154 |
151 AudioEncoderG722::EncoderState::EncoderState() { | 155 AudioEncoderG722::EncoderState::EncoderState() { |
152 RTC_CHECK_EQ(0, WebRtcG722_CreateEncoder(&encoder)); | 156 RTC_CHECK_EQ(0, WebRtcG722_CreateEncoder(&encoder)); |
153 } | 157 } |
154 | 158 |
155 AudioEncoderG722::EncoderState::~EncoderState() { | 159 AudioEncoderG722::EncoderState::~EncoderState() { |
156 RTC_CHECK_EQ(0, WebRtcG722_FreeEncoder(encoder)); | 160 RTC_CHECK_EQ(0, WebRtcG722_FreeEncoder(encoder)); |
157 } | 161 } |
158 | 162 |
159 size_t AudioEncoderG722::SamplesPerChannel() const { | 163 size_t AudioEncoderG722::SamplesPerChannel() const { |
160 return kSampleRateHz / 100 * num_10ms_frames_per_packet_; | 164 return kSampleRateHz / 100 * num_10ms_frames_per_packet_; |
161 } | 165 } |
162 | 166 |
163 } // namespace webrtc | 167 } // namespace webrtc |
OLD | NEW |