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

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

Issue 2528933002: Adding OnReceivedOverhead to AudioEncoder. (Closed)
Patch Set: adding static_cast Created 4 years 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool SetApplication(Application application) override; 103 bool SetApplication(Application application) override;
104 void SetMaxPlaybackRate(int frequency_hz) override; 104 void SetMaxPlaybackRate(int frequency_hz) override;
105 bool EnableAudioNetworkAdaptor(const std::string& config_string, 105 bool EnableAudioNetworkAdaptor(const std::string& config_string,
106 const Clock* clock) override; 106 const Clock* clock) override;
107 void DisableAudioNetworkAdaptor() override; 107 void DisableAudioNetworkAdaptor() override;
108 void OnReceivedUplinkBandwidth(int uplink_bandwidth_bps) override; 108 void OnReceivedUplinkBandwidth(int uplink_bandwidth_bps) override;
109 void OnReceivedUplinkPacketLossFraction( 109 void OnReceivedUplinkPacketLossFraction(
110 float uplink_packet_loss_fraction) override; 110 float uplink_packet_loss_fraction) override;
111 void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps) override; 111 void OnReceivedTargetAudioBitrate(int target_audio_bitrate_bps) override;
112 void OnReceivedRtt(int rtt_ms) override; 112 void OnReceivedRtt(int rtt_ms) override;
113 void OnReceivedOverhead(size_t overhead_bytes_per_packet) override;
113 void SetReceiverFrameLengthRange(int min_frame_length_ms, 114 void SetReceiverFrameLengthRange(int min_frame_length_ms,
114 int max_frame_length_ms) override; 115 int max_frame_length_ms) override;
115 rtc::ArrayView<const int> supported_frame_lengths_ms() const { 116 rtc::ArrayView<const int> supported_frame_lengths_ms() const {
116 return config_.supported_frame_lengths_ms; 117 return config_.supported_frame_lengths_ms;
117 } 118 }
118 119
119 // Getters for testing. 120 // Getters for testing.
120 float packet_loss_rate() const { return packet_loss_rate_; } 121 float packet_loss_rate() const { return packet_loss_rate_; }
121 ApplicationMode application() const { return config_.application; } 122 ApplicationMode application() const { return config_.application; }
122 bool fec_enabled() const { return config_.fec_enabled; } 123 bool fec_enabled() const { return config_.fec_enabled; }
(...skipping 29 matching lines...) Expand all
152 float packet_loss_rate_; 153 float packet_loss_rate_;
153 std::vector<int16_t> input_buffer_; 154 std::vector<int16_t> input_buffer_;
154 OpusEncInst* inst_; 155 OpusEncInst* inst_;
155 uint32_t first_timestamp_in_buffer_; 156 uint32_t first_timestamp_in_buffer_;
156 size_t num_channels_to_encode_; 157 size_t num_channels_to_encode_;
157 int next_frame_length_ms_; 158 int next_frame_length_ms_;
158 int complexity_; 159 int complexity_;
159 std::unique_ptr<PacketLossFractionSmoother> packet_loss_fraction_smoother_; 160 std::unique_ptr<PacketLossFractionSmoother> packet_loss_fraction_smoother_;
160 AudioNetworkAdaptorCreator audio_network_adaptor_creator_; 161 AudioNetworkAdaptorCreator audio_network_adaptor_creator_;
161 std::unique_ptr<AudioNetworkAdaptor> audio_network_adaptor_; 162 std::unique_ptr<AudioNetworkAdaptor> audio_network_adaptor_;
163 rtc::Optional<size_t> overhead_bytes_per_packet_;
162 164
163 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); 165 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus);
164 }; 166 };
165 167
166 } // namespace webrtc 168 } // namespace webrtc
167 169
168 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ 170 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/codecs/audio_encoder.cc ('k') | webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698