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

Side by Side Diff: webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h

Issue 1534193008: Misc. small cleanups (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Unnecessary parens Created 4 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void SetMaxPlaybackRate(int frequency_hz) override; 78 void SetMaxPlaybackRate(int frequency_hz) override;
79 void SetProjectedPacketLossRate(double fraction) override; 79 void SetProjectedPacketLossRate(double fraction) override;
80 void SetTargetBitrate(int target_bps) override; 80 void SetTargetBitrate(int target_bps) override;
81 81
82 // Getters for testing. 82 // Getters for testing.
83 double packet_loss_rate() const { return packet_loss_rate_; } 83 double packet_loss_rate() const { return packet_loss_rate_; }
84 ApplicationMode application() const { return config_.application; } 84 ApplicationMode application() const { return config_.application; }
85 bool dtx_enabled() const { return config_.dtx_enabled; } 85 bool dtx_enabled() const { return config_.dtx_enabled; }
86 86
87 private: 87 private:
88 int Num10msFramesPerPacket() const; 88 size_t Num10msFramesPerPacket() const;
89 int SamplesPer10msFrame() const; 89 size_t SamplesPer10msFrame() const;
90 bool RecreateEncoderInstance(const Config& config); 90 bool RecreateEncoderInstance(const Config& config);
91 91
92 Config config_; 92 Config config_;
93 double packet_loss_rate_; 93 double packet_loss_rate_;
94 std::vector<int16_t> input_buffer_; 94 std::vector<int16_t> input_buffer_;
95 OpusEncInst* inst_; 95 OpusEncInst* inst_;
96 uint32_t first_timestamp_in_buffer_; 96 uint32_t first_timestamp_in_buffer_;
97 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); 97 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus);
98 }; 98 };
99 99
100 } // namespace webrtc 100 } // namespace webrtc
101 101
102 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ 102 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698