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

Unified Diff: media/audio/linux/alsa_input.h

Issue 8818012: Remove the AudioManager singleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Set svn eol properties for a couple of files Created 9 years 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
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/linux/alsa_input.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/linux/alsa_input.h
===================================================================
--- media/audio/linux/alsa_input.h (revision 114012)
+++ media/audio/linux/alsa_input.h (working copy)
@@ -16,6 +16,7 @@
#include "media/audio/audio_parameters.h"
class AlsaWrapper;
+class AudioManagerLinux;
// Provides an input stream for audio capture based on the ALSA PCM interface.
// This object is not thread safe and all methods should be invoked in the
@@ -29,7 +30,8 @@
// Create a PCM Output stream for the ALSA device identified by
// |device_name|. If unsure of what to use for |device_name|, use
// |kAutoSelectDevice|.
- AlsaPcmInputStream(const std::string& device_name,
+ AlsaPcmInputStream(AudioManagerLinux* audio_manager,
+ const std::string& device_name,
const AudioParameters& params,
AlsaWrapper* wrapper);
virtual ~AlsaPcmInputStream();
@@ -54,6 +56,12 @@
// Utility function for talking with the ALSA API.
snd_pcm_sframes_t GetCurrentDelay();
+ // Non-refcounted pointer back to the audio manager.
+ // The AudioManager indirectly holds on to stream objects, so we don't
+ // want circular references. Additionally, stream objects live on the audio
+ // thread, which is owned by the audio manager and we don't want to addref
+ // the manager from that thread.
+ AudioManagerLinux* audio_manager_;
std::string device_name_;
AudioParameters params_;
int bytes_per_packet_;
« no previous file with comments | « media/audio/audio_output_proxy_unittest.cc ('k') | media/audio/linux/alsa_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698