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

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

Issue 2429503002: Simplifying audio network adaptor by moving receiver frame length range to ctor. (Closed)
Patch Set: do not touch ACM/VoE Created 4 years, 2 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/audio_encoder_opus.h
diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
index 342668e78002976165d3d453256cc321680fb606..f7a364bf7d7893a01e251aea7e55f57f847b313e 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
@@ -49,6 +49,7 @@ class AudioEncoderOpus final : public AudioEncoder {
int max_playback_rate_hz = 48000;
int complexity = kDefaultComplexity;
bool dtx_enabled = false;
+ std::vector<int> supported_frame_lengths_ms;
const Clock* clock = nullptr;
private:
@@ -102,6 +103,9 @@ class AudioEncoderOpus final : public AudioEncoder {
void OnReceivedRtt(int rtt_ms) override;
void SetReceiverFrameLengthRange(int min_frame_length_ms,
int max_frame_length_ms) override;
+ const std::vector<int>& supported_frame_lengths_ms() const {
kwiberg-webrtc 2016/10/19 09:12:01 Again, I wonder if the return type here shouldn't
minyue-webrtc 2016/10/19 09:25:54 if config_.supported_frame_lengths_ms is a vector,
kwiberg-webrtc 2016/10/19 10:43:33 No, but there are also no disadvantages. And the A
minyue-webrtc 2016/10/21 08:26:29 ok, yes, changed to rtc::ArrayView. Thanks for the
+ return config_.supported_frame_lengths_ms;
+ }
// Getters for testing.
double packet_loss_rate() const { return packet_loss_rate_; }

Powered by Google App Engine
This is Rietveld 408576698