diff options
Diffstat (limited to 'media/audio')
-rw-r--r-- | media/audio/audio_input_controller.cc | 4 | ||||
-rw-r--r-- | media/audio/audio_input_controller.h | 4 | ||||
-rw-r--r-- | media/audio/audio_output_controller.cc | 10 | ||||
-rw-r--r-- | media/audio/audio_output_controller.h | 4 | ||||
-rw-r--r-- | media/audio/linux/alsa_output.cc | 16 | ||||
-rw-r--r-- | media/audio/linux/alsa_output.h | 4 | ||||
-rw-r--r-- | media/audio/linux/audio_manager_linux.cc | 4 | ||||
-rw-r--r-- | media/audio/linux/audio_manager_linux.h | 4 |
8 files changed, 25 insertions, 25 deletions
diff --git a/media/audio/audio_input_controller.cc b/media/audio/audio_input_controller.cc index 4f08c46..1e23f53 100644 --- a/media/audio/audio_input_controller.cc +++ b/media/audio/audio_input_controller.cc @@ -110,7 +110,7 @@ void AudioInputController::DoRecord() { return; { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); state_ = kRecording; } @@ -143,7 +143,7 @@ void AudioInputController::DoReportError(int code) { void AudioInputController::OnData(AudioInputStream* stream, const uint8* data, uint32 size) { { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (state_ != kRecording) return; } diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h index 8afb3bd..581a90d 100644 --- a/media/audio/audio_input_controller.h +++ b/media/audio/audio_input_controller.h @@ -5,9 +5,9 @@ #ifndef MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ #define MEDIA_AUDIO_AUDIO_INPUT_CONTROLLER_H_ -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "base/threading/thread.h" #include "media/audio/audio_io.h" #include "media/audio/audio_manager.h" @@ -121,7 +121,7 @@ class AudioInputController : // is not required for reading on the audio input controller thread. State state_; - Lock lock_; + base::Lock lock_; // The audio input controller thread that this object runs on. base::Thread thread_; diff --git a/media/audio/audio_output_controller.cc b/media/audio/audio_output_controller.cc index 6ab8f3f..5347c50 100644 --- a/media/audio/audio_output_controller.cc +++ b/media/audio/audio_output_controller.cc @@ -129,7 +129,7 @@ void AudioOutputController::SetVolume(double volume) { void AudioOutputController::EnqueueData(const uint8* data, uint32 size) { // Write data to the push source and ask for more data if needed. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); pending_request_ = false; // If |size| is set to 0, it indicates that the audio source doesn't have // more data right now, and so it doesn't make sense to send additional @@ -178,7 +178,7 @@ void AudioOutputController::DoCreate(AudioParameters params) { // If in normal latency mode then start buffering. if (!LowLatencyMode()) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); SubmitOnMoreData_Locked(); } } @@ -228,7 +228,7 @@ void AudioOutputController::DoFlush() { if (!sync_reader_) { if (state_ != kPaused) return; - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); buffer_.Clear(); } } @@ -281,7 +281,7 @@ uint32 AudioOutputController::OnMoreData( uint32 max_size, AudioBuffersState buffers_state) { // If regular latency mode is used. if (!sync_reader_) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // Save current buffers state. buffers_state_ = buffers_state; @@ -326,7 +326,7 @@ void AudioOutputController::SubmitOnMoreData_Locked() { // If we need more data then call the event handler to ask for more data. // It is okay that we don't lock in this block because the parameters are // correct and in the worst case we are just asking more data than needed. - AutoUnlock auto_unlock(lock_); + base::AutoUnlock auto_unlock(lock_); handler_->OnMoreData(this, buffers_state); } diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h index 0a191e3..3778171 100644 --- a/media/audio/audio_output_controller.h +++ b/media/audio/audio_output_controller.h @@ -5,9 +5,9 @@ #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ #define MEDIA_AUDIO_AUDIO_OUTPUT_CONTROLLER_H_ -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "base/time.h" #include "media/audio/audio_buffers_state.h" #include "media/audio/audio_io.h" @@ -187,7 +187,7 @@ class AudioOutputController AudioBuffersState buffers_state_; // The |lock_| must be acquired whenever we access |buffer_|. - Lock lock_; + base::Lock lock_; media::SeekableBuffer buffer_; diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc index 6df30b4..338ff08 100644 --- a/media/audio/linux/alsa_output.cc +++ b/media/audio/linux/alsa_output.cc @@ -837,7 +837,7 @@ AlsaPcmOutputStream::SharedData::SharedData( } bool AlsaPcmOutputStream::SharedData::CanTransitionTo(InternalState to) { - AutoLock l(lock_); + base::AutoLock l(lock_); return CanTransitionTo_Locked(to); } @@ -874,7 +874,7 @@ AlsaPcmOutputStream::InternalState AlsaPcmOutputStream::SharedData::TransitionTo(InternalState to) { DCHECK_EQ(MessageLoop::current(), state_transition_loop_); - AutoLock l(lock_); + base::AutoLock l(lock_); if (!CanTransitionTo_Locked(to)) { NOTREACHED() << "Cannot transition from: " << state_ << " to: " << to; state_ = kInError; @@ -885,24 +885,24 @@ AlsaPcmOutputStream::SharedData::TransitionTo(InternalState to) { } AlsaPcmOutputStream::InternalState AlsaPcmOutputStream::SharedData::state() { - AutoLock l(lock_); + base::AutoLock l(lock_); return state_; } float AlsaPcmOutputStream::SharedData::volume() { - AutoLock l(lock_); + base::AutoLock l(lock_); return volume_; } void AlsaPcmOutputStream::SharedData::set_volume(float v) { - AutoLock l(lock_); + base::AutoLock l(lock_); volume_ = v; } uint32 AlsaPcmOutputStream::SharedData::OnMoreData( AudioOutputStream* stream, uint8* dest, uint32 max_size, AudioBuffersState buffers_state) { - AutoLock l(lock_); + base::AutoLock l(lock_); if (source_callback_) { return source_callback_->OnMoreData(stream, dest, max_size, buffers_state); } @@ -912,7 +912,7 @@ uint32 AlsaPcmOutputStream::SharedData::OnMoreData( void AlsaPcmOutputStream::SharedData::OnError(AudioOutputStream* stream, int code) { - AutoLock l(lock_); + base::AutoLock l(lock_); if (source_callback_) { source_callback_->OnError(stream, code); } @@ -923,6 +923,6 @@ void AlsaPcmOutputStream::SharedData::OnError(AudioOutputStream* stream, void AlsaPcmOutputStream::SharedData::set_source_callback( AudioSourceCallback* callback) { DCHECK_EQ(MessageLoop::current(), state_transition_loop_); - AutoLock l(lock_); + base::AutoLock l(lock_); source_callback_ = callback; } diff --git a/media/audio/linux/alsa_output.h b/media/audio/linux/alsa_output.h index 25ff055..f2999c1 100644 --- a/media/audio/linux/alsa_output.h +++ b/media/audio/linux/alsa_output.h @@ -40,9 +40,9 @@ #include <string> #include "base/gtest_prod_util.h" -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "media/audio/audio_io.h" #include "media/audio/audio_parameters.h" @@ -193,7 +193,7 @@ class AlsaPcmOutputStream : void set_source_callback(AudioSourceCallback* callback); private: - Lock lock_; + base::Lock lock_; InternalState state_; float volume_; // Volume level from 0.0 to 1.0. diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc index c875c08..4c92a6f 100644 --- a/media/audio/linux/audio_manager_linux.cc +++ b/media/audio/linux/audio_manager_linux.cc @@ -62,7 +62,7 @@ AudioOutputStream* AudioManagerLinux::MakeAudioOutputStream( new AlsaPcmOutputStream(device_name, params, wrapper_.get(), this, GetMessageLoop()); - AutoLock l(lock_); + base::AutoLock l(lock_); active_streams_[stream] = scoped_refptr<AlsaPcmOutputStream>(stream); return stream; } @@ -125,7 +125,7 @@ void AudioManagerLinux::UnMuteAll() { void AudioManagerLinux::ReleaseOutputStream(AlsaPcmOutputStream* stream) { if (stream) { - AutoLock l(lock_); + base::AutoLock l(lock_); active_streams_.erase(stream); } } diff --git a/media/audio/linux/audio_manager_linux.h b/media/audio/linux/audio_manager_linux.h index 4ae3b64..b657966 100644 --- a/media/audio/linux/audio_manager_linux.h +++ b/media/audio/linux/audio_manager_linux.h @@ -7,9 +7,9 @@ #include <map> -#include "base/lock.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "base/threading/thread.h" #include "media/audio/audio_manager_base.h" @@ -40,7 +40,7 @@ class AudioManagerLinux : public AudioManagerBase { private: scoped_ptr<AlsaWrapper> wrapper_; - Lock lock_; + base::Lock lock_; std::map<AlsaPcmOutputStream*, scoped_refptr<AlsaPcmOutputStream> > active_streams_; |