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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 | 83 |
84 // Returns the rate with which the RTP timestamps are updated. By default, | 84 // Returns the rate with which the RTP timestamps are updated. By default, |
85 // this is the same as sample_rate_hz(). | 85 // this is the same as sample_rate_hz(). |
86 virtual int RtpTimestampRateHz() const; | 86 virtual int RtpTimestampRateHz() const; |
87 | 87 |
88 // Returns the number of 10 ms frames the encoder will put in the next | 88 // Returns the number of 10 ms frames the encoder will put in the next |
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 size_t 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 size_t Max10MsFramesInAPacket() const = 0; |
98 | 98 |
99 // Returns the current target bitrate in bits/s. The value -1 means that the | 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 | 100 // codec adapts the target automatically, and a current target cannot be |
101 // provided. | 101 // provided. |
102 virtual int GetTargetBitrate() const = 0; | 102 virtual int GetTargetBitrate() const = 0; |
103 | 103 |
104 // 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, |
105 // e.g., if the desired value is outside the valid range. | 105 // e.g., if the desired value is outside the valid range. |
106 virtual void SetTargetBitrate(int bits_per_second) {} | 106 virtual void SetTargetBitrate(int bits_per_second) {} |
107 | 107 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // 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. |
144 virtual void SetMaxRate(int max_rate_bps) = 0; | 144 virtual void SetMaxRate(int max_rate_bps) = 0; |
145 | 145 |
146 // 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 |
147 // use when decoding the bitstream. The implementation is free to disregard | 147 // use when decoding the bitstream. The implementation is free to disregard |
148 // this hint. | 148 // this hint. |
149 virtual bool SetMaxPlaybackRate(int frequency_hz) = 0; | 149 virtual bool SetMaxPlaybackRate(int frequency_hz) = 0; |
150 }; | 150 }; |
151 } // namespace webrtc | 151 } // namespace webrtc |
152 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ | 152 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ |
OLD | NEW |