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

Side by Side Diff: remoting/client/audio_player.h

Issue 11697009: Drop audio packets in the chromoting client less agressively. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/client/audio_player.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_AUDIO_PLAYER_H_ 5 #ifndef REMOTING_CLIENT_AUDIO_PLAYER_H_
6 #define REMOTING_CLIENT_AUDIO_PLAYER_H_ 6 #define REMOTING_CLIENT_AUDIO_PLAYER_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 AudioPacket::SamplingRate sampling_rate_; 45 AudioPacket::SamplingRate sampling_rate_;
46 46
47 bool start_failed_; 47 bool start_failed_;
48 48
49 // Protects |queued_packets_|, |queued_samples_ and |bytes_consumed_|. This is 49 // Protects |queued_packets_|, |queued_samples_ and |bytes_consumed_|. This is
50 // necessary to prevent races, because Pepper will call the callback on a 50 // necessary to prevent races, because Pepper will call the callback on a
51 // separate thread. 51 // separate thread.
52 base::Lock lock_; 52 base::Lock lock_;
53 53
54 AudioPacketQueue queued_packets_; 54 AudioPacketQueue queued_packets_;
55 int queued_samples_; 55 int queued_bytes_;
56 56
57 // The number of bytes from |queued_packets_| that have been consumed. 57 // The number of bytes from |queued_packets_| that have been consumed.
58 size_t bytes_consumed_; 58 size_t bytes_consumed_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(AudioPlayer); 60 DISALLOW_COPY_AND_ASSIGN(AudioPlayer);
61 }; 61 };
62 62
63 } // namespace remoting 63 } // namespace remoting
64 64
65 #endif // REMOTING_CLIENT_AUDIO_PLAYER_H_ 65 #endif // REMOTING_CLIENT_AUDIO_PLAYER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/client/audio_player.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698