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

Unified Diff: webrtc/modules/audio_coding/codecs/audio_encoder.h

Issue 2772773002: Adding cbr support for Opus (Closed)
Patch Set: Merge opus dtx and cbr testing. Other review comments adressed as well Created 3 years, 9 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/audio_encoder.h
diff --git a/webrtc/modules/audio_coding/codecs/audio_encoder.h b/webrtc/modules/audio_coding/codecs/audio_encoder.h
index 47152f9eee1ae4f9532186b1ca69f56bcdf36b8f..13197a6d2667ed7acc206ad88181c8f4c463c034 100644
--- a/webrtc/modules/audio_coding/codecs/audio_encoder.h
+++ b/webrtc/modules/audio_coding/codecs/audio_encoder.h
@@ -135,6 +135,16 @@ class AudioEncoder {
// returns false.
virtual bool GetDtx() const;
+ // Enables or disables CBR (constant bitrate mode). Returns
+ // true if the codec was able to comply. The default implementation returns
+ // true when asked to disable CBR and false when asked to enable it (meaning
+ // that CBR isn't supported).
+ virtual bool SetCbr(bool enable);
+
+ // Returns the status of CBR. The default implementation always
+ // returns false.
+ virtual bool GetCbr() const;
+
// Sets the application mode. Returns true if the codec was able to comply.
// The default implementation just returns false.
enum class Application { kSpeech, kAudio };

Powered by Google App Engine
This is Rietveld 408576698