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

Unified Diff: webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h

Issue 1673213002: AudioCodingModule: Add methods for injecting external encoder stacks (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Total rebase of the heart Created 4 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/acm2/audio_coding_module_impl.h
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
index 195ec28deaadac325b51d60edbeacbf341b3bc4f..e463d29f9b53dddf3e94d5804371d2594b8d5583 100644
--- a/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
+++ b/webrtc/modules/audio_coding/acm2/audio_coding_module_impl.h
@@ -49,6 +49,9 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
void RegisterExternalSendCodec(
AudioEncoder* external_speech_encoder) override;
+ void ModifyEncoder(
+ FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) override;
+
// Get current send codec.
rtc::Optional<CodecInst> SendCodec() const override;
@@ -119,9 +122,10 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
// Get current playout frequency.
int PlayoutFrequency() const override;
- // Register possible receive codecs, can be called multiple times,
- // for codecs, CNG, DTMF, RED.
int RegisterReceiveCodec(const CodecInst& receive_codec) override;
+ int RegisterReceiveCodec(
+ const CodecInst& receive_codec,
+ FunctionView<std::unique_ptr<AudioDecoder>()> isac_factory) override;
int RegisterExternalReceiveCodec(int rtp_payload_type,
AudioDecoder* external_decoder,
@@ -213,6 +217,11 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
const std::string histogram_name_;
};
+ int RegisterReceiveCodecUnlocked(
+ const CodecInst& codec,
+ FunctionView<std::unique_ptr<AudioDecoder>()> isac_factory)
+ EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_);
+
int Add10MsDataInternal(const AudioFrame& audio_frame, InputData* input_data)
EXCLUSIVE_LOCKS_REQUIRED(acm_crit_sect_);
int Encode(const InputData& input_data)
@@ -258,6 +267,8 @@ class AudioCodingModuleImpl final : public AudioCodingModule {
// RegisterEncoder.
std::unique_ptr<AudioEncoder> encoder_stack_ GUARDED_BY(acm_crit_sect_);
+ std::unique_ptr<AudioDecoder> isac_decoder_ GUARDED_BY(acm_crit_sect_);
+
// This is to keep track of CN instances where we can send DTMFs.
uint8_t previous_pltype_ GUARDED_BY(acm_crit_sect_);

Powered by Google App Engine
This is Rietveld 408576698