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

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

Issue 1725143003: Changed AudioEncoder::Encode to take an rtc::Buffer* instead of uint8_t* and a maximum size. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added more fixes for override hiding in AudioEncoder implementations. Created 4 years, 10 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 59c8f796eea777b9b94fe65e368c00677d46df84..343acd7bd0464ed883473ee001bcf1d1604a0730 100644
--- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
+++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h
@@ -23,6 +23,8 @@ struct CodecInst;
class AudioEncoderOpus final : public AudioEncoder {
public:
+ using AudioEncoder::EncodeInternal;
+
enum ApplicationMode {
kVoip = 0,
kAudio = 1,
@@ -61,11 +63,6 @@ class AudioEncoderOpus final : public AudioEncoder {
size_t Max10MsFramesInAPacket() const override;
int GetTargetBitrate() const override;
- EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
- rtc::ArrayView<const int16_t> audio,
- size_t max_encoded_bytes,
- uint8_t* encoded) override;
-
void Reset() override;
bool SetFec(bool enable) override;
@@ -84,6 +81,11 @@ class AudioEncoderOpus final : public AudioEncoder {
ApplicationMode application() const { return config_.application; }
bool dtx_enabled() const { return config_.dtx_enabled; }
+protected:
+ EncodedInfo EncodeInternal(uint32_t rtp_timestamp,
+ rtc::ArrayView<const int16_t> audio,
+ rtc::Buffer* encoded) override;
+
private:
size_t Num10msFramesPerPacket() const;
size_t SamplesPer10msFrame() const;

Powered by Google App Engine
This is Rietveld 408576698