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

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

Issue 1967503002: Audio codec usage statistics (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // Getters for testing. 76 // Getters for testing.
77 double packet_loss_rate() const { return packet_loss_rate_; } 77 double packet_loss_rate() const { return packet_loss_rate_; }
78 ApplicationMode application() const { return config_.application; } 78 ApplicationMode application() const { return config_.application; }
79 bool dtx_enabled() const { return config_.dtx_enabled; } 79 bool dtx_enabled() const { return config_.dtx_enabled; }
80 80
81 protected: 81 protected:
82 EncodedInfo EncodeImpl(uint32_t rtp_timestamp, 82 EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
83 rtc::ArrayView<const int16_t> audio, 83 rtc::ArrayView<const int16_t> audio,
84 rtc::Buffer* encoded) override; 84 rtc::Buffer* encoded) override;
85 const char* GetCodecName() const override;
85 86
86 private: 87 private:
87 size_t Num10msFramesPerPacket() const; 88 size_t Num10msFramesPerPacket() const;
88 size_t SamplesPer10msFrame() const; 89 size_t SamplesPer10msFrame() const;
89 size_t SufficientOutputBufferSize() const; 90 size_t SufficientOutputBufferSize() const;
90 bool RecreateEncoderInstance(const Config& config); 91 bool RecreateEncoderInstance(const Config& config);
91 92
92 Config config_; 93 Config config_;
93 double packet_loss_rate_; 94 double packet_loss_rate_;
94 std::vector<int16_t> input_buffer_; 95 std::vector<int16_t> input_buffer_;
95 OpusEncInst* inst_; 96 OpusEncInst* inst_;
96 uint32_t first_timestamp_in_buffer_; 97 uint32_t first_timestamp_in_buffer_;
97 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus); 98 RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderOpus);
98 }; 99 };
99 100
100 } // namespace webrtc 101 } // namespace webrtc
101 102
102 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_ 103 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_OPUS_AUDIO_ENCODER_OPUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698