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

Unified Diff: webrtc/audio/audio_send_stream.h

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Channel::GetSendCodec asks both its acm and its codec manager. 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/audio/audio_send_stream.h
diff --git a/webrtc/audio/audio_send_stream.h b/webrtc/audio/audio_send_stream.h
index 567799c336f7bbaba1436a323148fce71f0f1329..56e099fb15a05d6cfc816be6f521890ef5b5878f 100644
--- a/webrtc/audio/audio_send_stream.h
+++ b/webrtc/audio/audio_send_stream.h
@@ -48,6 +48,8 @@ class AudioSendStream final : public webrtc::AudioSendStream,
~AudioSendStream() override;
// webrtc::AudioSendStream implementation.
+ void Reconfigure(const webrtc::AudioSendStream::Config& config) override;
+
void Start() override;
void Stop() override;
bool SendTelephoneEvent(int payload_type, int payload_frequency, int event,
@@ -75,14 +77,29 @@ class AudioSendStream final : public webrtc::AudioSendStream,
private:
VoiceEngine* voice_engine() const;
- bool SetupSendCodec();
+ // These are all static to make it less likely that (the old) config_ is
+ // accessed unintentionally.
+ static void ConfigureStream(AudioSendStream* stream,
+ const Config& new_config,
+ bool first_time);
+ static bool SetupSendCodec(AudioSendStream* stream, const Config& new_config);
+ static bool ReconfigureSendCodec(AudioSendStream* stream,
+ const Config& new_config);
+ static void ReconfigureANA(AudioSendStream* stream, const Config& new_config);
+ static void ReconfigureCNG(AudioSendStream* stream, const Config& new_config);
+ static void ReconfigureBitrateObserver(AudioSendStream* stream,
+ const Config& new_config);
+
+ void ConfigureBitrateObserver(int min_bitrate_bps, int max_bitrate_bps);
+ void RemoveBitrateObserver();
rtc::ThreadChecker worker_thread_checker_;
rtc::ThreadChecker pacer_thread_checker_;
rtc::TaskQueue* worker_queue_;
- const webrtc::AudioSendStream::Config config_;
+ webrtc::AudioSendStream::Config config_;
rtc::scoped_refptr<webrtc::AudioState> audio_state_;
std::unique_ptr<voe::ChannelProxy> channel_proxy_;
+ RtcEventLog* const event_log_;
BitrateAllocator* const bitrate_allocator_;
RtpTransportControllerSendInterface* const transport_;

Powered by Google App Engine
This is Rietveld 408576698