Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Unified Diff: webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h

Issue 1225173002: Update audio code to use size_t more correctly, (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Review comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
diff --git a/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
index 3393bd516d35a355880803530e379ad75788887d..5fab599fe1ae42e749fb5aa490612e42433bf36d 100644
--- a/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/interface/audio_encoder_opus.h
@@ -50,8 +50,8 @@ class AudioEncoderOpus final : public AudioEncoder {
int SampleRateHz() const override;
int NumChannels() const override;
size_t MaxEncodedBytes() const override;
- int Num10MsFramesInNextPacket() const override;
- int Max10MsFramesInAPacket() const override;
+ size_t Num10MsFramesInNextPacket() const override;
+ size_t Max10MsFramesInAPacket() const override;
int GetTargetBitrate() const override;
void SetTargetBitrate(int bits_per_second) override;
void SetProjectedPacketLossRate(double fraction) override;
@@ -66,13 +66,13 @@ class AudioEncoderOpus final : public AudioEncoder {
uint8_t* encoded) override;
private:
- const int num_10ms_frames_per_packet_;
+ const size_t num_10ms_frames_per_packet_;
const int num_channels_;
const int payload_type_;
const ApplicationMode application_;
int bitrate_bps_;
const bool dtx_enabled_;
- const int samples_per_10ms_frame_;
+ const size_t samples_per_10ms_frame_;
std::vector<int16_t> input_buffer_;
OpusEncInst* inst_;
uint32_t first_timestamp_in_buffer_;

Powered by Google App Engine
This is Rietveld 408576698