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:
jmarusic@webrtc.org
2015-02-26 15:38:10 +00:00
parent 00b8f6b364
commit b1f0de30be
22 changed files with 66 additions and 90 deletions

View File

@ -236,9 +236,9 @@ int16_t ACMGenericCodec::Encode(uint8_t* bitstream,
AudioEncoder::EncodedInfo* encoded_info) {
WriteLockScoped wl(codec_wrapper_lock_);
CHECK(!input_.empty());
CHECK(encoder_->Encode(rtp_timestamp_, &input_[0],
input_.size() / encoder_->NumChannels(),
2 * MAX_PAYLOAD_SIZE_BYTE, bitstream, encoded_info));
encoder_->Encode(rtp_timestamp_, &input_[0],
input_.size() / encoder_->NumChannels(),
2 * MAX_PAYLOAD_SIZE_BYTE, bitstream, encoded_info);
input_.clear();
*bitstream_len_byte = static_cast<int16_t>(encoded_info->encoded_bytes);
*timestamp = encoded_info->encoded_timestamp;