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

Unified Diff: chromecast/media/audio/audio_manager.h

Issue 1308153005: [Chromecast] Plumbs raw audio through CMA backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed default sample rate Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/media/audio/audio_manager.h
diff --git a/chromecast/media/audio/audio_manager.h b/chromecast/media/audio/audio_manager.h
new file mode 100644
index 0000000000000000000000000000000000000000..7df21d391ea22a2c0e728f06d166065cde546ff7
--- /dev/null
+++ b/chromecast/media/audio/audio_manager.h
@@ -0,0 +1,61 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_MEDIA_AUDIO_AUDIO_MANAGER_H_
+#define CHROMECAST_MEDIA_AUDIO_AUDIO_MANAGER_H_
+
+#include "media/audio/audio_manager_base.h"
+
+namespace chromecast {
+
+class TaskRunnerImpl;
+
+namespace media {
+
+class MediaPipelineBackend;
+
+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.
+ public:
+ AudioManager(::media::AudioLogFactory* audio_log_factory);
gunsch 2015/09/18 21:23:07 nit: explicit
alokp 2015/09/18 21:42:14 Done.
+ ~AudioManager() override;
+
+ // AudioManager implementation.
+ bool HasAudioOutputDevices() override;
+ bool HasAudioInputDevices() override;
+ void ShowAudioInputSettings() override;
+ void GetAudioInputDeviceNames(
+ ::media::AudioDeviceNames* device_names) override;
+ ::media::AudioParameters GetInputStreamParameters(
+ const std::string& device_id) override;
+
+ // 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
+ // See AudioManager::GetTaskRunner.
+ virtual scoped_ptr<MediaPipelineBackend> CreateMediaPipelineBackend();
+
+ private:
+ // AudioManagerBase implementation.
+ ::media::AudioOutputStream* MakeLinearOutputStream(
+ const ::media::AudioParameters& params) override;
+ ::media::AudioOutputStream* MakeLowLatencyOutputStream(
+ const ::media::AudioParameters& params,
+ const std::string& device_id) override;
+ ::media::AudioInputStream* MakeLinearInputStream(
+ const ::media::AudioParameters& params,
+ const std::string& device_id) override;
+ ::media::AudioInputStream* MakeLowLatencyInputStream(
+ const ::media::AudioParameters& params,
+ const std::string& device_id) override;
+ ::media::AudioParameters GetPreferredOutputStreamParameters(
+ const std::string& output_device_id,
+ const ::media::AudioParameters& input_params) override;
+
+ scoped_ptr<TaskRunnerImpl> audio_task_runner_;
+
+ 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.
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_AUDIO_AUDIO_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698