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

Unified Diff: media/base/audio_hardware_config.h

Issue 2120273004: Getting rid of AudioHardwareConfig and its synchronous IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased to guidou@ changes, dropped unknown frame id and default param caching Created 4 years, 5 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: media/base/audio_hardware_config.h
diff --git a/media/base/audio_hardware_config.h b/media/base/audio_hardware_config.h
deleted file mode 100644
index 612c5a0cad4ee715d2005850b5add7be4b355079..0000000000000000000000000000000000000000
--- a/media/base/audio_hardware_config.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2013 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 MEDIA_BASE_AUDIO_HARDWARE_CONFIG_H_
-#define MEDIA_BASE_AUDIO_HARDWARE_CONFIG_H_
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "base/synchronization/lock.h"
-#include "media/base/audio_parameters.h"
-#include "media/base/channel_layout.h"
-#include "media/base/media_export.h"
-
-namespace media {
-
-// Provides thread safe access to the audio hardware configuration.
-class MEDIA_EXPORT AudioHardwareConfig {
- public:
- AudioHardwareConfig(const media::AudioParameters& input_params,
- const media::AudioParameters& output_params);
- virtual ~AudioHardwareConfig();
-
- // Accessors for the currently cached hardware configuration. Safe to call
- // from any thread.
- int GetOutputBufferSize() const;
- int GetOutputSampleRate() const;
- ChannelLayout GetOutputChannelLayout() const;
- int GetOutputChannels() const;
-
- int GetInputSampleRate() const;
- ChannelLayout GetInputChannelLayout() const;
- int GetInputChannels() const;
-
- media::AudioParameters GetInputConfig() const;
- media::AudioParameters GetOutputConfig() const;
-
- // Allows callers to update the cached values for either input or output. The
- // values are paired under the assumption that these values will only be set
- // after an input or output device change respectively. Safe to call from
- // any thread.
- void UpdateInputConfig(const media::AudioParameters& input_params);
- void UpdateOutputConfig(const media::AudioParameters& output_params);
-
- private:
- // Cached values; access is protected by |config_lock_|.
- mutable base::Lock config_lock_;
- media::AudioParameters input_params_;
- media::AudioParameters output_params_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioHardwareConfig);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_AUDIO_HARDWARE_CONFIG_H_

Powered by Google App Engine
This is Rietveld 408576698