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

Side by Side Diff: media/audio/cras/cras_input.h

Issue 15563004: Improved AGC update scheme for the audio backend in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More changes based on feedback from tommi@ Created 7 years, 6 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
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 MEDIA_AUDIO_CRAS_CRAS_INPUT_H_ 5 #ifndef MEDIA_AUDIO_CRAS_CRAS_INPUT_H_
6 #define MEDIA_AUDIO_CRAS_CRAS_INPUT_H_ 6 #define MEDIA_AUDIO_CRAS_CRAS_INPUT_H_
7 7
8 #include <cras_client.h> 8 #include <cras_client.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "media/audio/audio_input_stream_impl.h" 15 #include "media/audio/agc_audio_stream.h"
16 #include "media/audio/audio_io.h" 16 #include "media/audio/audio_io.h"
17 #include "media/audio/audio_parameters.h" 17 #include "media/audio/audio_parameters.h"
18 18
19 namespace media { 19 namespace media {
20 20
21 class AudioManagerCras; 21 class AudioManagerCras;
22 22
23 // Provides an input stream for audio capture based on CRAS, the ChromeOS Audio 23 // Provides an input stream for audio capture based on CRAS, the ChromeOS Audio
24 // Server. This object is not thread safe and all methods should be invoked in 24 // Server. This object is not thread safe and all methods should be invoked in
25 // the thread that created the object. 25 // the thread that created the object.
26 class CrasInputStream : public AudioInputStreamImpl { 26 class CrasInputStream : public AgcAudioStream<AudioInputStream> {
27 public: 27 public:
28 // The ctor takes all the usual parameters, plus |manager| which is the 28 // The ctor takes all the usual parameters, plus |manager| which is the
29 // audio manager who is creating this object. 29 // audio manager who is creating this object.
30 CrasInputStream(const AudioParameters& params, AudioManagerCras* manager); 30 CrasInputStream(const AudioParameters& params, AudioManagerCras* manager);
31 31
32 // The dtor is typically called by the AudioManager only and it is usually 32 // The dtor is typically called by the AudioManager only and it is usually
33 // triggered by calling AudioOutputStream::Close(). 33 // triggered by calling AudioOutputStream::Close().
34 virtual ~CrasInputStream(); 34 virtual ~CrasInputStream();
35 35
36 // Implementation of AudioInputStream. 36 // Implementation of AudioInputStream.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // ID of the playing stream. 96 // ID of the playing stream.
97 cras_stream_id_t stream_id_; 97 cras_stream_id_t stream_id_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(CrasInputStream); 99 DISALLOW_COPY_AND_ASSIGN(CrasInputStream);
100 }; 100 };
101 101
102 } // namespace media 102 } // namespace media
103 103
104 #endif // MEDIA_AUDIO_CRAS_ALSA_INPUT_H_ 104 #endif // MEDIA_AUDIO_CRAS_ALSA_INPUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698