Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROMECAST_MEDIA_AUDIO_AUDIO_MANAGER_H_ | |
| 6 #define CHROMECAST_MEDIA_AUDIO_AUDIO_MANAGER_H_ | |
| 7 | |
| 8 #include "media/audio/audio_manager_base.h" | |
| 9 | |
| 10 namespace chromecast { | |
| 11 | |
| 12 class TaskRunnerImpl; | |
| 13 | |
| 14 namespace media { | |
| 15 | |
| 16 class MediaPipelineBackend; | |
| 17 | |
| 18 class AudioManager : public ::media::AudioManagerBase { | |
|
gunsch
2015/09/18 21:23:07
I know it's namespaced, but can we call this CastA
alokp
2015/09/18 21:42:14
SGTM. Should I rename AudioOutputStream to CastAud
gunsch
2015/09/18 21:57:06
Please do, thanks.
| |
| 19 public: | |
| 20 AudioManager(::media::AudioLogFactory* audio_log_factory); | |
|
gunsch
2015/09/18 21:23:07
nit: explicit
alokp
2015/09/18 21:42:14
Done.
| |
| 21 ~AudioManager() override; | |
| 22 | |
| 23 // AudioManager implementation. | |
| 24 bool HasAudioOutputDevices() override; | |
| 25 bool HasAudioInputDevices() override; | |
| 26 void ShowAudioInputSettings() override; | |
| 27 void GetAudioInputDeviceNames( | |
| 28 ::media::AudioDeviceNames* device_names) override; | |
| 29 ::media::AudioParameters GetInputStreamParameters( | |
| 30 const std::string& device_id) override; | |
| 31 | |
| 32 // In production, this must be called on audio thread. | |
|
gunsch
2015/09/18 21:23:07
Why "in production"? Shouldn't this assumption eit
alokp
2015/09/18 21:42:14
This is not true in unittest, where I do not creat
| |
| 33 // See AudioManager::GetTaskRunner. | |
| 34 virtual scoped_ptr<MediaPipelineBackend> CreateMediaPipelineBackend(); | |
| 35 | |
| 36 private: | |
| 37 // AudioManagerBase implementation. | |
| 38 ::media::AudioOutputStream* MakeLinearOutputStream( | |
| 39 const ::media::AudioParameters& params) override; | |
| 40 ::media::AudioOutputStream* MakeLowLatencyOutputStream( | |
| 41 const ::media::AudioParameters& params, | |
| 42 const std::string& device_id) override; | |
| 43 ::media::AudioInputStream* MakeLinearInputStream( | |
| 44 const ::media::AudioParameters& params, | |
| 45 const std::string& device_id) override; | |
| 46 ::media::AudioInputStream* MakeLowLatencyInputStream( | |
| 47 const ::media::AudioParameters& params, | |
| 48 const std::string& device_id) override; | |
| 49 ::media::AudioParameters GetPreferredOutputStreamParameters( | |
| 50 const std::string& output_device_id, | |
| 51 const ::media::AudioParameters& input_params) override; | |
| 52 | |
| 53 scoped_ptr<TaskRunnerImpl> audio_task_runner_; | |
| 54 | |
| 55 DISALLOW_COPY_AND_ASSIGN(AudioManager); | |
|
gunsch
2015/09/18 21:23:07
nit: #include "base/macros.h"
alokp
2015/09/18 21:42:15
Done.
| |
| 56 }; | |
| 57 | |
| 58 } // namespace media | |
| 59 } // namespace chromecast | |
| 60 | |
| 61 #endif // CHROMECAST_MEDIA_AUDIO_AUDIO_MANAGER_H_ | |
| OLD | NEW |