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

Side by Side Diff: webrtc/modules/audio_coding/codecs/audio_encoder.h

Issue 1184313002: Add AudioEncoder::GetTargetBitrate (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing GN compile Created 5 years, 6 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
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/audio_encoder_mutable_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // packet. This value may only change when Encode() outputs a packet; i.e., 89 // packet. This value may only change when Encode() outputs a packet; i.e.,
90 // the encoder may vary the number of 10 ms frames from packet to packet, but 90 // the encoder may vary the number of 10 ms frames from packet to packet, but
91 // it must decide the length of the next packet no later than when outputting 91 // it must decide the length of the next packet no later than when outputting
92 // the preceding packet. 92 // the preceding packet.
93 virtual int Num10MsFramesInNextPacket() const = 0; 93 virtual int Num10MsFramesInNextPacket() const = 0;
94 94
95 // Returns the maximum value that can be returned by 95 // Returns the maximum value that can be returned by
96 // Num10MsFramesInNextPacket(). 96 // Num10MsFramesInNextPacket().
97 virtual int Max10MsFramesInAPacket() const = 0; 97 virtual int Max10MsFramesInAPacket() const = 0;
98 98
99 // Returns the current target bitrate in bits/s. The value -1 means that the
100 // codec adapts the target automatically, and a current target cannot be
101 // provided.
102 virtual int GetTargetBitrate() const = 0;
103
99 // Changes the target bitrate. The implementation is free to alter this value, 104 // Changes the target bitrate. The implementation is free to alter this value,
100 // e.g., if the desired value is outside the valid range. 105 // e.g., if the desired value is outside the valid range.
101 virtual void SetTargetBitrate(int bits_per_second) {} 106 virtual void SetTargetBitrate(int bits_per_second) {}
102 107
103 // Tells the implementation what the projected packet loss rate is. The rate 108 // Tells the implementation what the projected packet loss rate is. The rate
104 // is in the range [0.0, 1.0]. This rate is typically used to adjust channel 109 // is in the range [0.0, 1.0]. This rate is typically used to adjust channel
105 // coding efforts, such as FEC. 110 // coding efforts, such as FEC.
106 virtual void SetProjectedPacketLossRate(double fraction) {} 111 virtual void SetProjectedPacketLossRate(double fraction) {}
107 112
108 // This is the encode function that the inherited classes must implement. It 113 // This is the encode function that the inherited classes must implement. It
(...skipping 29 matching lines...) Expand all
138 // Sets the maximum rate which the codec may not exceed for any packet. 143 // Sets the maximum rate which the codec may not exceed for any packet.
139 virtual void SetMaxRate(int max_rate_bps) = 0; 144 virtual void SetMaxRate(int max_rate_bps) = 0;
140 145
141 // Informs the encoder about the maximum sample rate which the decoder will 146 // Informs the encoder about the maximum sample rate which the decoder will
142 // use when decoding the bitstream. The implementation is free to disregard 147 // use when decoding the bitstream. The implementation is free to disregard
143 // this hint. 148 // this hint.
144 virtual bool SetMaxPlaybackRate(int frequency_hz) = 0; 149 virtual bool SetMaxPlaybackRate(int frequency_hz) = 0;
145 }; 150 };
146 } // namespace webrtc 151 } // namespace webrtc
147 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ 152 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/codecs/audio_encoder_mutable_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698