Index: media/audio/mac/audio_input_mac.h |
diff --git a/media/audio/mac/audio_input_mac.h b/media/audio/mac/audio_input_mac.h |
index 77eb65b03159626ac54b852ea4ba61fe00bf0bdc..e8f77c706aeaf413cce9a9a535b341b36d65ce38 100644 |
--- a/media/audio/mac/audio_input_mac.h |
+++ b/media/audio/mac/audio_input_mac.h |
@@ -8,6 +8,7 @@ |
#include <AudioToolbox/AudioFormat.h> |
#include <AudioToolbox/AudioQueue.h> |
+#include "base/cancelable_callback.h" |
#include "base/compiler_specific.h" |
#include "base/time/time.h" |
#include "media/audio/audio_io.h" |
@@ -15,14 +16,14 @@ |
namespace media { |
-class AudioManagerBase; |
+class AudioManagerMac; |
// Implementation of AudioInputStream for Mac OS X using the audio queue service |
// present in OS 10.5 and later. Design reflects PCMQueueOutAudioOutputStream. |
class PCMQueueInAudioInputStream : public AudioInputStream { |
public: |
// Parameters as per AudioManager::MakeAudioInputStream. |
- PCMQueueInAudioInputStream(AudioManagerBase* manager, |
+ PCMQueueInAudioInputStream(AudioManagerMac* manager, |
const AudioParameters& params); |
virtual ~PCMQueueInAudioInputStream(); |
@@ -66,7 +67,7 @@ class PCMQueueInAudioInputStream : public AudioInputStream { |
static const int kNumberBuffers = 3; |
// Manager that owns this stream, used for closing down. |
- AudioManagerBase* manager_; |
+ AudioManagerMac* manager_; |
// We use the callback mostly to periodically supply the recorded audio data. |
AudioInputCallback* callback_; |
// Structure that holds the stream format details such as bitrate. |
@@ -79,6 +80,8 @@ class PCMQueueInAudioInputStream : public AudioInputStream { |
bool started_; |
// Used to determine if we need to slow down |callback_| calls. |
base::TimeTicks last_fill_; |
+ // Used to defer Start() to workaround http://crbug.com/160920. |
+ base::CancelableClosure deferred_start_cb_; |
DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream); |
}; |