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

@ -56,7 +56,7 @@ int AudioEncoderIlbc::Max10MsFramesInAPacket() const {
return num_10ms_frames_per_packet_;
}
bool AudioEncoderIlbc::EncodeInternal(uint32_t rtp_timestamp,
void AudioEncoderIlbc::EncodeInternal(uint32_t rtp_timestamp,
const int16_t* audio,
size_t max_encoded_bytes,
uint8_t* encoded,
@ -93,7 +93,7 @@ bool AudioEncoderIlbc::EncodeInternal(uint32_t rtp_timestamp,
// for now.
if (++num_10ms_frames_buffered_ < num_10ms_frames_per_packet_) {
info->encoded_bytes = 0;
return true;
return;
}
// Encode buffered input.
@ -109,7 +109,6 @@ bool AudioEncoderIlbc::EncodeInternal(uint32_t rtp_timestamp,
info->encoded_bytes = output_len;
info->encoded_timestamp = first_timestamp_in_buffer_;
info->payload_type = payload_type_;
return true;
}
} // namespace webrtc

View File

@ -37,7 +37,7 @@ class AudioEncoderIlbc : public AudioEncoder {
virtual int Max10MsFramesInAPacket() const OVERRIDE;
protected:
virtual bool EncodeInternal(uint32_t rtp_timestamp,
virtual void EncodeInternal(uint32_t rtp_timestamp,
const int16_t* audio,
size_t max_encoded_bytes,
uint8_t* encoded,