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

Side by Side Diff: webrtc/modules/audio_coding/codecs/ilbc/audio_encoder_ilbc.cc

Issue 1883543002: Revert of Remove the deprecated EncodeInternal interface from AudioEncoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
59 int AudioEncoderIlbc::SampleRateHz() const { 63 int AudioEncoderIlbc::SampleRateHz() const {
60 return kSampleRateHz; 64 return kSampleRateHz;
61 } 65 }
62 66
63 size_t AudioEncoderIlbc::NumChannels() const { 67 size_t AudioEncoderIlbc::NumChannels() const {
64 return 1; 68 return 1;
65 } 69 }
66 70
67 size_t AudioEncoderIlbc::Num10MsFramesInNextPacket() const { 71 size_t AudioEncoderIlbc::Num10MsFramesInNextPacket() const {
68 return num_10ms_frames_per_packet_; 72 return num_10ms_frames_per_packet_;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 switch (num_10ms_frames_per_packet_) { 150 switch (num_10ms_frames_per_packet_) {
147 case 2: return 38; 151 case 2: return 38;
148 case 3: return 50; 152 case 3: return 50;
149 case 4: return 2 * 38; 153 case 4: return 2 * 38;
150 case 6: return 2 * 50; 154 case 6: return 2 * 50;
151 default: FATAL(); 155 default: FATAL();
152 } 156 }
153 } 157 }
154 158
155 } // namespace webrtc 159 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698