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

Unified Diff: webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h

Issue 2695243005: Injectable audio encoders: BuiltinAudioEncoderFactory (Closed)
Patch Set: Fix build problems on Windows, Android and downstream. Created 3 years, 8 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/g711/audio_encoder_pcm.h
diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
index 721344528f8b2e7bb801cbf2cdc2df2faceadaba..a98d2daa2421eff452a45b78945b47a8f00ad501 100644
--- a/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
+++ b/webrtc/modules/audio_coding/codecs/g711/audio_encoder_pcm.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "webrtc/api/audio_codecs/audio_format.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
@@ -80,6 +81,11 @@ class AudioEncoderPcmA final : public AudioEncoderPcm {
explicit AudioEncoderPcmA(const Config& config)
: AudioEncoderPcm(config, kSampleRateHz) {}
explicit AudioEncoderPcmA(const CodecInst& codec_inst);
+ AudioEncoderPcmA(int payload_type, const SdpAudioFormat& format);
+
+ static constexpr const char* GetPayloadName() { return "pcma"; }
+ static rtc::Optional<AudioCodecInfo> QueryAudioEncoder(
+ const SdpAudioFormat& format);
protected:
size_t EncodeCall(const int16_t* audio,
@@ -104,6 +110,11 @@ class AudioEncoderPcmU final : public AudioEncoderPcm {
explicit AudioEncoderPcmU(const Config& config)
: AudioEncoderPcm(config, kSampleRateHz) {}
explicit AudioEncoderPcmU(const CodecInst& codec_inst);
+ AudioEncoderPcmU(int payload_type, const SdpAudioFormat& format);
+
+ static constexpr const char* GetPayloadName() { return "pcmu"; }
+ static rtc::Optional<AudioCodecInfo> QueryAudioEncoder(
+ const SdpAudioFormat& format);
protected:
size_t EncodeCall(const int16_t* audio,

Powered by Google App Engine
This is Rietveld 408576698