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

Unified Diff: remoting/host/audio_pump.h

Issue 914133003: Fix AudioPump to pause the stream when the network is congested. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audio_pump
Patch Set: Created 5 years, 10 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
« no previous file with comments | « remoting/codec/audio_encoder_verbatim.cc ('k') | remoting/host/audio_pump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/audio_pump.h
diff --git a/remoting/host/audio_pump.h b/remoting/host/audio_pump.h
index dcfbd968f753767a57daa12c07aabab6dbcbf20f..bd3cdb5d3214ecf6ec4b54aa8778f0605acf284a 100644
--- a/remoting/host/audio_pump.h
+++ b/remoting/host/audio_pump.h
@@ -32,11 +32,10 @@ class AudioPump {
public:
// The caller must ensure that the |audio_stub| is not destroyed until the
// pump is destroyed.
- AudioPump(
- scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
- scoped_ptr<AudioCapturer> audio_capturer,
- scoped_ptr<AudioEncoder> audio_encoder,
- protocol::AudioStub* audio_stub);
+ AudioPump(scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
+ scoped_ptr<AudioCapturer> audio_capturer,
+ scoped_ptr<AudioEncoder> audio_encoder,
+ protocol::AudioStub* audio_stub);
virtual ~AudioPump();
// Pauses or resumes audio on a running session. This leaves the audio
@@ -48,7 +47,10 @@ class AudioPump {
class Core;
// Called on the network thread to send a captured packet to the audio stub.
- void SendAudioPacket(scoped_ptr<AudioPacket> packet);
+ void SendAudioPacket(scoped_ptr<AudioPacket> packet, int size);
+
+ // Callback for BufferedSocketWriter.
+ void OnPacketSent(int size);
base::ThreadChecker thread_checker_;
« no previous file with comments | « remoting/codec/audio_encoder_verbatim.cc ('k') | remoting/host/audio_pump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698