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

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

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: made the GetPreferredOutputStreamParameters protected Created 7 years, 9 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 | « media/audio/audio_util.cc ('k') | media/audio/cras/audio_manager_cras.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AUDIO_MANAGER_CRAS_H_ 5 #ifndef MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 6 #define MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "media/audio/audio_manager_base.h" 12 #include "media/audio/audio_manager_base.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 class MEDIA_EXPORT AudioManagerCras : public AudioManagerBase { 16 class MEDIA_EXPORT AudioManagerCras : public AudioManagerBase {
17 public: 17 public:
18 AudioManagerCras(); 18 AudioManagerCras();
19 19
20 // AudioManager implementation. 20 // AudioManager implementation.
21 virtual bool HasAudioOutputDevices() OVERRIDE; 21 virtual bool HasAudioOutputDevices() OVERRIDE;
22 virtual bool HasAudioInputDevices() OVERRIDE; 22 virtual bool HasAudioInputDevices() OVERRIDE;
23 virtual void ShowAudioInputSettings() OVERRIDE; 23 virtual void ShowAudioInputSettings() OVERRIDE;
24 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names) 24 virtual void GetAudioInputDeviceNames(media::AudioDeviceNames* device_names)
25 OVERRIDE; 25 OVERRIDE;
26 virtual AudioParameters GetInputStreamParameters(
27 const std::string& device_id) OVERRIDE;
26 28
27 // AudioManagerBase implementation. 29 // AudioManagerBase implementation.
28 virtual AudioOutputStream* MakeLinearOutputStream( 30 virtual AudioOutputStream* MakeLinearOutputStream(
29 const AudioParameters& params) OVERRIDE; 31 const AudioParameters& params) OVERRIDE;
30 virtual AudioOutputStream* MakeLowLatencyOutputStream( 32 virtual AudioOutputStream* MakeLowLatencyOutputStream(
31 const AudioParameters& params) OVERRIDE; 33 const AudioParameters& params) OVERRIDE;
32 virtual AudioInputStream* MakeLinearInputStream( 34 virtual AudioInputStream* MakeLinearInputStream(
33 const AudioParameters& params, const std::string& device_id) OVERRIDE; 35 const AudioParameters& params, const std::string& device_id) OVERRIDE;
34 virtual AudioInputStream* MakeLowLatencyInputStream( 36 virtual AudioInputStream* MakeLowLatencyInputStream(
35 const AudioParameters& params, const std::string& device_id) OVERRIDE; 37 const AudioParameters& params, const std::string& device_id) OVERRIDE;
36 virtual AudioParameters GetPreferredLowLatencyOutputStreamParameters(
37 const AudioParameters& input_params) OVERRIDE;
38 38
39 protected: 39 protected:
40 virtual ~AudioManagerCras(); 40 virtual ~AudioManagerCras();
41 41
42 virtual AudioParameters GetPreferredOutputStreamParameters(
43 const AudioParameters& input_params) OVERRIDE;
44
42 private: 45 private:
43 // Gets a list of available cras input devices. 46 // Gets a list of available cras input devices.
44 void GetCrasAudioInputDevices(media::AudioDeviceNames* device_names); 47 void GetCrasAudioInputDevices(media::AudioDeviceNames* device_names);
45 48
46 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream. 49 // Called by MakeLinearOutputStream and MakeLowLatencyOutputStream.
47 AudioOutputStream* MakeOutputStream(const AudioParameters& params); 50 AudioOutputStream* MakeOutputStream(const AudioParameters& params);
48 51
49 // Called by MakeLinearInputStream and MakeLowLatencyInputStream. 52 // Called by MakeLinearInputStream and MakeLowLatencyInputStream.
50 AudioInputStream* MakeInputStream(const AudioParameters& params, 53 AudioInputStream* MakeInputStream(const AudioParameters& params,
51 const std::string& device_id); 54 const std::string& device_id);
52 55
53 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras); 56 DISALLOW_COPY_AND_ASSIGN(AudioManagerCras);
54 }; 57 };
55 58
56 } // namespace media 59 } // namespace media
57 60
58 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_ 61 #endif // MEDIA_AUDIO_CRAS_AUDIO_MANAGER_CRAS_H_
OLDNEW
« no previous file with comments | « media/audio/audio_util.cc ('k') | media/audio/cras/audio_manager_cras.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698