Moving encoded_bytes into EncodedInfo

BUG=3926
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7883 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2014-12-12 13:31:24 +00:00
parent c8bc717905
commit 3b79daff14
16 changed files with 53 additions and 69 deletions

View File

@ -82,7 +82,6 @@ bool AudioEncoderOpus::EncodeInternal(uint32_t timestamp,
const int16_t* audio,
size_t max_encoded_bytes,
uint8_t* encoded,
size_t* encoded_bytes,
EncodedInfo* info) {
if (input_buffer_.empty())
first_timestamp_in_buffer_ = timestamp;
@ -90,7 +89,7 @@ bool AudioEncoderOpus::EncodeInternal(uint32_t timestamp,
audio + samples_per_10ms_frame_);
if (input_buffer_.size() < (static_cast<size_t>(num_10ms_frames_per_packet_) *
samples_per_10ms_frame_)) {
*encoded_bytes = 0;
info->encoded_bytes = 0;
return true;
}
CHECK_EQ(input_buffer_.size(),
@ -103,7 +102,7 @@ bool AudioEncoderOpus::EncodeInternal(uint32_t timestamp,
input_buffer_.clear();
if (r < 0)
return false;
*encoded_bytes = r;
info->encoded_bytes = r;
info->encoded_timestamp = first_timestamp_in_buffer_;
info->payload_type = payload_type_;
return true;

View File

@ -41,7 +41,6 @@ class AudioEncoderOpus : public AudioEncoder {
const int16_t* audio,
size_t max_encoded_bytes,
uint8_t* encoded,
size_t* encoded_bytes,
EncodedInfo* info) OVERRIDE;
private: