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

Unified Diff: webrtc/audio/audio_send_stream.h

Issue 2546493002: Update smoothed bitrate. (Closed)
Patch Set: Response to comments Created 4 years 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
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream.cc » ('j') | webrtc/audio/audio_send_stream.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream.h
diff --git a/webrtc/audio/audio_send_stream.h b/webrtc/audio/audio_send_stream.h
index de1cf82d80883cad6b682b0587287940dfae0d16..e53cab6c320227101dd01c52c81b985f8fcfd0f0 100644
--- a/webrtc/audio/audio_send_stream.h
+++ b/webrtc/audio/audio_send_stream.h
@@ -14,9 +14,11 @@
#include <memory>
#include "webrtc/base/constructormagic.h"
+#include "webrtc/base/onetimeevent.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/call/audio_send_stream.h"
#include "webrtc/call/audio_state.h"
+#include "webrtc/base/weak_ptr.h"
#include "webrtc/call/bitrate_allocator.h"
namespace webrtc {
@@ -65,9 +67,12 @@ class AudioSendStream final : public webrtc::AudioSendStream,
void SetTransportOverhead(int transport_overhead_per_packet);
private:
+ class AdaptCodecTask;
+
VoiceEngine* voice_engine() const;
bool SetupSendCodec();
+ void AdaptCodec();
rtc::ThreadChecker thread_checker_;
rtc::TaskQueue* worker_queue_;
@@ -76,6 +81,10 @@ class AudioSendStream final : public webrtc::AudioSendStream,
std::unique_ptr<voe::ChannelProxy> channel_proxy_;
BitrateAllocator* const bitrate_allocator_;
+ bool adapt_codec_task_started_;
+
+ rtc::WeakPtr<AudioSendStream> audio_send_stream_for_adapt_codec_task_;
+ std::unique_ptr<rtc::WeakPtrFactory<AudioSendStream>> weak_ptr_factory_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
};
« no previous file with comments | « no previous file | webrtc/audio/audio_send_stream.cc » ('j') | webrtc/audio/audio_send_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698