Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chromecast / media / audio / cast_audio_manager.h
blob4f855e981a0c378cf53705bf3a579981e6403bf8
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.
5 #ifndef CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_MANAGER_H_
6 #define CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_MANAGER_H_
8 #include "base/macros.h"
9 #include "media/audio/audio_manager_base.h"
11 namespace chromecast {
13 class TaskRunnerImpl;
15 namespace media {
17 class MediaPipelineBackend;
19 class CastAudioManager : public ::media::AudioManagerBase {
20 public:
21 explicit CastAudioManager(::media::AudioLogFactory* audio_log_factory);
22 ~CastAudioManager() override;
24 // AudioManager implementation.
25 bool HasAudioOutputDevices() override;
26 bool HasAudioInputDevices() override;
27 void ShowAudioInputSettings() override;
28 void GetAudioInputDeviceNames(
29 ::media::AudioDeviceNames* device_names) override;
30 ::media::AudioParameters GetInputStreamParameters(
31 const std::string& device_id) override;
33 // This must be called on audio thread.
34 // See AudioManager::GetTaskRunner.
35 virtual scoped_ptr<MediaPipelineBackend> CreateMediaPipelineBackend();
37 private:
38 // AudioManagerBase implementation.
39 ::media::AudioOutputStream* MakeLinearOutputStream(
40 const ::media::AudioParameters& params) override;
41 ::media::AudioOutputStream* MakeLowLatencyOutputStream(
42 const ::media::AudioParameters& params,
43 const std::string& device_id) override;
44 ::media::AudioInputStream* MakeLinearInputStream(
45 const ::media::AudioParameters& params,
46 const std::string& device_id) override;
47 ::media::AudioInputStream* MakeLowLatencyInputStream(
48 const ::media::AudioParameters& params,
49 const std::string& device_id) override;
50 ::media::AudioParameters GetPreferredOutputStreamParameters(
51 const std::string& output_device_id,
52 const ::media::AudioParameters& input_params) override;
54 scoped_ptr<TaskRunnerImpl> audio_task_runner_;
56 DISALLOW_COPY_AND_ASSIGN(CastAudioManager);
59 } // namespace media
60 } // namespace chromecast
62 #endif // CHROMECAST_MEDIA_AUDIO_CAST_AUDIO_MANAGER_H_