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

Side by Side Diff: webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 3 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 23 matching lines...) Expand all
34 } 34 }
35 35
36 int AudioEncoderCopyRed::NumChannels() const { 36 int AudioEncoderCopyRed::NumChannels() const {
37 return speech_encoder_->NumChannels(); 37 return speech_encoder_->NumChannels();
38 } 38 }
39 39
40 size_t AudioEncoderCopyRed::MaxEncodedBytes() const { 40 size_t AudioEncoderCopyRed::MaxEncodedBytes() const {
41 return 2 * speech_encoder_->MaxEncodedBytes(); 41 return 2 * speech_encoder_->MaxEncodedBytes();
42 } 42 }
43 43
44 int AudioEncoderCopyRed::Num10MsFramesInNextPacket() const { 44 size_t AudioEncoderCopyRed::Num10MsFramesInNextPacket() const {
45 return speech_encoder_->Num10MsFramesInNextPacket(); 45 return speech_encoder_->Num10MsFramesInNextPacket();
46 } 46 }
47 47
48 int AudioEncoderCopyRed::Max10MsFramesInAPacket() const { 48 size_t AudioEncoderCopyRed::Max10MsFramesInAPacket() const {
49 return speech_encoder_->Max10MsFramesInAPacket(); 49 return speech_encoder_->Max10MsFramesInAPacket();
50 } 50 }
51 51
52 int AudioEncoderCopyRed::GetTargetBitrate() const { 52 int AudioEncoderCopyRed::GetTargetBitrate() const {
53 return speech_encoder_->GetTargetBitrate(); 53 return speech_encoder_->GetTargetBitrate();
54 } 54 }
55 55
56 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) { 56 void AudioEncoderCopyRed::SetTargetBitrate(int bits_per_second) {
57 speech_encoder_->SetTargetBitrate(bits_per_second); 57 speech_encoder_->SetTargetBitrate(bits_per_second);
58 } 58 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 info.payload_type = red_payload_type_; 97 info.payload_type = red_payload_type_;
98 info.encoded_bytes = 0; 98 info.encoded_bytes = 0;
99 for (std::vector<EncodedInfoLeaf>::const_iterator it = info.redundant.begin(); 99 for (std::vector<EncodedInfoLeaf>::const_iterator it = info.redundant.begin();
100 it != info.redundant.end(); ++it) { 100 it != info.redundant.end(); ++it) {
101 info.encoded_bytes += it->encoded_bytes; 101 info.encoded_bytes += it->encoded_bytes;
102 } 102 }
103 return info; 103 return info;
104 } 104 }
105 105
106 } // namespace webrtc 106 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698