AudioEncoder: change Encode and EncodeInternal return type to void
After code cleanup done on issues: https://webrtc-codereview.appspot.com/34259004/ https://webrtc-codereview.appspot.com/43409004/ https://webrtc-codereview.appspot.com/34309004/ https://webrtc-codereview.appspot.com/34309004/ https://webrtc-codereview.appspot.com/36209004/ https://webrtc-codereview.appspot.com/40899004/ https://webrtc-codereview.appspot.com/39279004/ https://webrtc-codereview.appspot.com/42099005/ and the similar work done for AudioEncoderDecoderIsacT, methods AudioEncoder::Encode and AudioEncoder::EncodeInternal will always succeed. Therefore, there is no need for them to return bool value that represents success or failure. R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/38279004 Cr-Commit-Position: refs/heads/master@{#8518} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8518 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -19,7 +19,7 @@ AudioEncoder::EncodedInfo::EncodedInfo() : EncodedInfoLeaf() {
|
||||
AudioEncoder::EncodedInfo::~EncodedInfo() {
|
||||
}
|
||||
|
||||
bool AudioEncoder::Encode(uint32_t rtp_timestamp,
|
||||
void AudioEncoder::Encode(uint32_t rtp_timestamp,
|
||||
const int16_t* audio,
|
||||
size_t num_samples_per_channel,
|
||||
size_t max_encoded_bytes,
|
||||
@ -27,10 +27,8 @@ bool AudioEncoder::Encode(uint32_t rtp_timestamp,
|
||||
EncodedInfo* info) {
|
||||
CHECK_EQ(num_samples_per_channel,
|
||||
static_cast<size_t>(SampleRateHz() / 100));
|
||||
bool ret =
|
||||
EncodeInternal(rtp_timestamp, audio, max_encoded_bytes, encoded, info);
|
||||
EncodeInternal(rtp_timestamp, audio, max_encoded_bytes, encoded, info);
|
||||
CHECK_LE(info->encoded_bytes, max_encoded_bytes);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int AudioEncoder::RtpTimestampRateHz() const {
|
||||
|
||||
Reference in New Issue
Block a user