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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 Reset(); | 49 Reset(); |
50 } | 50 } |
51 | 51 |
52 AudioEncoderIlbc::AudioEncoderIlbc(const CodecInst& codec_inst) | 52 AudioEncoderIlbc::AudioEncoderIlbc(const CodecInst& codec_inst) |
53 : AudioEncoderIlbc(CreateConfig(codec_inst)) {} | 53 : AudioEncoderIlbc(CreateConfig(codec_inst)) {} |
54 | 54 |
55 AudioEncoderIlbc::~AudioEncoderIlbc() { | 55 AudioEncoderIlbc::~AudioEncoderIlbc() { |
56 RTC_CHECK_EQ(0, WebRtcIlbcfix_EncoderFree(encoder_)); | 56 RTC_CHECK_EQ(0, WebRtcIlbcfix_EncoderFree(encoder_)); |
57 } | 57 } |
58 | 58 |
59 size_t AudioEncoderIlbc::MaxEncodedBytes() const { | |
60 return RequiredOutputSizeBytes(); | |
61 } | |
62 | |
63 int AudioEncoderIlbc::SampleRateHz() const { | 59 int AudioEncoderIlbc::SampleRateHz() const { |
64 return kSampleRateHz; | 60 return kSampleRateHz; |
65 } | 61 } |
66 | 62 |
67 size_t AudioEncoderIlbc::NumChannels() const { | 63 size_t AudioEncoderIlbc::NumChannels() const { |
68 return 1; | 64 return 1; |
69 } | 65 } |
70 | 66 |
71 size_t AudioEncoderIlbc::Num10MsFramesInNextPacket() const { | 67 size_t AudioEncoderIlbc::Num10MsFramesInNextPacket() const { |
72 return num_10ms_frames_per_packet_; | 68 return num_10ms_frames_per_packet_; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 switch (num_10ms_frames_per_packet_) { | 146 switch (num_10ms_frames_per_packet_) { |
151 case 2: return 38; | 147 case 2: return 38; |
152 case 3: return 50; | 148 case 3: return 50; |
153 case 4: return 2 * 38; | 149 case 4: return 2 * 38; |
154 case 6: return 2 * 50; | 150 case 6: return 2 * 50; |
155 default: FATAL(); | 151 default: FATAL(); |
156 } | 152 } |
157 } | 153 } |
158 | 154 |
159 } // namespace webrtc | 155 } // namespace webrtc |
OLD | NEW |