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

Unified Diff: remoting/client/plugin/pepper_audio_player.h

Issue 10914210: Limit audio buffer size in the audio player used by the chromoting client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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: remoting/client/plugin/pepper_audio_player.h
diff --git a/remoting/client/plugin/pepper_audio_player.h b/remoting/client/plugin/pepper_audio_player.h
index ad7c53dc687be3cc1b9136e65eb414c9dc75b9ca..2a0cf7577bf067d3c734f6ccd8ab526711fca674 100644
--- a/remoting/client/plugin/pepper_audio_player.h
+++ b/remoting/client/plugin/pepper_audio_player.h
@@ -48,18 +48,19 @@ class PepperAudioPlayer : public AudioPlayer {
// The count of sample frames per channel in an audio buffer.
uint32_t samples_per_frame_;
- // Protects |queued_packets_| and |bytes_consumed_|.
- // This is necessary to prevent races,
- // because Pepper will callback on a separate thread.
+ bool start_failed_;
+
+ // Protects |queued_packets_|, |queued_samples_ and |bytes_consumed_|. This is
+ // necessary to prevent races, because Pepper will call the callback on a
+ // separate thread.
base::Lock lock_;
AudioPacketQueue queued_packets_;
+ int queued_samples_;
// The number of bytes from |queued_packets_| that have been consumed.
size_t bytes_consumed_;
- bool start_failed_;
-
DISALLOW_COPY_AND_ASSIGN(PepperAudioPlayer);
};
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_audio_player.cc » ('j') | remoting/client/plugin/pepper_audio_player.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698