summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/browser/browser_main_loop.cc4
-rw-r--r--content/browser/browser_main_loop.h9
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager.cc5
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager.h6
-rw-r--r--content/browser/renderer_host/media/audio_input_device_manager_unittest.cc10
-rw-r--r--content/browser/renderer_host/media/audio_input_renderer_host.cc21
-rw-r--r--content/browser/renderer_host/media/audio_input_renderer_host.h8
-rw-r--r--content/browser/renderer_host/media/audio_input_sync_writer.cc4
-rw-r--r--content/browser/renderer_host/media/audio_input_sync_writer.h3
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host.cc6
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host.h14
-rw-r--r--content/browser/renderer_host/media/audio_renderer_host_unittest.cc26
-rw-r--r--content/browser/renderer_host/media/media_stream_dispatcher_host.cc2
-rw-r--r--content/browser/renderer_host/media/media_stream_dispatcher_host.h4
-rw-r--r--content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc6
-rw-r--r--content/browser/renderer_host/media/media_stream_manager.cc4
-rw-r--r--content/browser/renderer_host/media/media_stream_manager.h12
-rw-r--r--content/browser/renderer_host/media/video_capture_host.cc4
-rw-r--r--content/browser/renderer_host/media/video_capture_host.h12
-rw-r--r--content/browser/renderer_host/media/video_capture_host_unittest.cc8
-rw-r--r--content/browser/renderer_host/render_message_filter.cc4
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc3
-rw-r--r--content/browser/speech/input_tag_speech_dispatcher_host.cc2
-rw-r--r--content/browser/speech/input_tag_speech_dispatcher_host.h9
-rw-r--r--content/browser/speech/speech_recognition_manager_impl.cc2
-rw-r--r--content/browser/speech/speech_recognizer_impl.cc10
-rw-r--r--content/browser/speech/speech_recognizer_impl.h5
-rw-r--r--content/browser/speech/speech_recognizer_impl_unittest.cc10
-rw-r--r--content/common/media/audio_messages.h6
-rw-r--r--content/common/media/audio_param_traits.cc2
-rw-r--r--content/common/media/audio_param_traits.h6
-rw-r--r--content/renderer/media/audio_device.cc10
-rw-r--r--content/renderer/media/audio_device.h12
-rw-r--r--content/renderer/media/audio_device_thread.cc6
-rw-r--r--content/renderer/media/audio_device_thread.h4
-rw-r--r--content/renderer/media/audio_input_device.cc15
-rw-r--r--content/renderer/media/audio_input_device.h5
-rw-r--r--content/renderer/media/audio_renderer_impl.cc2
-rw-r--r--content/renderer/media/audio_renderer_impl.h2
-rw-r--r--content/renderer/media/render_audiosourceprovider.cc2
-rw-r--r--content/renderer/media/render_audiosourceprovider.h2
-rw-r--r--content/renderer/media/renderer_webaudiodevice_impl.cc3
-rw-r--r--content/renderer/media/renderer_webaudiodevice_impl.h9
-rw-r--r--content/renderer/media/webrtc_audio_device_impl.cc2
-rw-r--r--content/renderer/media/webrtc_audio_device_impl.h4
-rw-r--r--content/renderer/pepper/pepper_platform_audio_input_impl.cc5
-rw-r--r--content/renderer/pepper/pepper_platform_audio_input_impl.h6
-rw-r--r--content/renderer/pepper/pepper_platform_audio_output_impl.cc12
-rw-r--r--content/renderer/pepper/pepper_platform_audio_output_impl.h4
-rw-r--r--content/renderer/renderer_webkitplatformsupport_impl.cc8
-rw-r--r--content/test/webrtc_audio_device_test.cc6
-rw-r--r--content/test/webrtc_audio_device_test.h7
-rw-r--r--media/audio/android/audio_manager_android.cc4
-rw-r--r--media/audio/android/audio_manager_android.h4
-rw-r--r--media/audio/android/audio_track_output_android.cc6
-rw-r--r--media/audio/android/audio_track_output_android.h4
-rw-r--r--media/audio/android/audio_track_output_stub_android.cc6
-rw-r--r--media/audio/audio_buffers_state.cc4
-rw-r--r--media/audio/audio_buffers_state.h4
-rw-r--r--media/audio/audio_input_device_unittest.cc5
-rw-r--r--media/audio/audio_input_stream_impl.cc3
-rw-r--r--media/audio/audio_input_stream_impl.h4
-rw-r--r--media/audio/audio_input_unittest.cc4
-rw-r--r--media/audio/audio_input_volume_unittest.cc5
-rw-r--r--media/audio/audio_io.h5
-rw-r--r--media/audio/audio_low_latency_input_output_unittest.cc11
-rw-r--r--media/audio/audio_manager.cc4
-rw-r--r--media/audio/audio_manager.h13
-rw-r--r--media/audio/audio_manager_base.cc4
-rw-r--r--media/audio/audio_manager_base.h8
-rw-r--r--media/audio/audio_output_controller_unittest.cc4
-rw-r--r--media/audio/audio_output_dispatcher.cc4
-rw-r--r--media/audio/audio_output_dispatcher.h7
-rw-r--r--media/audio/audio_output_proxy.cc4
-rw-r--r--media/audio/audio_output_proxy.h4
-rw-r--r--media/audio/audio_output_proxy_unittest.cc15
-rw-r--r--media/audio/audio_parameters.cc4
-rw-r--r--media/audio/audio_parameters.h4
-rw-r--r--media/audio/audio_parameters_unittest.cc4
-rw-r--r--media/audio/fake_audio_input_stream.cc4
-rw-r--r--media/audio/fake_audio_input_stream.h6
-rw-r--r--media/audio/fake_audio_output_stream.cc4
-rw-r--r--media/audio/fake_audio_output_stream.h4
-rw-r--r--media/audio/linux/alsa_input.cc4
-rw-r--r--media/audio/linux/alsa_input.h4
-rw-r--r--media/audio/linux/alsa_output.cc4
-rw-r--r--media/audio/linux/alsa_output.h10
-rw-r--r--media/audio/linux/alsa_output_unittest.cc4
-rw-r--r--media/audio/linux/alsa_util.cc14
-rw-r--r--media/audio/linux/alsa_util.h17
-rw-r--r--media/audio/linux/alsa_wrapper.cc4
-rw-r--r--media/audio/linux/alsa_wrapper.h4
-rw-r--r--media/audio/linux/audio_manager_linux.cc4
-rw-r--r--media/audio/linux/audio_manager_linux.h4
-rw-r--r--media/audio/mac/audio_input_mac.cc4
-rw-r--r--media/audio/mac/audio_input_mac.h4
-rw-r--r--media/audio/mac/audio_low_latency_input_mac.cc4
-rw-r--r--media/audio/mac/audio_low_latency_input_mac.h4
-rw-r--r--media/audio/mac/audio_low_latency_input_mac_unittest.cc3
-rw-r--r--media/audio/mac/audio_low_latency_output_mac.cc4
-rw-r--r--media/audio/mac/audio_low_latency_output_mac.h4
-rw-r--r--media/audio/mac/audio_manager_mac.cc4
-rw-r--r--media/audio/mac/audio_manager_mac.h4
-rw-r--r--media/audio/mac/audio_output_mac.cc4
-rw-r--r--media/audio/mac/audio_output_mac.h6
-rw-r--r--media/audio/mac/audio_output_mac_unittest.cc4
-rw-r--r--media/audio/openbsd/audio_manager_openbsd.cc4
-rw-r--r--media/audio/openbsd/audio_manager_openbsd.h4
-rw-r--r--media/audio/pulse/pulse_output.cc6
-rw-r--r--media/audio/pulse/pulse_output.h4
-rw-r--r--media/audio/simple_sources.cc6
-rw-r--r--media/audio/simple_sources.h6
-rw-r--r--media/audio/simple_sources_unittest.cc4
-rw-r--r--media/audio/win/audio_low_latency_input_win.cc4
-rw-r--r--media/audio/win/audio_low_latency_input_win.h4
-rw-r--r--media/audio/win/audio_low_latency_input_win_unittest.cc4
-rw-r--r--media/audio/win/audio_low_latency_output_win.cc4
-rw-r--r--media/audio/win/audio_low_latency_output_win.h4
-rw-r--r--media/audio/win/audio_manager_win.cc4
-rw-r--r--media/audio/win/audio_manager_win.h4
-rw-r--r--media/audio/win/audio_output_win_unittest.cc4
-rw-r--r--media/audio/win/wavein_input_win.cc4
-rw-r--r--media/audio/win/wavein_input_win.h4
-rw-r--r--media/audio/win/waveout_output_win.cc4
-rw-r--r--media/audio/win/waveout_output_win.h6
-rw-r--r--media/tools/player_wtl/movie.cc7
-rw-r--r--media/tools/player_wtl/movie.h2
-rw-r--r--media/tools/player_x11/player_x11.cc4
128 files changed, 203 insertions, 535 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 466c177..78a971b 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -206,7 +206,7 @@ void ImmediateShutdownAndExitProcess() {
}
// static
-media::AudioManager* BrowserMainLoop::GetAudioManager() {
+AudioManager* BrowserMainLoop::GetAudioManager() {
return g_current_browser_main_loop->audio_manager_.get();
}
@@ -327,7 +327,7 @@ void BrowserMainLoop::MainMessageLoopStart() {
hi_res_timer_manager_.reset(new HighResolutionTimerManager);
network_change_notifier_.reset(net::NetworkChangeNotifier::Create());
- audio_manager_.reset(media::AudioManager::Create());
+ audio_manager_.reset(AudioManager::Create());
online_state_observer_.reset(new BrowserOnlineStateObserver);
#if defined(OS_WIN)
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index f43e6eb..138d11e 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -14,6 +14,7 @@
#include "ui/base/win/scoped_ole_initializer.h"
#endif
+class AudioManager;
class BrowserOnlineStateObserver;
class CommandLine;
class HighResolutionTimerManager;
@@ -24,10 +25,6 @@ namespace base {
class SystemMonitor;
}
-namespace media {
-class AudioManager;
-}
-
namespace net {
class NetworkChangeNotifier;
}
@@ -69,7 +66,7 @@ class BrowserMainLoop {
int GetResultCode() const { return result_code_; }
// Can be called on any thread.
- static media::AudioManager* GetAudioManager();
+ static AudioManager* GetAudioManager();
private:
// For ShutdownThreadsAndCleanUp.
@@ -92,7 +89,7 @@ class BrowserMainLoop {
scoped_ptr<base::SystemMonitor> system_monitor_;
scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_;
scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
- scoped_ptr<media::AudioManager> audio_manager_;
+ scoped_ptr<AudioManager> audio_manager_;
// Per-process listener for online state changes.
scoped_ptr<BrowserOnlineStateObserver> online_state_observer_;
#if defined(OS_WIN)
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 00e37f9a..d30ec3b 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -21,8 +21,7 @@ const char AudioInputDeviceManager::kInvalidDeviceId[] = "";
// Starting id for the first capture session.
const int kFirstSessionId = AudioInputDeviceManager::kFakeOpenSessionId + 1;
-AudioInputDeviceManager::AudioInputDeviceManager(
- media::AudioManager* audio_manager)
+AudioInputDeviceManager::AudioInputDeviceManager(AudioManager* audio_manager)
: listener_(NULL),
next_capture_session_id_(kFirstSessionId),
audio_manager_(audio_manager) {
@@ -128,7 +127,7 @@ void AudioInputDeviceManager::Start(
// the callback immediately.
if (session_id == kFakeOpenSessionId) {
event_handler->OnDeviceStarted(session_id,
- media::AudioManagerBase::kDefaultDeviceId);
+ AudioManagerBase::kDefaultDeviceId);
return;
}
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h
index 96bff65..5c8a396 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.h
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h
@@ -21,9 +21,7 @@
#include "content/common/media/media_stream_options.h"
#include "media/audio/audio_device_name.h"
-namespace media {
class AudioManager;
-}
namespace media_stream {
@@ -41,7 +39,7 @@ class CONTENT_EXPORT AudioInputDeviceManager
static const int kInvalidSessionId;
static const char kInvalidDeviceId[];
- explicit AudioInputDeviceManager(media::AudioManager* audio_manager);
+ explicit AudioInputDeviceManager(AudioManager* audio_manager);
// MediaStreamProvider implementation, called on IO thread.
virtual void Register(MediaStreamProviderListener* listener) OVERRIDE;
@@ -74,7 +72,7 @@ class CONTENT_EXPORT AudioInputDeviceManager
typedef std::map<int, media::AudioDeviceName> AudioInputDeviceMap;
AudioInputDeviceMap devices_;
// TODO(tommi): Is it necessary to store this as a member?
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManager);
};
diff --git a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
index fe57150..173606a 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager_unittest.cc
@@ -105,7 +105,7 @@ class AudioInputDeviceManagerTest : public testing::Test {
message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO,
message_loop_.get()));
- audio_manager_.reset(media::AudioManager::Create());
+ audio_manager_.reset(AudioManager::Create());
manager_ = new AudioInputDeviceManager(audio_manager_.get());
audio_input_listener_.reset(new MockAudioInputDeviceManagerListener());
@@ -129,7 +129,7 @@ class AudioInputDeviceManagerTest : public testing::Test {
scoped_ptr<BrowserThreadImpl> io_thread_;
scoped_refptr<AudioInputDeviceManager> manager_;
scoped_ptr<MockAudioInputDeviceManagerListener> audio_input_listener_;
- scoped_ptr<media::AudioManager> audio_manager_;
+ scoped_ptr<AudioManager> audio_manager_;
private:
DISALLOW_COPY_AND_ASSIGN(AudioInputDeviceManagerTest);
@@ -414,11 +414,11 @@ TEST_F(AudioInputDeviceManagerTest, StartDeviceTwice) {
manager_->Start(second_session_id, second_event_handler.get());
EXPECT_CALL(*first_event_handler,
DeviceStarted(first_session_id,
- media::AudioManagerBase::kDefaultDeviceId))
+ AudioManagerBase::kDefaultDeviceId))
.Times(1);
EXPECT_CALL(*second_event_handler,
DeviceStarted(second_session_id,
- media::AudioManagerBase::kDefaultDeviceId))
+ AudioManagerBase::kDefaultDeviceId))
.Times(1);
message_loop_->RunAllPending();
@@ -502,7 +502,7 @@ TEST_F(AudioInputDeviceManagerTest, StartSessionTwice) {
manager_->Start(session_id, audio_input_event_handler.get());
EXPECT_CALL(*audio_input_event_handler,
DeviceStarted(session_id,
- media::AudioManagerBase::kDefaultDeviceId))
+ AudioManagerBase::kDefaultDeviceId))
.Times(1);
message_loop_->RunAllPending();
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.cc b/content/browser/renderer_host/media/audio_input_renderer_host.cc
index 3465202..121a5ac 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.cc
@@ -25,7 +25,7 @@ AudioInputRendererHost::AudioEntry::~AudioEntry() {}
AudioInputRendererHost::AudioInputRendererHost(
content::ResourceContext* resource_context,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: resource_context_(resource_context),
audio_manager_(audio_manager) {
}
@@ -114,8 +114,8 @@ void AudioInputRendererHost::DoCompleteCreation(
return;
}
- media::AudioInputSyncWriter* writer =
- static_cast<media::AudioInputSyncWriter*>(entry->writer.get());
+ AudioInputSyncWriter* writer =
+ static_cast<AudioInputSyncWriter*>(entry->writer.get());
#if defined(OS_WIN)
base::SyncSocket::Handle foreign_socket_handle;
@@ -197,15 +197,16 @@ void AudioInputRendererHost::OnStartDevice(int stream_id, int session_id) {
audio_input_man->Start(session_id, this);
}
-void AudioInputRendererHost::OnCreateStream(
- int stream_id, const media::AudioParameters& params,
- const std::string& device_id, bool automatic_gain_control) {
+void AudioInputRendererHost::OnCreateStream(int stream_id,
+ const AudioParameters& params,
+ const std::string& device_id,
+ bool automatic_gain_control) {
VLOG(1) << "AudioInputRendererHost::OnCreateStream(stream_id="
<< stream_id << ")";
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(LookupById(stream_id) == NULL);
- media::AudioParameters audio_params(params);
+ AudioParameters audio_params(params);
DCHECK_GT(audio_params.frames_per_buffer(), 0);
uint32 buffer_size = audio_params.GetBytesPerBuffer();
@@ -213,7 +214,7 @@ void AudioInputRendererHost::OnCreateStream(
// Create a new AudioEntry structure.
scoped_ptr<AudioEntry> entry(new AudioEntry());
- uint32 mem_size = sizeof(media::AudioInputBufferParameters) + buffer_size;
+ uint32 mem_size = sizeof(AudioInputBufferParameters) + buffer_size;
// Create the shared memory and share it with the renderer process
// using a new SyncWriter object.
@@ -223,8 +224,8 @@ void AudioInputRendererHost::OnCreateStream(
return;
}
- scoped_ptr<media::AudioInputSyncWriter> writer(
- new media::AudioInputSyncWriter(&entry->shared_memory));
+ scoped_ptr<AudioInputSyncWriter> writer(
+ new AudioInputSyncWriter(&entry->shared_memory));
if (!writer->Init()) {
SendErrorMessage(stream_id);
diff --git a/content/browser/renderer_host/media/audio_input_renderer_host.h b/content/browser/renderer_host/media/audio_input_renderer_host.h
index f8351c8..5a9cc6b 100644
--- a/content/browser/renderer_host/media/audio_input_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_input_renderer_host.h
@@ -68,10 +68,8 @@ namespace content {
class ResourceContext;
}
-namespace media {
class AudioManager;
class AudioParameters;
-}
class CONTENT_EXPORT AudioInputRendererHost
: public content::BrowserMessageFilter,
@@ -101,7 +99,7 @@ class CONTENT_EXPORT AudioInputRendererHost
// Called from UI thread from the owner of this object.
AudioInputRendererHost(content::ResourceContext* resource_context,
- media::AudioManager* audio_manager);
+ AudioManager* audio_manager);
// content::BrowserMessageFilter implementation.
virtual void OnChannelClosing() OVERRIDE;
@@ -141,7 +139,7 @@ class CONTENT_EXPORT AudioInputRendererHost
// successful this object would keep an internal entry of the stream for the
// required properties.
void OnCreateStream(int stream_id,
- const media::AudioParameters& params,
+ const AudioParameters& params,
const std::string& device_id,
bool automatic_gain_control);
@@ -199,7 +197,7 @@ class CONTENT_EXPORT AudioInputRendererHost
// Used to get an instance of AudioInputDeviceManager.
content::ResourceContext* resource_context_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
// A map of stream IDs to audio sources.
typedef std::map<int, AudioEntry*> AudioEntryMap;
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index 87751d7..d720017 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -9,8 +9,6 @@
#include "base/process_util.h"
#include "base/shared_memory.h"
-namespace media {
-
AudioInputSyncWriter::AudioInputSyncWriter(base::SharedMemory* shared_memory)
: shared_memory_(shared_memory) {
}
@@ -66,5 +64,3 @@ bool AudioInputSyncWriter::PrepareForeignSocketHandle(
}
#endif
-
-} // namespace media
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.h b/content/browser/renderer_host/media/audio_input_sync_writer.h
index 1b7a609..77acd50 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.h
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.h
@@ -15,7 +15,6 @@ namespace base {
class SharedMemory;
}
-namespace media {
// A AudioInputController::SyncWriter implementation using SyncSocket. This
// is used by AudioInputController to provide a low latency data source for
// transmitting audio packets between the browser process and the renderer
@@ -52,6 +51,4 @@ class AudioInputSyncWriter : public media::AudioInputController::SyncWriter {
DISALLOW_IMPLICIT_CONSTRUCTORS(AudioInputSyncWriter);
};
-} // namespace media
-
#endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_SYNC_WRITER_H_
diff --git a/content/browser/renderer_host/media/audio_renderer_host.cc b/content/browser/renderer_host/media/audio_renderer_host.cc
index c59ef44..290b94a 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host.cc
@@ -27,7 +27,7 @@ AudioRendererHost::AudioEntry::~AudioEntry() {}
///////////////////////////////////////////////////////////////////////////////
// AudioRendererHost implementations.
AudioRendererHost::AudioRendererHost(
- media::AudioManager* audio_manager,
+ AudioManager* audio_manager,
content::MediaObserver* media_observer)
: audio_manager_(audio_manager),
media_observer_(media_observer) {
@@ -192,11 +192,11 @@ bool AudioRendererHost::OnMessageReceived(const IPC::Message& message,
}
void AudioRendererHost::OnCreateStream(
- int stream_id, const media::AudioParameters& params) {
+ int stream_id, const AudioParameters& params) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
DCHECK(LookupById(stream_id) == NULL);
- media::AudioParameters audio_params(params);
+ AudioParameters audio_params(params);
DCHECK_GT(audio_params.frames_per_buffer(), 0);
uint32 buffer_size = audio_params.GetBytesPerBuffer();
diff --git a/content/browser/renderer_host/media/audio_renderer_host.h b/content/browser/renderer_host/media/audio_renderer_host.h
index cea2f3a..a506531 100644
--- a/content/browser/renderer_host/media/audio_renderer_host.h
+++ b/content/browser/renderer_host/media/audio_renderer_host.h
@@ -53,16 +53,14 @@
#include "media/audio/audio_output_controller.h"
#include "media/audio/simple_sources.h"
+class AudioManager;
+class AudioParameters;
+
namespace content {
class MediaObserver;
class ResourceContext;
} // namespace content
-namespace media {
-class AudioManager;
-class AudioParameters;
-}
-
class CONTENT_EXPORT AudioRendererHost
: public content::BrowserMessageFilter,
public media::AudioOutputController::EventHandler {
@@ -91,7 +89,7 @@ class CONTENT_EXPORT AudioRendererHost
typedef std::map<int, AudioEntry*> AudioEntryMap;
// Called from UI thread from the owner of this object.
- AudioRendererHost(media::AudioManager* audio_manager,
+ AudioRendererHost(AudioManager* audio_manager,
content::MediaObserver* media_observer);
// content::BrowserMessageFilter implementation.
@@ -123,7 +121,7 @@ class CONTENT_EXPORT AudioRendererHost
// Creates an audio output stream with the specified format. If this call is
// successful this object would keep an internal entry of the stream for the
// required properties.
- void OnCreateStream(int stream_id, const media::AudioParameters& params);
+ void OnCreateStream(int stream_id, const AudioParameters& params);
// Play the audio stream referenced by |stream_id|.
void OnPlayStream(int stream_id);
@@ -180,7 +178,7 @@ class CONTENT_EXPORT AudioRendererHost
// A map of stream IDs to audio sources.
AudioEntryMap audio_entries_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
content::MediaObserver* media_observer_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererHost);
diff --git a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
index 6a1287a..71a5063 100644
--- a/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
+++ b/content/browser/renderer_host/media/audio_renderer_host_unittest.cc
@@ -43,7 +43,7 @@ static bool IsRunningHeadless() {
class MockAudioRendererHost : public AudioRendererHost {
public:
explicit MockAudioRendererHost(
- media::AudioManager* audio_manager,
+ AudioManager* audio_manager,
content::MediaObserver* media_observer)
: AudioRendererHost(audio_manager, media_observer),
shared_memory_length_(0) {
@@ -161,7 +161,7 @@ class AudioRendererHostTest : public testing::Test {
message_loop_.get()));
ui_thread_.reset(new BrowserThreadImpl(BrowserThread::UI,
message_loop_.get()));
- audio_manager_.reset(media::AudioManager::Create());
+ audio_manager_.reset(AudioManager::Create());
observer_.reset(new MockMediaObserver());
host_ = new MockAudioRendererHost(audio_manager_.get(), observer_.get());
@@ -195,16 +195,15 @@ class AudioRendererHostTest : public testing::Test {
EXPECT_CALL(*host_, OnStreamCreated(kStreamId, _))
.WillOnce(QuitMessageLoop(message_loop_.get()));
- media::AudioParameters::Format format;
+ AudioParameters::Format format;
if (mock_stream_)
- format = media::AudioParameters::AUDIO_MOCK;
+ format = AudioParameters::AUDIO_MOCK;
else
- format = media::AudioParameters::AUDIO_PCM_LINEAR;
+ format = AudioParameters::AUDIO_PCM_LINEAR;
- media::AudioParameters params(
- format, CHANNEL_LAYOUT_STEREO,
- media::AudioParameters::kAudioCDSampleRate, 16,
- media::AudioParameters::kAudioCDSampleRate / 10);
+ AudioParameters params(format, CHANNEL_LAYOUT_STEREO,
+ AudioParameters::kAudioCDSampleRate, 16,
+ AudioParameters::kAudioCDSampleRate / 10);
// Send a create stream message to the audio output stream and wait until
// we receive the created message.
@@ -280,7 +279,7 @@ class AudioRendererHostTest : public testing::Test {
}
// Called on the main thread.
- static void PostQuitOnAudioThread(media::AudioManager* audio_manager,
+ static void PostQuitOnAudioThread(AudioManager* audio_manager,
MessageLoop* message_loop) {
audio_manager->GetMessageLoop()->PostTask(FROM_HERE,
base::Bind(&PostQuitMessageLoop, message_loop));
@@ -291,7 +290,7 @@ class AudioRendererHostTest : public testing::Test {
// current thread. It is used to synchronize with the audio thread when we are
// closing an audio stream.
void SyncWithAudioThread() {
- // Don't use scoped_refptr to addref the media::AudioManager when posting
+ // Don't use scoped_refptr to addref the AudioManager when posting
// to the thread that itself owns.
message_loop_->PostTask(
FROM_HERE, base::Bind(&PostQuitOnAudioThread,
@@ -311,7 +310,7 @@ class AudioRendererHostTest : public testing::Test {
scoped_ptr<MessageLoop> message_loop_;
scoped_ptr<BrowserThreadImpl> io_thread_;
scoped_ptr<BrowserThreadImpl> ui_thread_;
- scoped_ptr<media::AudioManager> audio_manager_;
+ scoped_ptr<AudioManager> audio_manager_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererHostTest);
};
@@ -362,8 +361,7 @@ TEST_F(AudioRendererHostTest, SetVolume) {
// Expect the volume is set.
if (IsRunningHeadless()) {
- EXPECT_EQ(0.5,
- media::FakeAudioOutputStream::GetCurrentFakeStream()->volume());
+ EXPECT_EQ(0.5, FakeAudioOutputStream::GetCurrentFakeStream()->volume());
}
Close();
}
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
index 67b7044..f48f826 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -26,7 +26,7 @@ struct MediaStreamDispatcherHost::StreamRequest {
MediaStreamDispatcherHost::MediaStreamDispatcherHost(
content::ResourceContext* resource_context,
int render_process_id,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: resource_context_(resource_context),
render_process_id_(render_process_id),
audio_manager_(audio_manager) {
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.h b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
index 1ecd13d..aa44969 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
@@ -30,7 +30,7 @@ class CONTENT_EXPORT MediaStreamDispatcherHost
public:
MediaStreamDispatcherHost(content::ResourceContext* resource_context,
int render_process_id,
- media::AudioManager* audio_manager);
+ AudioManager* audio_manager);
virtual ~MediaStreamDispatcherHost();
// MediaStreamRequester implementation.
@@ -80,7 +80,7 @@ class CONTENT_EXPORT MediaStreamDispatcherHost
content::ResourceContext* resource_context_;
int render_process_id_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
struct StreamRequest;
typedef std::map<std::string, StreamRequest> StreamMap;
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index 50f7356..9c699ed 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -37,7 +37,7 @@ class MockMediaStreamDispatcherHost : public MediaStreamDispatcherHost {
public:
MockMediaStreamDispatcherHost(content::ResourceContext* resource_context,
MessageLoop* message_loop,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: MediaStreamDispatcherHost(resource_context, kProcessId, audio_manager),
message_loop_(message_loop) {}
virtual ~MockMediaStreamDispatcherHost() {}
@@ -153,7 +153,7 @@ class MediaStreamDispatcherHostTest : public testing::Test {
io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO,
message_loop_.get()));
- audio_manager_.reset(media::AudioManager::Create());
+ audio_manager_.reset(AudioManager::Create());
// Make sure we use fake devices to avoid long delays.
MediaStreamManager::GetForResourceContext(
@@ -201,7 +201,7 @@ class MediaStreamDispatcherHostTest : public testing::Test {
scoped_ptr<MessageLoop> message_loop_;
scoped_ptr<BrowserThreadImpl> ui_thread_;
scoped_ptr<BrowserThreadImpl> io_thread_;
- scoped_ptr<media::AudioManager> audio_manager_;
+ scoped_ptr<AudioManager> audio_manager_;
content::MockResourceContext resource_context_;
};
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 994725b..82c0763 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -101,7 +101,7 @@ struct MediaStreamManager::DeviceRequest {
// static
MediaStreamManager* MediaStreamManager::GetForResourceContext(
content::ResourceContext* resource_context,
- media::AudioManager* audio_manager) {
+ AudioManager* audio_manager) {
MediaStreamManager* rv = static_cast<MediaStreamManager*>(
resource_context->GetUserData(kMediaStreamManagerKeyName));
if (!rv) {
@@ -111,7 +111,7 @@ MediaStreamManager* MediaStreamManager::GetForResourceContext(
return rv;
}
-MediaStreamManager::MediaStreamManager(media::AudioManager* audio_manager)
+MediaStreamManager::MediaStreamManager(AudioManager* audio_manager)
: ALLOW_THIS_IN_INITIALIZER_LIST(
device_settings_(new MediaStreamDeviceSettings(this))),
enumeration_in_progress_(content::NUM_MEDIA_STREAM_DEVICE_TYPES, false),
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index d1e9ccc..b73e670 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -35,14 +35,12 @@
#include "content/common/media/media_stream_options.h"
#include "content/common/content_export.h"
+class AudioManager;
+
namespace content {
class ResourceContext;
}
-namespace media {
-class AudioManager;
-}
-
namespace media_stream {
class AudioInputDeviceManager;
@@ -63,9 +61,9 @@ class CONTENT_EXPORT MediaStreamManager
// been created yet, it will be constructed with the given AudioManager.
static MediaStreamManager* GetForResourceContext(
content::ResourceContext* resource_context,
- media::AudioManager* audio_manager);
+ AudioManager* audio_manager);
- explicit MediaStreamManager(media::AudioManager* audio_manager);
+ explicit MediaStreamManager(AudioManager* audio_manager);
virtual ~MediaStreamManager();
// Used to access VideoCaptureManager.
@@ -153,7 +151,7 @@ class CONTENT_EXPORT MediaStreamManager
// All non-closed request.
typedef std::map<std::string, DeviceRequest> DeviceRequests;
DeviceRequests requests_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
DISALLOW_COPY_AND_ASSIGN(MediaStreamManager);
};
diff --git a/content/browser/renderer_host/media/video_capture_host.cc b/content/browser/renderer_host/media/video_capture_host.cc
index 09f6981..3efcd7c 100644
--- a/content/browser/renderer_host/media/video_capture_host.cc
+++ b/content/browser/renderer_host/media/video_capture_host.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -38,7 +38,7 @@ struct VideoCaptureHost::Entry {
};
VideoCaptureHost::VideoCaptureHost(content::ResourceContext* resource_context,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: resource_context_(resource_context),
audio_manager_(audio_manager) {
}
diff --git a/content/browser/renderer_host/media/video_capture_host.h b/content/browser/renderer_host/media/video_capture_host.h
index 5e59722..bea1657 100644
--- a/content/browser/renderer_host/media/video_capture_host.h
+++ b/content/browser/renderer_host/media/video_capture_host.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
//
@@ -45,20 +45,18 @@
#include "content/public/browser/browser_message_filter.h"
#include "ipc/ipc_message.h"
+class AudioManager;
+
namespace content {
class ResourceContext;
} // namespace content
-namespace media {
-class AudioManager;
-}
-
class CONTENT_EXPORT VideoCaptureHost
: public content::BrowserMessageFilter,
public VideoCaptureControllerEventHandler {
public:
explicit VideoCaptureHost(content::ResourceContext* resource_context,
- media::AudioManager* audio_manager);
+ AudioManager* audio_manager);
// content::BrowserMessageFilter implementation.
virtual void OnChannelClosing() OVERRIDE;
@@ -147,7 +145,7 @@ class CONTENT_EXPORT VideoCaptureHost
// Used to get a pointer to VideoCaptureManager to start/stop capture devices.
content::ResourceContext* resource_context_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost);
};
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index 635b1bd..4b91bf4 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -72,7 +72,7 @@ class DumpVideo {
class MockVideoCaptureHost : public VideoCaptureHost {
public:
MockVideoCaptureHost(content::ResourceContext* resource_context,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: VideoCaptureHost(resource_context, audio_manager),
return_buffers_(false),
dump_video_(false) {}
@@ -205,7 +205,7 @@ class VideoCaptureHostTest : public testing::Test {
io_thread_.reset(new BrowserThreadImpl(BrowserThread::IO,
message_loop_.get()));
- audio_manager_.reset(media::AudioManager::Create());
+ audio_manager_.reset(AudioManager::Create());
#ifndef TEST_REAL_CAPTURE_DEVICE
media_stream::MediaStreamManager::GetForResourceContext(
@@ -246,7 +246,7 @@ class VideoCaptureHostTest : public testing::Test {
// Called on the main thread.
static void PostQuitOnVideoCaptureManagerThread(
MessageLoop* message_loop, content::ResourceContext* resource_context,
- media:: AudioManager* audio_manager) {
+ AudioManager* audio_manager) {
media_stream::MediaStreamManager* manager =
media_stream::MediaStreamManager::GetForResourceContext(
resource_context, audio_manager);
@@ -362,7 +362,7 @@ class VideoCaptureHostTest : public testing::Test {
scoped_ptr<MessageLoop> message_loop_;
scoped_ptr<BrowserThreadImpl> ui_thread_;
scoped_ptr<BrowserThreadImpl> io_thread_;
- scoped_ptr<media::AudioManager> audio_manager_;
+ scoped_ptr<AudioManager> audio_manager_;
content::MockResourceContext resource_context_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHostTest);
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index 91f37ae..a0dc2a3 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -692,7 +692,7 @@ void RenderMessageFilter::OnGetHardwareBufferSize(uint32* buffer_size) {
void RenderMessageFilter::OnGetHardwareInputSampleRate(int* sample_rate) {
// TODO(henrika): add support for all available input devices.
*sample_rate = media::GetAudioInputHardwareSampleRate(
- media::AudioManagerBase::kDefaultDeviceId);
+ AudioManagerBase::kDefaultDeviceId);
}
void RenderMessageFilter::OnGetHardwareSampleRate(int* sample_rate) {
@@ -703,7 +703,7 @@ void RenderMessageFilter::OnGetHardwareInputChannelLayout(
ChannelLayout* layout) {
// TODO(henrika): add support for all available input devices.
*layout = media::GetAudioInputHardwareChannelLayout(
- media::AudioManagerBase::kDefaultDeviceId);
+ AudioManagerBase::kDefaultDeviceId);
}
void RenderMessageFilter::OnDownloadUrl(const IPC::Message& message,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 57edc18..a3fa88a 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -471,8 +471,7 @@ void RenderProcessHostImpl::CreateMessageFilters() {
#if !defined(OS_ANDROID)
// TODO(dtrainor, klobag): Enable this when content::BrowserMainLoop gets
// included in Android builds. Tracked via 115941.
- media::AudioManager* audio_manager =
- content::BrowserMainLoop::GetAudioManager();
+ AudioManager* audio_manager = content::BrowserMainLoop::GetAudioManager();
channel_->AddFilter(new AudioInputRendererHost(
resource_context, audio_manager));
channel_->AddFilter(new AudioRendererHost(audio_manager, media_observer));
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.cc b/content/browser/speech/input_tag_speech_dispatcher_host.cc
index 6ec3be0..7c10270 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.cc
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.cc
@@ -118,7 +118,7 @@ InputTagSpeechDispatcherHost::InputTagSpeechDispatcherHost(
int render_process_id,
net::URLRequestContextGetter* context_getter,
content::SpeechRecognitionPreferences* recognition_preferences,
- media::AudioManager* audio_manager)
+ AudioManager* audio_manager)
: render_process_id_(render_process_id),
may_have_pending_requests_(false),
context_getter_(context_getter),
diff --git a/content/browser/speech/input_tag_speech_dispatcher_host.h b/content/browser/speech/input_tag_speech_dispatcher_host.h
index c988faf..61d68b0 100644
--- a/content/browser/speech/input_tag_speech_dispatcher_host.h
+++ b/content/browser/speech/input_tag_speech_dispatcher_host.h
@@ -10,6 +10,7 @@
#include "content/public/browser/browser_message_filter.h"
#include "net/url_request/url_request_context_getter.h"
+class AudioManager;
struct InputTagSpeechHostMsg_StartRecognition_Params;
namespace content {
@@ -17,10 +18,6 @@ class SpeechRecognitionPreferences;
struct SpeechRecognitionResult;
}
-namespace media {
-class AudioManager;
-}
-
namespace speech {
class SpeechRecognitionManagerImpl;
@@ -37,7 +34,7 @@ class CONTENT_EXPORT InputTagSpeechDispatcherHost
int render_process_id,
net::URLRequestContextGetter* context_getter,
content::SpeechRecognitionPreferences* recognition_preferences,
- media::AudioManager* audio_manager);
+ AudioManager* audio_manager);
// Methods called by SpeechRecognitionManagerImpl.
void SetRecognitionResult(int caller_id,
@@ -69,7 +66,7 @@ class CONTENT_EXPORT InputTagSpeechDispatcherHost
scoped_refptr<net::URLRequestContextGetter> context_getter_;
scoped_refptr<content::SpeechRecognitionPreferences> recognition_preferences_;
- media::AudioManager* audio_manager_;
+ AudioManager* audio_manager_;
static SpeechRecognitionManagerImpl* manager_;
diff --git a/content/browser/speech/speech_recognition_manager_impl.cc b/content/browser/speech/speech_recognition_manager_impl.cc
index 7600b50..e9d9d01 100644
--- a/content/browser/speech/speech_recognition_manager_impl.cc
+++ b/content/browser/speech/speech_recognition_manager_impl.cc
@@ -114,7 +114,7 @@ void SpeechRecognitionManagerImpl::ShowAudioInputSettings() {
return;
}
- media::AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
+ AudioManager* audio_manager = BrowserMainLoop::GetAudioManager();
DCHECK(audio_manager->CanShowAudioInputSettings());
if (audio_manager->CanShowAudioInputSettings())
audio_manager->ShowAudioInputSettings();
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index 07bd75e..05f81e7 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -23,7 +23,6 @@ using content::SpeechRecognitionEventListener;
using content::SpeechRecognitionResult;
using content::SpeechRecognizer;
using media::AudioInputController;
-using media::AudioManager;
namespace {
@@ -138,12 +137,13 @@ void SpeechRecognizerImpl::StartRecognition() {
endpointer_.SetEnvironmentEstimationMode();
AudioManager* audio_manager = (testing_audio_manager_ != NULL) ?
- testing_audio_manager_ : BrowserMainLoop::GetAudioManager();
+ testing_audio_manager_ :
+ BrowserMainLoop::GetAudioManager();
const int samples_per_packet = kAudioSampleRate *
GoogleOneShotRemoteEngine::kAudioPacketIntervalMs / 1000;
- media::AudioParameters params(
- media::AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout,
- kAudioSampleRate, kNumBitsPerAudioSample, samples_per_packet);
+ AudioParameters params(AudioParameters::AUDIO_PCM_LINEAR, kChannelLayout,
+ kAudioSampleRate, kNumBitsPerAudioSample,
+ samples_per_packet);
audio_controller_ = AudioInputController::Create(audio_manager, this, params);
DCHECK(audio_controller_.get());
VLOG(1) << "SpeechRecognizer starting record.";
diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
index 516dfea..eed04bc 100644
--- a/content/browser/speech/speech_recognizer_impl.h
+++ b/content/browser/speech/speech_recognizer_impl.h
@@ -22,7 +22,6 @@ struct SpeechRecognitionResult;
namespace media {
class AudioInputController;
-class AudioManager;
}
namespace speech {
@@ -92,10 +91,10 @@ class CONTENT_EXPORT SpeechRecognizerImpl
// without blocking the IO thread.
void CloseAudioControllerAsynchronously();
- void SetAudioManagerForTesting(media::AudioManager* audio_manager);
+ void SetAudioManagerForTesting(AudioManager* audio_manager);
content::SpeechRecognitionEventListener* listener_;
- media::AudioManager* testing_audio_manager_;
+ AudioManager* testing_audio_manager_;
scoped_ptr<SpeechRecognitionEngine> recognition_engine_;
Endpointer endpointer_;
scoped_refptr<media::AudioInputController> audio_controller_;
diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc
index 01b7e4c..d553064 100644
--- a/content/browser/speech/speech_recognizer_impl_unittest.cc
+++ b/content/browser/speech/speech_recognizer_impl_unittest.cc
@@ -20,16 +20,12 @@
using content::BrowserThread;
using content::BrowserThreadImpl;
using media::AudioInputController;
-using media::AudioInputStream;
-using media::AudioManager;
-using media::AudioOutputStream;
-using media::AudioParameters;
using media::TestAudioInputController;
using media::TestAudioInputControllerFactory;
namespace {
-class MockAudioManager : public media::AudioManagerBase {
+class MockAudioManager : public AudioManagerBase {
public:
MockAudioManager() {
audio_thread_.reset(new base::Thread("MockAudioThread"));
@@ -44,7 +40,7 @@ class MockAudioManager : public media::AudioManagerBase {
media::AudioDeviceNames* device_names) OVERRIDE {}
virtual AudioOutputStream* MakeAudioOutputStream(
const AudioParameters& params) OVERRIDE {
- return media::FakeAudioOutputStream::MakeFakeStream(this, params);
+ return FakeAudioOutputStream::MakeFakeStream(this, params);
}
virtual AudioOutputStream* MakeAudioOutputStreamProxy(
const AudioParameters& params) OVERRIDE {
@@ -53,7 +49,7 @@ class MockAudioManager : public media::AudioManagerBase {
}
virtual AudioInputStream* MakeAudioInputStream(
const AudioParameters& params, const std::string& device_id) OVERRIDE {
- return media::FakeAudioInputStream::MakeFakeStream(this, params);
+ return FakeAudioInputStream::MakeFakeStream(this, params);
}
virtual AudioOutputStream* MakeLinearOutputStream(
const AudioParameters& params) OVERRIDE {
diff --git a/content/common/media/audio_messages.h b/content/common/media/audio_messages.h
index ce0d4bd..0acb35c 100644
--- a/content/common/media/audio_messages.h
+++ b/content/common/media/audio_messages.h
@@ -23,7 +23,7 @@
IPC_ENUM_TRAITS(AudioStreamState)
-IPC_STRUCT_TRAITS_BEGIN(media::AudioBuffersState)
+IPC_STRUCT_TRAITS_BEGIN(AudioBuffersState)
IPC_STRUCT_TRAITS_MEMBER(pending_bytes)
IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes)
IPC_STRUCT_TRAITS_END()
@@ -90,12 +90,12 @@ IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted,
// Request that got sent to browser for creating an audio output stream
IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream,
int /* stream_id */,
- media::AudioParameters /* params */)
+ AudioParameters /* params */)
// Request that got sent to browser for creating an audio input stream
IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream,
int /* stream_id */,
- media::AudioParameters /* params */,
+ AudioParameters /* params */,
std::string /* device_id */,
bool /* automatic_gain_control */)
diff --git a/content/common/media/audio_param_traits.cc b/content/common/media/audio_param_traits.cc
index 7092540..049037f 100644
--- a/content/common/media/audio_param_traits.cc
+++ b/content/common/media/audio_param_traits.cc
@@ -7,8 +7,6 @@
#include "base/stringprintf.h"
#include "media/audio/audio_parameters.h"
-using media::AudioParameters;
-
namespace IPC {
void ParamTraits<AudioParameters>::Write(Message* m,
diff --git a/content/common/media/audio_param_traits.h b/content/common/media/audio_param_traits.h
index 578f9a3..13c1139 100644
--- a/content/common/media/audio_param_traits.h
+++ b/content/common/media/audio_param_traits.h
@@ -9,15 +9,13 @@
#include "ipc/ipc_message.h"
#include "ipc/ipc_param_traits.h"
-namespace media {
class AudioParameters;
-}
namespace IPC {
template <>
-struct ParamTraits<media::AudioParameters> {
- typedef media::AudioParameters param_type;
+struct ParamTraits<AudioParameters> {
+ typedef AudioParameters param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
diff --git a/content/renderer/media/audio_device.cc b/content/renderer/media/audio_device.cc
index 60e36a7..b1e5cdf 100644
--- a/content/renderer/media/audio_device.cc
+++ b/content/renderer/media/audio_device.cc
@@ -23,7 +23,7 @@ using media::AudioRendererSink;
class AudioDevice::AudioThreadCallback
: public AudioDeviceThread::Callback {
public:
- AudioThreadCallback(const media::AudioParameters& audio_parameters,
+ AudioThreadCallback(const AudioParameters& audio_parameters,
base::SharedMemoryHandle memory,
int memory_length,
AudioRendererSink::RenderCallback* render_callback);
@@ -49,7 +49,7 @@ AudioDevice::AudioDevice()
filter_ = RenderThreadImpl::current()->audio_message_filter();
}
-AudioDevice::AudioDevice(const media::AudioParameters& params,
+AudioDevice::AudioDevice(const AudioParameters& params,
RenderCallback* callback)
: ScopedLoopObserver(ChildProcess::current()->io_message_loop()),
audio_parameters_(params),
@@ -61,7 +61,7 @@ AudioDevice::AudioDevice(const media::AudioParameters& params,
filter_ = RenderThreadImpl::current()->audio_message_filter();
}
-void AudioDevice::Initialize(const media::AudioParameters& params,
+void AudioDevice::Initialize(const AudioParameters& params,
RenderCallback* callback) {
CHECK_EQ(0, stream_id_) <<
"AudioDevice::Initialize() must be called before Start()";
@@ -130,7 +130,7 @@ void AudioDevice::GetVolume(double* volume) {
*volume = volume_;
}
-void AudioDevice::InitializeOnIOThread(const media::AudioParameters& params) {
+void AudioDevice::InitializeOnIOThread(const AudioParameters& params) {
DCHECK(message_loop()->BelongsToCurrentThread());
// Make sure we don't create the stream more than once.
DCHECK_EQ(0, stream_id_);
@@ -262,7 +262,7 @@ void AudioDevice::WillDestroyCurrentMessageLoop() {
// AudioDevice::AudioThreadCallback
AudioDevice::AudioThreadCallback::AudioThreadCallback(
- const media::AudioParameters& audio_parameters,
+ const AudioParameters& audio_parameters,
base::SharedMemoryHandle memory,
int memory_length,
media::AudioRendererSink::RenderCallback* render_callback)
diff --git a/content/renderer/media/audio_device.h b/content/renderer/media/audio_device.h
index 9410ce7..4cdb946 100644
--- a/content/renderer/media/audio_device.h
+++ b/content/renderer/media/audio_device.h
@@ -76,10 +76,6 @@
#include "media/audio/audio_parameters.h"
#include "media/base/audio_renderer_sink.h"
-namespace media {
-class AudioParameters;
-}
-
class CONTENT_EXPORT AudioDevice
: NON_EXPORTED_BASE(public media::AudioRendererSink),
public AudioMessageFilter::Delegate,
@@ -90,11 +86,11 @@ class CONTENT_EXPORT AudioDevice
// Minimal constructor where Initialize() must be called later.
AudioDevice();
- AudioDevice(const media::AudioParameters& params, RenderCallback* callback);
+ AudioDevice(const AudioParameters& params, RenderCallback* callback);
// AudioRendererSink implementation.
- virtual void Initialize(const media::AudioParameters& params,
+ virtual void Initialize(const AudioParameters& params,
RenderCallback* callback) OVERRIDE;
// Starts audio playback.
virtual void Start() OVERRIDE;
@@ -136,7 +132,7 @@ class CONTENT_EXPORT AudioDevice
// The following methods are tasks posted on the IO thread that needs to
// be executed on that thread. They interact with AudioMessageFilter and
// sends IPC messages on that thread.
- void InitializeOnIOThread(const media::AudioParameters& params);
+ void InitializeOnIOThread(const AudioParameters& params);
void PlayOnIOThread();
void PauseOnIOThread(bool flush);
void ShutDownOnIOThread();
@@ -148,7 +144,7 @@ class CONTENT_EXPORT AudioDevice
// If the IO loop dies before we do, we shut down the audio thread from here.
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
- media::AudioParameters audio_parameters_;
+ AudioParameters audio_parameters_;
RenderCallback* callback_;
diff --git a/content/renderer/media/audio_device_thread.cc b/content/renderer/media/audio_device_thread.cc
index c3cb6ce..77f37dcf 100644
--- a/content/renderer/media/audio_device_thread.cc
+++ b/content/renderer/media/audio_device_thread.cc
@@ -170,9 +170,9 @@ void AudioDeviceThread::Thread::Run() {
// AudioDeviceThread::Callback implementation
-AudioDeviceThread::Callback::Callback(
- const media::AudioParameters& audio_parameters,
- base::SharedMemoryHandle memory, int memory_length)
+AudioDeviceThread::Callback::Callback(const AudioParameters& audio_parameters,
+ base::SharedMemoryHandle memory,
+ int memory_length)
: audio_parameters_(audio_parameters),
samples_per_ms_(audio_parameters.sample_rate() / 1000),
bytes_per_ms_(audio_parameters.channels() *
diff --git a/content/renderer/media/audio_device_thread.h b/content/renderer/media/audio_device_thread.h
index 0b9f82e..51c6fda 100644
--- a/content/renderer/media/audio_device_thread.h
+++ b/content/renderer/media/audio_device_thread.h
@@ -35,7 +35,7 @@ class CONTENT_EXPORT AudioDeviceThread {
// AudioDevice thread.
class Callback {
public:
- Callback(const media::AudioParameters& audio_parameters,
+ Callback(const AudioParameters& audio_parameters,
base::SharedMemoryHandle memory,
int memory_length);
virtual ~Callback();
@@ -54,7 +54,7 @@ class CONTENT_EXPORT AudioDeviceThread {
// Protected so that derived classes can access directly.
// The variables are 'const' since values are calculated/set in the
// constructor and must never change.
- const media::AudioParameters audio_parameters_;
+ const AudioParameters audio_parameters_;
const int samples_per_ms_;
const int bytes_per_ms_;
diff --git a/content/renderer/media/audio_input_device.cc b/content/renderer/media/audio_input_device.cc
index 09c0ba7..11a3938 100644
--- a/content/renderer/media/audio_input_device.cc
+++ b/content/renderer/media/audio_input_device.cc
@@ -21,7 +21,7 @@
class AudioInputDevice::AudioThreadCallback
: public AudioDeviceThread::Callback {
public:
- AudioThreadCallback(const media::AudioParameters& audio_parameters,
+ AudioThreadCallback(const AudioParameters& audio_parameters,
base::SharedMemoryHandle memory,
int memory_length,
CaptureCallback* capture_callback);
@@ -37,7 +37,7 @@ class AudioInputDevice::AudioThreadCallback
DISALLOW_COPY_AND_ASSIGN(AudioThreadCallback);
};
-AudioInputDevice::AudioInputDevice(const media::AudioParameters& params,
+AudioInputDevice::AudioInputDevice(const AudioParameters& params,
CaptureCallback* callback,
CaptureEventHandler* event_handler)
: ScopedLoopObserver(ChildProcess::current()->io_message_loop()),
@@ -117,8 +117,7 @@ void AudioInputDevice::InitializeOnIOThread() {
// and create the stream when getting a OnDeviceReady() callback.
if (!session_id_) {
Send(new AudioInputHostMsg_CreateStream(
- stream_id_, audio_parameters_,
- media::AudioManagerBase::kDefaultDeviceId,
+ stream_id_, audio_parameters_, AudioManagerBase::kDefaultDeviceId,
agc_is_enabled_));
} else {
Send(new AudioInputHostMsg_StartDevice(stream_id_, session_id_));
@@ -298,7 +297,7 @@ void AudioInputDevice::WillDestroyCurrentMessageLoop() {
// AudioInputDevice::AudioThreadCallback
AudioInputDevice::AudioThreadCallback::AudioThreadCallback(
- const media::AudioParameters& audio_parameters,
+ const AudioParameters& audio_parameters,
base::SharedMemoryHandle memory,
int memory_length,
CaptureCallback* capture_callback)
@@ -317,10 +316,10 @@ void AudioInputDevice::AudioThreadCallback::Process(int pending_data) {
// The shared memory represents parameters, size of the data buffer and the
// actual data buffer containing audio data. Map the memory into this
// structure and parse out parameters and the data area.
- media::AudioInputBuffer* buffer =
- reinterpret_cast<media::AudioInputBuffer*>(shared_memory_.memory());
+ AudioInputBuffer* buffer =
+ reinterpret_cast<AudioInputBuffer*>(shared_memory_.memory());
uint32 size = buffer->params.size;
- DCHECK_EQ(size, memory_length_ - sizeof(media::AudioInputBufferParameters));
+ DCHECK_EQ(size, memory_length_ - sizeof(AudioInputBufferParameters));
double volume = buffer->params.volume;
int audio_delay_milliseconds = pending_data / bytes_per_ms_;
diff --git a/content/renderer/media/audio_input_device.h b/content/renderer/media/audio_input_device.h
index ac68b96..99cd03c 100644
--- a/content/renderer/media/audio_input_device.h
+++ b/content/renderer/media/audio_input_device.h
@@ -118,8 +118,7 @@ class CONTENT_EXPORT AudioInputDevice
};
// Methods called on main render thread -------------------------------------
- AudioInputDevice(const media::AudioParameters& params,
- CaptureCallback* callback,
+ AudioInputDevice(const AudioParameters& params, CaptureCallback* callback,
CaptureEventHandler* event_handler);
virtual ~AudioInputDevice();
@@ -185,7 +184,7 @@ class CONTENT_EXPORT AudioInputDevice
virtual void WillDestroyCurrentMessageLoop() OVERRIDE;
// Format
- media::AudioParameters audio_parameters_;
+ AudioParameters audio_parameters_;
CaptureCallback* callback_;
CaptureEventHandler* event_handler_;
diff --git a/content/renderer/media/audio_renderer_impl.cc b/content/renderer/media/audio_renderer_impl.cc
index 81d1cc6..112be63 100644
--- a/content/renderer/media/audio_renderer_impl.cc
+++ b/content/renderer/media/audio_renderer_impl.cc
@@ -61,7 +61,7 @@ bool AudioRendererImpl::OnInitialize(int bits_per_channel,
// Please see: http://code.google.com/p/chromium/issues/detail?id=103627
// for more details.
audio_parameters_.Reset(
- media::AudioParameters::AUDIO_PCM_LINEAR,
+ AudioParameters::AUDIO_PCM_LINEAR,
channel_layout, sample_rate, bits_per_channel,
audio_hardware::GetHighLatencyOutputBufferSize(sample_rate));
diff --git a/content/renderer/media/audio_renderer_impl.h b/content/renderer/media/audio_renderer_impl.h
index 978f5a0..c2f8864 100644
--- a/content/renderer/media/audio_renderer_impl.h
+++ b/content/renderer/media/audio_renderer_impl.h
@@ -129,7 +129,7 @@ class CONTENT_EXPORT AudioRendererImpl
// than nothing.
base::Time earliest_end_time_;
- media::AudioParameters audio_parameters_;
+ AudioParameters audio_parameters_;
DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl);
};
diff --git a/content/renderer/media/render_audiosourceprovider.cc b/content/renderer/media/render_audiosourceprovider.cc
index a627bfa..5159d4d 100644
--- a/content/renderer/media/render_audiosourceprovider.cc
+++ b/content/renderer/media/render_audiosourceprovider.cc
@@ -73,7 +73,7 @@ void RenderAudioSourceProvider::GetVolume(double* volume) {
}
void RenderAudioSourceProvider::Initialize(
- const media::AudioParameters& params, RenderCallback* renderer) {
+ const AudioParameters& params, RenderCallback* renderer) {
base::AutoLock auto_lock(sink_lock_);
CHECK(!is_initialized_);
renderer_ = renderer;
diff --git a/content/renderer/media/render_audiosourceprovider.h b/content/renderer/media/render_audiosourceprovider.h
index 6d842cb..c0a3a88 100644
--- a/content/renderer/media/render_audiosourceprovider.h
+++ b/content/renderer/media/render_audiosourceprovider.h
@@ -60,7 +60,7 @@ class RenderAudioSourceProvider
virtual bool SetVolume(double volume) OVERRIDE;
virtual void GetVolume(double* volume) OVERRIDE;
virtual void Initialize(
- const media::AudioParameters& params, RenderCallback* renderer) OVERRIDE;
+ const AudioParameters& params, RenderCallback* renderer) OVERRIDE;
private:
// Set to true when Initialize() is called.
diff --git a/content/renderer/media/renderer_webaudiodevice_impl.cc b/content/renderer/media/renderer_webaudiodevice_impl.cc
index 2a90144..d054325 100644
--- a/content/renderer/media/renderer_webaudiodevice_impl.cc
+++ b/content/renderer/media/renderer_webaudiodevice_impl.cc
@@ -8,8 +8,7 @@ using WebKit::WebAudioDevice;
using WebKit::WebVector;
RendererWebAudioDeviceImpl::RendererWebAudioDeviceImpl(
- const media::AudioParameters& params,
- WebAudioDevice::RenderCallback* callback)
+ const AudioParameters& params, WebAudioDevice::RenderCallback* callback)
: is_running_(false),
client_callback_(callback) {
audio_device_ = new AudioDevice(params, this);
diff --git a/content/renderer/media/renderer_webaudiodevice_impl.h b/content/renderer/media/renderer_webaudiodevice_impl.h
index a70c0884..7b66033 100644
--- a/content/renderer/media/renderer_webaudiodevice_impl.h
+++ b/content/renderer/media/renderer_webaudiodevice_impl.h
@@ -12,15 +12,12 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebAudioDevice.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
-namespace media {
class AudioParameters;
-}
-class RendererWebAudioDeviceImpl
- : public WebKit::WebAudioDevice,
- public AudioDevice::RenderCallback {
+class RendererWebAudioDeviceImpl : public WebKit::WebAudioDevice,
+ public AudioDevice::RenderCallback {
public:
- RendererWebAudioDeviceImpl(const media::AudioParameters& params,
+ RendererWebAudioDeviceImpl(const AudioParameters& params,
WebKit::WebAudioDevice::RenderCallback* callback);
virtual ~RendererWebAudioDeviceImpl();
diff --git a/content/renderer/media/webrtc_audio_device_impl.cc b/content/renderer/media/webrtc_audio_device_impl.cc
index 1eeea33..a25bdca 100644
--- a/content/renderer/media/webrtc_audio_device_impl.cc
+++ b/content/renderer/media/webrtc_audio_device_impl.cc
@@ -11,8 +11,6 @@
#include "content/renderer/render_thread_impl.h"
#include "media/audio/audio_util.h"
-using media::AudioParameters;
-
static const int64 kMillisecondsBetweenProcessCalls = 5000;
static const double kMaxVolumeLevel = 255.0;
diff --git a/content/renderer/media/webrtc_audio_device_impl.h b/content/renderer/media/webrtc_audio_device_impl.h
index 8900ebf..c00e129 100644
--- a/content/renderer/media/webrtc_audio_device_impl.h
+++ b/content/renderer/media/webrtc_audio_device_impl.h
@@ -416,8 +416,8 @@ class CONTENT_EXPORT WebRtcAudioDeviceImpl
webrtc::AudioTransport* audio_transport_callback_;
// Cached values of utilized audio parameters. Platform dependent.
- media::AudioParameters input_audio_parameters_;
- media::AudioParameters output_audio_parameters_;
+ AudioParameters input_audio_parameters_;
+ AudioParameters output_audio_parameters_;
// Cached value of the current audio delay on the input/capture side.
int input_delay_ms_;
diff --git a/content/renderer/pepper/pepper_platform_audio_input_impl.cc b/content/renderer/pepper/pepper_platform_audio_input_impl.cc
index 3ac06f2..6c42f75 100644
--- a/content/renderer/pepper/pepper_platform_audio_input_impl.cc
+++ b/content/renderer/pepper/pepper_platform_audio_input_impl.cc
@@ -93,7 +93,7 @@ bool PepperPlatformAudioInputImpl::Initialize(
plugin_delegate_ = plugin_delegate;
client_ = client;
- params_.Reset(media::AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO,
+ params_.Reset(AudioParameters::AUDIO_PCM_LINEAR, CHANNEL_LAYOUT_MONO,
sample_rate, 16, frames_per_buffer);
if (device_id.empty()) {
@@ -127,8 +127,7 @@ void PepperPlatformAudioInputImpl::InitializeOnIOThread(int session_id) {
if (!session_id) {
// We will be notified by OnStreamCreated().
filter_->Send(new AudioInputHostMsg_CreateStream(
- stream_id_, params_,
- media::AudioManagerBase::kDefaultDeviceId, false));
+ stream_id_, params_, AudioManagerBase::kDefaultDeviceId, false));
} else {
// We will be notified by OnDeviceReady().
filter_->Send(new AudioInputHostMsg_StartDevice(stream_id_, session_id));
diff --git a/content/renderer/pepper/pepper_platform_audio_input_impl.h b/content/renderer/pepper/pepper_platform_audio_input_impl.h
index 384a7c6..15681bb 100644
--- a/content/renderer/pepper/pepper_platform_audio_input_impl.h
+++ b/content/renderer/pepper/pepper_platform_audio_input_impl.h
@@ -15,10 +15,7 @@
#include "media/audio/audio_parameters.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
-namespace media {
class AudioParameters;
-}
-
class PepperPluginDelegateImpl;
// PepperPlatformAudioInputImpl is operated on two threads: the main thread (the
@@ -28,7 +25,6 @@ class PepperPluginDelegateImpl;
// also sent on the main thread. Internally, this class sends audio input IPC
// messages and receives AudioInputMessageFilter::Delegate notifications on the
// I/O thread.
-
class PepperPlatformAudioInputImpl
: public webkit::ppapi::PluginDelegate::PlatformAudioInput,
public AudioInputMessageFilter::Delegate,
@@ -106,7 +102,7 @@ class PepperPlatformAudioInputImpl
bool shutdown_called_;
// Initialized on the main thread and accessed on the I/O thread afterwards.
- media::AudioParameters params_;
+ AudioParameters params_;
DISALLOW_COPY_AND_ASSIGN(PepperPlatformAudioInputImpl);
};
diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.cc b/content/renderer/pepper/pepper_platform_audio_output_impl.cc
index bab8322..be636dc 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.cc
@@ -83,20 +83,20 @@ bool PepperPlatformAudioOutputImpl::Initialize(
client_ = client;
- media::AudioParameters::Format format;
+ AudioParameters::Format format;
const int kMaxFramesForLowLatency = 2048;
// Use the low latency back end if the client request is compatible, and
// the sample count is low enough to justify using AUDIO_PCM_LOW_LATENCY.
if (sample_rate == audio_hardware::GetOutputSampleRate() &&
frames_per_buffer <= kMaxFramesForLowLatency &&
frames_per_buffer % audio_hardware::GetOutputBufferSize() == 0) {
- format = media::AudioParameters::AUDIO_PCM_LOW_LATENCY;
+ format = AudioParameters::AUDIO_PCM_LOW_LATENCY;
} else {
- format = media::AudioParameters::AUDIO_PCM_LINEAR;
+ format = AudioParameters::AUDIO_PCM_LINEAR;
}
- media::AudioParameters params(format, CHANNEL_LAYOUT_STEREO, sample_rate, 16,
- frames_per_buffer);
+ AudioParameters params(format, CHANNEL_LAYOUT_STEREO, sample_rate,
+ 16, frames_per_buffer);
ChildProcess::current()->io_message_loop()->PostTask(
FROM_HERE,
@@ -106,7 +106,7 @@ bool PepperPlatformAudioOutputImpl::Initialize(
}
void PepperPlatformAudioOutputImpl::InitializeOnIOThread(
- const media::AudioParameters& params) {
+ const AudioParameters& params) {
stream_id_ = filter_->AddDelegate(this);
filter_->Send(new AudioHostMsg_CreateStream(stream_id_, params));
}
diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.h b/content/renderer/pepper/pepper_platform_audio_output_impl.h
index b1609ef..f1d5cba 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.h
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.h
@@ -10,9 +10,7 @@
#include "content/renderer/media/audio_message_filter.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
-namespace media{
class AudioParameters;
-}
namespace base {
class MessageLoopProxy;
@@ -46,7 +44,7 @@ class PepperPlatformAudioOutputImpl
webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client);
// I/O thread backends to above functions.
- void InitializeOnIOThread(const media::AudioParameters& params);
+ void InitializeOnIOThread(const AudioParameters& params);
void StartPlaybackOnIOThread();
void StopPlaybackOnIOThread();
void ShutDownOnIOThread();
diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc
index 7afb22d..18c2008 100644
--- a/content/renderer/renderer_webkitplatformsupport_impl.cc
+++ b/content/renderer/renderer_webkitplatformsupport_impl.cc
@@ -658,9 +658,11 @@ RendererWebKitPlatformSupportImpl::createAudioDevice(
layout = CHANNEL_LAYOUT_STEREO;
}
- media::AudioParameters params(
- media::AudioParameters::AUDIO_PCM_LOW_LATENCY, layout,
- static_cast<int>(sampleRate), 16, bufferSize);
+ AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
+ layout,
+ static_cast<int>(sampleRate),
+ 16,
+ bufferSize);
return new RendererWebAudioDeviceImpl(params, callback);
}
diff --git a/content/test/webrtc_audio_device_test.cc b/content/test/webrtc_audio_device_test.cc
index 0f11917..cb37584 100644
--- a/content/test/webrtc_audio_device_test.cc
+++ b/content/test/webrtc_audio_device_test.cc
@@ -164,7 +164,7 @@ void WebRTCAudioDeviceTest::InitializeIOThread(const char* thread_name) {
io_thread_.reset(new content::TestBrowserThread(content::BrowserThread::IO,
MessageLoop::current()));
- audio_manager_.reset(media::AudioManager::Create());
+ audio_manager_.reset(AudioManager::Create());
// Populate our resource context.
test_request_context_ = new TestURLRequestContext();
@@ -221,7 +221,7 @@ void WebRTCAudioDeviceTest::OnGetHardwareInputSampleRate(int* sample_rate) {
EXPECT_TRUE(audio_util_callback_);
*sample_rate = audio_util_callback_ ?
audio_util_callback_->GetAudioInputHardwareSampleRate(
- media::AudioManagerBase::kDefaultDeviceId) : 0;
+ AudioManagerBase::kDefaultDeviceId) : 0;
}
void WebRTCAudioDeviceTest::OnGetHardwareInputChannelLayout(
@@ -229,7 +229,7 @@ void WebRTCAudioDeviceTest::OnGetHardwareInputChannelLayout(
EXPECT_TRUE(audio_util_callback_);
*layout = audio_util_callback_ ?
audio_util_callback_->GetAudioInputHardwareChannelLayout(
- media::AudioManagerBase::kDefaultDeviceId) : CHANNEL_LAYOUT_NONE;
+ AudioManagerBase::kDefaultDeviceId) : CHANNEL_LAYOUT_NONE;
}
// IPC::Channel::Listener implementation.
diff --git a/content/test/webrtc_audio_device_test.h b/content/test/webrtc_audio_device_test.h
index dfe9f27..bd82c87 100644
--- a/content/test/webrtc_audio_device_test.h
+++ b/content/test/webrtc_audio_device_test.h
@@ -20,6 +20,7 @@
#include "third_party/webrtc/common_types.h"
class AudioInputRendererHost;
+class AudioManager;
class AudioRendererHost;
class RenderThreadImpl;
class WebRTCMockRenderProcess;
@@ -37,10 +38,6 @@ class ResourceContext;
class TestBrowserThread;
}
-namespace media {
-class AudioManager;
-}
-
namespace media_stream {
class MediaStreamManager;
}
@@ -169,7 +166,7 @@ class WebRTCAudioDeviceTest
scoped_ptr<WebRTCMockRenderProcess> mock_process_;
scoped_ptr<MockMediaObserver> media_observer_;
scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_;
- scoped_ptr<media::AudioManager> audio_manager_;
+ scoped_ptr<AudioManager> audio_manager_;
scoped_ptr<content::MockResourceContext> resource_context_;
scoped_refptr<net::URLRequestContext> test_request_context_;
scoped_ptr<IPC::Channel> channel_;
diff --git a/media/audio/android/audio_manager_android.cc b/media/audio/android/audio_manager_android.cc
index 9feb5c7..04a0564 100644
--- a/media/audio/android/audio_manager_android.cc
+++ b/media/audio/android/audio_manager_android.cc
@@ -11,8 +11,6 @@
#include "media/audio/audio_manager.h"
#include "media/audio/fake_audio_input_stream.h"
-namespace media {
-
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 10;
@@ -67,5 +65,3 @@ AudioInputStream* AudioManagerAndroid::MakeLowLatencyInputStream(
DCHECK_EQ(AudioParameters::AUDIO_PCM_LOW_LATENCY, params.format());
return new OpenSLESInputStream(this, params);
}
-
-} // namespace media
diff --git a/media/audio/android/audio_manager_android.h b/media/audio/android/audio_manager_android.h
index 90e319a..5d42270 100644
--- a/media/audio/android/audio_manager_android.h
+++ b/media/audio/android/audio_manager_android.h
@@ -7,8 +7,6 @@
#include "media/audio/audio_manager_base.h"
-namespace media {
-
// Android implemention of AudioManager.
class AudioManagerAndroid : public AudioManagerBase {
public:
@@ -37,6 +35,4 @@ class AudioManagerAndroid : public AudioManagerBase {
DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
diff --git a/media/audio/android/audio_track_output_android.cc b/media/audio/android/audio_track_output_android.cc
index 7342750..d65ff19 100644
--- a/media/audio/android/audio_track_output_android.cc
+++ b/media/audio/android/audio_track_output_android.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -12,8 +12,6 @@
using base::android::AttachCurrentThread;
using base::android::CheckException;
-namespace media {
-
static const int kTimerIntervalInMilliseconds = 50;
class AudioTrackOutputStream::StreamBuffer {
@@ -311,5 +309,3 @@ void AudioTrackOutputStream::FillAudioBufferTask() {
CheckException(env);
env->DeleteLocalRef(buf);
}
-
-} // namespace media
diff --git a/media/audio/android/audio_track_output_android.h b/media/audio/android/audio_track_output_android.h
index 0ab7647..ddeab43 100644
--- a/media/audio/android/audio_track_output_android.h
+++ b/media/audio/android/audio_track_output_android.h
@@ -14,8 +14,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerAndroid;
// Implements PCM audio output support for Android using the AudioTrack API.
@@ -70,6 +68,4 @@ class AudioTrackOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(AudioTrackOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_ANDROID_AUDIO_TRACK_OUTPUT_ANDROID_H_
diff --git a/media/audio/android/audio_track_output_stub_android.cc b/media/audio/android/audio_track_output_stub_android.cc
index ab4f9ba..5171591 100644
--- a/media/audio/android/audio_track_output_stub_android.cc
+++ b/media/audio/android/audio_track_output_stub_android.cc
@@ -1,11 +1,9 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
#include "media/audio/android/audio_track_output_android.h"
-namespace media {
-
// This file was added because there is no Java environment in
// upstream yet, audio_track_output_android.cc should be used in
// downstream.
@@ -16,5 +14,3 @@ AudioOutputStream* AudioTrackOutputStream::MakeStream(
const AudioParameters& params) {
return NULL;
}
-
-} // namespace media
diff --git a/media/audio/audio_buffers_state.cc b/media/audio/audio_buffers_state.cc
index 6c4f950..7e829fe 100644
--- a/media/audio/audio_buffers_state.cc
+++ b/media/audio/audio_buffers_state.cc
@@ -4,8 +4,6 @@
#include "media/audio/audio_buffers_state.h"
-namespace media {
-
AudioBuffersState::AudioBuffersState()
: pending_bytes(0),
hardware_delay_bytes(0) {
@@ -16,5 +14,3 @@ AudioBuffersState::AudioBuffersState(int pending_bytes,
: pending_bytes(pending_bytes),
hardware_delay_bytes(hardware_delay_bytes) {
}
-
-} // namespace media
diff --git a/media/audio/audio_buffers_state.h b/media/audio/audio_buffers_state.h
index 79244ae..a7299e1 100644
--- a/media/audio/audio_buffers_state.h
+++ b/media/audio/audio_buffers_state.h
@@ -7,8 +7,6 @@
#include "media/base/media_export.h"
-namespace media {
-
// AudioBuffersState struct stores current state of audio buffers.
// It is used for audio synchronization.
struct MEDIA_EXPORT AudioBuffersState {
@@ -27,6 +25,4 @@ struct MEDIA_EXPORT AudioBuffersState {
int hardware_delay_bytes;
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_BUFFERS_STATE_H_
diff --git a/media/audio/audio_input_device_unittest.cc b/media/audio/audio_input_device_unittest.cc
index c0a4dde..470dbab 100644
--- a/media/audio/audio_input_device_unittest.cc
+++ b/media/audio/audio_input_device_unittest.cc
@@ -15,8 +15,7 @@
#endif
using base::win::ScopedCOMInitializer;
-
-namespace media {
+using media::AudioDeviceNames;
// Test fixture which allows us to override the default enumeration API on
// Windows.
@@ -172,5 +171,3 @@ TEST_F(AudioInputDeviceTest, ConvertToWinXPDeviceId) {
}
#endif
-
-} // namespace media
diff --git a/media/audio/audio_input_stream_impl.cc b/media/audio/audio_input_stream_impl.cc
index f68317c..529a9c4 100644
--- a/media/audio/audio_input_stream_impl.cc
+++ b/media/audio/audio_input_stream_impl.cc
@@ -5,8 +5,6 @@
#include "base/logging.h"
#include "media/audio/audio_input_stream_impl.h"
-namespace media {
-
static const int kMinIntervalBetweenVolumeUpdatesMs = 1000;
AudioInputStreamImpl::AudioInputStreamImpl()
@@ -68,4 +66,3 @@ void AudioInputStreamImpl::GetNormalizedVolume() {
}
}
-} // namespace media
diff --git a/media/audio/audio_input_stream_impl.h b/media/audio/audio_input_stream_impl.h
index 64980a9..d223985 100644
--- a/media/audio/audio_input_stream_impl.h
+++ b/media/audio/audio_input_stream_impl.h
@@ -10,8 +10,6 @@
#include "base/time.h"
#include "media/audio/audio_io.h"
-namespace media {
-
// AudioInputStreamImpl implements platform-independent parts of the
// AudioInputStream interface. Each platform dependent implementation
// should derive from this class.
@@ -66,6 +64,4 @@ class MEDIA_EXPORT AudioInputStreamImpl : public AudioInputStream {
DISALLOW_COPY_AND_ASSIGN(AudioInputStreamImpl);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_INPUT_STREAM_IMPL_H_
diff --git a/media/audio/audio_input_unittest.cc b/media/audio/audio_input_unittest.cc
index ee7d6d8..8d7b2ac 100644
--- a/media/audio/audio_input_unittest.cc
+++ b/media/audio/audio_input_unittest.cc
@@ -11,8 +11,6 @@
#include "media/audio/audio_manager_base.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace media {
-
static const int kSamplingRate = 8000;
static const int kSamplesPerPacket = kSamplingRate / 20;
@@ -172,5 +170,3 @@ TEST(AudioInputTest, Record) {
ais->Stop();
ais->Close();
}
-
-} // namespace media
diff --git a/media/audio/audio_input_volume_unittest.cc b/media/audio/audio_input_volume_unittest.cc
index c49187e..99f4e83 100644
--- a/media/audio/audio_input_volume_unittest.cc
+++ b/media/audio/audio_input_volume_unittest.cc
@@ -12,8 +12,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using base::win::ScopedCOMInitializer;
-
-namespace media {
+using media::AudioDeviceNames;
class AudioInputVolumeTest : public ::testing::Test {
protected:
@@ -158,5 +157,3 @@ TEST_F(AudioInputVolumeTest, InputVolumeTest) {
ais->Close();
}
}
-
-} // namespace media
diff --git a/media/audio/audio_io.h b/media/audio/audio_io.h
index cb83576..489e0ab 100644
--- a/media/audio/audio_io.h
+++ b/media/audio/audio_io.h
@@ -45,9 +45,6 @@
// as the data is written to the audio device. Size of each packet is determined
// by |samples_per_packet| specified in AudioParameters when the stream is
// created.
-
-namespace media {
-
class MEDIA_EXPORT AudioOutputStream {
public:
// Audio sources must implement AudioSourceCallback. This interface will be
@@ -176,6 +173,4 @@ class MEDIA_EXPORT AudioInputStream {
virtual bool GetAutomaticGainControl() = 0;
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_IO_H_
diff --git a/media/audio/audio_low_latency_input_output_unittest.cc b/media/audio/audio_low_latency_input_output_unittest.cc
index 8d501ca..7064063 100644
--- a/media/audio/audio_low_latency_input_output_unittest.cc
+++ b/media/audio/audio_low_latency_input_output_unittest.cc
@@ -29,10 +29,6 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-using base::win::ScopedCOMInitializer;
-
-namespace media {
-
#if defined(OS_LINUX) || defined(OS_OPENBSD)
typedef AudioManagerLinux AudioManagerAnyPlatform;
#elif defined(OS_MACOSX)
@@ -43,6 +39,9 @@ typedef AudioManagerWin AudioManagerAnyPlatform;
typedef AudioManagerAndroid AudioManagerAnyPlatform;
#endif
+using base::win::ScopedCOMInitializer;
+
+namespace {
// Limits the number of delay measurements we can store in an array and
// then write to file at end of the WASAPIAudioInputOutputFullDuplex test.
static const size_t kMaxDelayMeasurements = 1000;
@@ -123,6 +122,8 @@ class AudioLowLatencyInputOutputTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(AudioLowLatencyInputOutputTest);
};
+} // namespace
+
// This audio source/sink implementation should be used for manual tests
// only since delay measurements are stored on an output text file.
// All incoming/recorded audio packets are stored in an intermediate media
@@ -462,5 +463,3 @@ TEST_F(AudioLowLatencyInputOutputTest, DISABLED_FullDuplexDelayMeasurement) {
aos->Close();
ais->Close();
}
-
-} // namespace media
diff --git a/media/audio/audio_manager.cc b/media/audio/audio_manager.cc
index 028b409..d118789 100644
--- a/media/audio/audio_manager.cc
+++ b/media/audio/audio_manager.cc
@@ -8,8 +8,6 @@
#include "base/logging.h"
#include "base/message_loop.h"
-namespace media {
-
// Forward declaration of the platform specific AudioManager factory function.
AudioManager* CreateAudioManager();
@@ -25,5 +23,3 @@ AudioManager* AudioManager::Create() {
ret->Init();
return ret;
}
-
-} // namespace media
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 704d48f..e1f0145 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -13,17 +13,13 @@
#include "media/audio/audio_device_name.h"
#include "media/audio/audio_parameters.h"
+class AudioInputStream;
+class AudioOutputStream;
class MessageLoop;
-
namespace base {
class MessageLoopProxy;
}
-namespace media {
-
-class AudioInputStream;
-class AudioOutputStream;
-
// Manages all audio resources. In particular it owns the AudioOutputStream
// objects. Provides some convenience functions that avoid the need to provide
// iterators over the existing streams.
@@ -61,7 +57,8 @@ class MEDIA_EXPORT AudioManager {
// Appends a list of available input devices. It is not guaranteed that
// all the devices in the list support all formats and sample rates for
// recording.
- virtual void GetAudioInputDeviceNames(AudioDeviceNames* device_names) = 0;
+ virtual void GetAudioInputDeviceNames(
+ media::AudioDeviceNames* device_names) = 0;
// Factory for all the supported stream formats. |params| defines parameters
// of the audio stream to be created.
@@ -127,6 +124,4 @@ class MEDIA_EXPORT AudioManager {
DISALLOW_COPY_AND_ASSIGN(AudioManager);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_MANAGER_H_
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index 45bf0fc..89191af 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -12,8 +12,6 @@
#include "media/audio/fake_audio_input_stream.h"
#include "media/audio/fake_audio_output_stream.h"
-namespace media {
-
static const int kStreamCloseDelaySeconds = 5;
// Default maximum number of output streams that can be open simultaneously
@@ -228,5 +226,3 @@ void AudioManagerBase::ShutdownOnAudioThread() {
output_dispatchers_.clear();
}
-
-} // namespace media
diff --git a/media/audio/audio_manager_base.h b/media/audio/audio_manager_base.h
index acb85b6..ba27221 100644
--- a/media/audio/audio_manager_base.h
+++ b/media/audio/audio_manager_base.h
@@ -13,14 +13,12 @@
#include "base/synchronization/lock.h"
#include "media/audio/audio_manager.h"
+class AudioOutputDispatcher;
+
namespace base {
class Thread;
}
-namespace media {
-
-class AudioOutputDispatcher;
-
// AudioManagerBase provides AudioManager functions common for all platforms.
class MEDIA_EXPORT AudioManagerBase : public AudioManager {
public:
@@ -126,6 +124,4 @@ class MEDIA_EXPORT AudioManagerBase : public AudioManager {
DISALLOW_COPY_AND_ASSIGN(AudioManagerBase);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_MANAGER_BASE_H_
diff --git a/media/audio/audio_output_controller_unittest.cc b/media/audio/audio_output_controller_unittest.cc
index 05f3d7f..cd65f5b 100644
--- a/media/audio/audio_output_controller_unittest.cc
+++ b/media/audio/audio_output_controller_unittest.cc
@@ -22,8 +22,6 @@ using ::testing::InvokeWithoutArgs;
using ::testing::NotNull;
using ::testing::Return;
-namespace media {
-
static const int kSampleRate = AudioParameters::kAudioCDSampleRate;
static const int kBitsPerSample = 16;
static const ChannelLayout kChannelLayout = CHANNEL_LAYOUT_STEREO;
@@ -31,6 +29,8 @@ static const int kSamplesPerPacket = kSampleRate / 10;
static const int kHardwareBufferSize = kSamplesPerPacket *
ChannelLayoutToChannelCount(kChannelLayout) * kBitsPerSample / 8;
+namespace media {
+
class MockAudioOutputControllerEventHandler
: public AudioOutputController::EventHandler {
public:
diff --git a/media/audio/audio_output_dispatcher.cc b/media/audio/audio_output_dispatcher.cc
index 998fc1b..1ac7e8a 100644
--- a/media/audio/audio_output_dispatcher.cc
+++ b/media/audio/audio_output_dispatcher.cc
@@ -10,8 +10,6 @@
#include "base/time.h"
#include "media/audio/audio_io.h"
-namespace media {
-
AudioOutputDispatcher::AudioOutputDispatcher(
AudioManager* audio_manager, const AudioParameters& params,
base::TimeDelta close_delay)
@@ -170,5 +168,3 @@ void AudioOutputDispatcher::ClosePendingStreams() {
idle_streams_.pop_back();
}
}
-
-} // namespace media
diff --git a/media/audio/audio_output_dispatcher.h b/media/audio/audio_output_dispatcher.h
index 79474a4..cf01a31 100644
--- a/media/audio/audio_output_dispatcher.h
+++ b/media/audio/audio_output_dispatcher.h
@@ -32,11 +32,8 @@
#include "media/audio/audio_manager.h"
#include "media/audio/audio_parameters.h"
-class MessageLoop;
-
-namespace media {
-
class AudioOutputStream;
+class MessageLoop;
class MEDIA_EXPORT AudioOutputDispatcher
: public base::RefCountedThreadSafe<AudioOutputDispatcher> {
@@ -110,6 +107,4 @@ class MEDIA_EXPORT AudioOutputDispatcher
DISALLOW_COPY_AND_ASSIGN(AudioOutputDispatcher);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_OUTPUT_DISPATCHER_H_
diff --git a/media/audio/audio_output_proxy.cc b/media/audio/audio_output_proxy.cc
index b1d65ba..29490db 100644
--- a/media/audio/audio_output_proxy.cc
+++ b/media/audio/audio_output_proxy.cc
@@ -9,8 +9,6 @@
#include "media/audio/audio_manager.h"
#include "media/audio/audio_output_dispatcher.h"
-namespace media {
-
AudioOutputProxy::AudioOutputProxy(AudioOutputDispatcher* dispatcher)
: dispatcher_(dispatcher),
state_(kCreated),
@@ -95,5 +93,3 @@ void AudioOutputProxy::Close() {
// dispatcher+audio manager.
delete this;
}
-
-} // namespace media
diff --git a/media/audio/audio_output_proxy.h b/media/audio/audio_output_proxy.h
index d34f81f..8e1b350 100644
--- a/media/audio/audio_output_proxy.h
+++ b/media/audio/audio_output_proxy.h
@@ -12,8 +12,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioOutputDispatcher;
// AudioOutputProxy is an audio otput stream that uses resources more
@@ -64,6 +62,4 @@ class MEDIA_EXPORT AudioOutputProxy
DISALLOW_COPY_AND_ASSIGN(AudioOutputProxy);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_OUTPUT_PROXY_H_
diff --git a/media/audio/audio_output_proxy_unittest.cc b/media/audio/audio_output_proxy_unittest.cc
index 3dbfd2f2..1f955b6 100644
--- a/media/audio/audio_output_proxy_unittest.cc
+++ b/media/audio/audio_output_proxy_unittest.cc
@@ -14,15 +14,6 @@
using ::testing::_;
using ::testing::Mock;
using ::testing::Return;
-using media::AudioBuffersState;
-using media::AudioInputStream;
-using media::AudioManager;
-using media::AudioOutputDispatcher;
-using media::AudioOutputProxy;
-using media::AudioOutputStream;
-using media::AudioParameters;
-
-namespace {
static const int kTestCloseDelayMs = 100;
@@ -74,10 +65,6 @@ class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback {
MOCK_METHOD2(OnError, void(AudioOutputStream* stream, int code));
};
-} // namespace
-
-namespace media {
-
class AudioOutputProxyTest : public testing::Test {
protected:
virtual void SetUp() {
@@ -384,5 +371,3 @@ TEST_F(AudioOutputProxyTest, StartFailed) {
proxy->Close();
}
-
-} // namespace media
diff --git a/media/audio/audio_parameters.cc b/media/audio/audio_parameters.cc
index fb9b6f2..852bd12 100644
--- a/media/audio/audio_parameters.cc
+++ b/media/audio/audio_parameters.cc
@@ -6,8 +6,6 @@
#include "media/base/limits.h"
-namespace media {
-
AudioParameters::AudioParameters()
: format_(AUDIO_PCM_LINEAR),
channel_layout_(CHANNEL_LAYOUT_NONE),
@@ -83,5 +81,3 @@ bool AudioParameters::Compare::operator()(
return false;
return a.frames_per_buffer_ < b.frames_per_buffer_;
}
-
-} // namespace media
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index 8ce2070..392d328 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -9,8 +9,6 @@
#include "media/base/channel_layout.h"
#include "media/base/media_export.h"
-namespace media {
-
struct MEDIA_EXPORT AudioInputBufferParameters {
double volume;
uint32 size;
@@ -85,6 +83,4 @@ class MEDIA_EXPORT AudioParameters {
// |channel_layout|.
};
-} // namespace media
-
#endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
diff --git a/media/audio/audio_parameters_unittest.cc b/media/audio/audio_parameters_unittest.cc
index 1a1140b..bd3334f 100644
--- a/media/audio/audio_parameters_unittest.cc
+++ b/media/audio/audio_parameters_unittest.cc
@@ -7,8 +7,6 @@
#include "media/audio/audio_parameters.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace media {
-
TEST(AudioParameters, Constructor_Default) {
AudioParameters::Format expected_format = AudioParameters::AUDIO_PCM_LINEAR;
int expected_bits = 0;
@@ -165,5 +163,3 @@ TEST(AudioParameters, Compare) {
EXPECT_FALSE(target(values[i], values[i]));
}
}
-
-} // namespace media
diff --git a/media/audio/fake_audio_input_stream.cc b/media/audio/fake_audio_input_stream.cc
index 47366a0..d5ba994 100644
--- a/media/audio/fake_audio_input_stream.cc
+++ b/media/audio/fake_audio_input_stream.cc
@@ -10,8 +10,6 @@
using base::Time;
using base::TimeDelta;
-namespace media {
-
AudioInputStream* FakeAudioInputStream::MakeFakeStream(
AudioManagerBase* manager,
const AudioParameters& params) {
@@ -95,5 +93,3 @@ void FakeAudioInputStream::SetAutomaticGainControl(bool enabled) {}
bool FakeAudioInputStream::GetAutomaticGainControl() {
return false;
}
-
-} // namespace media
diff --git a/media/audio/fake_audio_input_stream.h b/media/audio/fake_audio_input_stream.h
index ceed1a0..409b799 100644
--- a/media/audio/fake_audio_input_stream.h
+++ b/media/audio/fake_audio_input_stream.h
@@ -13,11 +13,9 @@
#include "base/threading/thread.h"
#include "base/time.h"
#include "media/audio/audio_io.h"
-
-namespace media {
+#include "media/audio/audio_parameters.h"
class AudioManagerBase;
-class AudioParameters;
class MEDIA_EXPORT FakeAudioInputStream
: public AudioInputStream {
@@ -54,6 +52,4 @@ class MEDIA_EXPORT FakeAudioInputStream
DISALLOW_COPY_AND_ASSIGN(FakeAudioInputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_FAKE_AUDIO_INPUT_STREAM_H_
diff --git a/media/audio/fake_audio_output_stream.cc b/media/audio/fake_audio_output_stream.cc
index 686ccde..14a38cd 100644
--- a/media/audio/fake_audio_output_stream.cc
+++ b/media/audio/fake_audio_output_stream.cc
@@ -8,8 +8,6 @@
#include "base/logging.h"
#include "media/audio/audio_manager_base.h"
-namespace media {
-
FakeAudioOutputStream* FakeAudioOutputStream::current_fake_stream_ = NULL;
// static
@@ -72,5 +70,3 @@ FakeAudioOutputStream::~FakeAudioOutputStream() {
if (current_fake_stream_ == this)
current_fake_stream_ = NULL;
}
-
-} // namespace media
diff --git a/media/audio/fake_audio_output_stream.h b/media/audio/fake_audio_output_stream.h
index d4ab11a..19ed576 100644
--- a/media/audio/fake_audio_output_stream.h
+++ b/media/audio/fake_audio_output_stream.h
@@ -15,8 +15,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerBase;
class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream {
@@ -54,6 +52,4 @@ class MEDIA_EXPORT FakeAudioOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_
diff --git a/media/audio/linux/alsa_input.cc b/media/audio/linux/alsa_input.cc
index 84d2933..e28867f 100644
--- a/media/audio/linux/alsa_input.cc
+++ b/media/audio/linux/alsa_input.cc
@@ -15,8 +15,6 @@
#include "media/audio/linux/alsa_wrapper.h"
#include "media/audio/linux/audio_manager_linux.h"
-namespace media {
-
static const int kNumPacketsInRingBuffer = 3;
static const char kDefaultDevice1[] = "default";
@@ -343,5 +341,3 @@ void AlsaPcmInputStream::HandleError(const char* method, int error) {
LOG(WARNING) << method << ": " << wrapper_->StrError(error);
callback_->OnError(this, error);
}
-
-} // namespace media
diff --git a/media/audio/linux/alsa_input.h b/media/audio/linux/alsa_input.h
index ae027d4..6f6a981 100644
--- a/media/audio/linux/alsa_input.h
+++ b/media/audio/linux/alsa_input.h
@@ -17,8 +17,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AlsaWrapper;
class AudioManagerLinux;
@@ -87,6 +85,4 @@ class AlsaPcmInputStream : public AudioInputStreamImpl {
DISALLOW_COPY_AND_ASSIGN(AlsaPcmInputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_LINUX_ALSA_INPUT_H_
diff --git a/media/audio/linux/alsa_output.cc b/media/audio/linux/alsa_output.cc
index d940be9..fc74180 100644
--- a/media/audio/linux/alsa_output.cc
+++ b/media/audio/linux/alsa_output.cc
@@ -49,8 +49,6 @@
#include "media/base/data_buffer.h"
#include "media/base/seekable_buffer.h"
-namespace media {
-
// Amount of time to wait if we've exhausted the data source. This is to avoid
// busy looping.
static const uint32 kNoDataSleepMilliseconds = 10;
@@ -799,5 +797,3 @@ void AlsaPcmOutputStream::set_source_callback(AudioSourceCallback* callback) {
DCHECK(IsOnAudioThread());
source_callback_ = callback;
}
-
-} // namespace media
diff --git a/media/audio/linux/alsa_output.h b/media/audio/linux/alsa_output.h
index 43e75bb..ee257eb 100644
--- a/media/audio/linux/alsa_output.h
+++ b/media/audio/linux/alsa_output.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
//
@@ -32,13 +32,13 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-class MessageLoop;
-
namespace media {
+class SeekableBuffer;
+}; // namespace media
class AlsaWrapper;
class AudioManagerLinux;
-class SeekableBuffer;
+class MessageLoop;
class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream {
public:
@@ -210,6 +210,4 @@ class MEDIA_EXPORT AlsaPcmOutputStream : public AudioOutputStream {
MEDIA_EXPORT std::ostream& operator<<(std::ostream& os,
AlsaPcmOutputStream::InternalState);
-}; // namespace media
-
#endif // MEDIA_AUDIO_LINUX_ALSA_OUTPUT_H_
diff --git a/media/audio/linux/alsa_output_unittest.cc b/media/audio/linux/alsa_output_unittest.cc
index be605c1..ab9a654 100644
--- a/media/audio/linux/alsa_output_unittest.cc
+++ b/media/audio/linux/alsa_output_unittest.cc
@@ -29,8 +29,6 @@ using testing::StrictMock;
using testing::StrEq;
using testing::Unused;
-namespace media {
-
class MockAlsaWrapper : public AlsaWrapper {
public:
MOCK_METHOD3(DeviceNameHint, int(int card,
@@ -826,5 +824,3 @@ TEST_F(AlsaPcmOutputStreamTest, ScheduleNextWrite_StopStream) {
test_stream->TransitionTo(AlsaPcmOutputStream::kIsClosed);
test_stream->Close();
}
-
-} // namespace media
diff --git a/media/audio/linux/alsa_util.cc b/media/audio/linux/alsa_util.cc
index 176ef69..5137119 100644
--- a/media/audio/linux/alsa_util.cc
+++ b/media/audio/linux/alsa_util.cc
@@ -11,7 +11,7 @@
namespace alsa_util {
-static snd_pcm_t* OpenDevice(media::AlsaWrapper* wrapper,
+static snd_pcm_t* OpenDevice(AlsaWrapper* wrapper,
const char* device_name,
snd_pcm_stream_t type,
int channels,
@@ -81,7 +81,7 @@ snd_pcm_format_t BitsToFormat(int bits_per_sample) {
}
}
-int CloseDevice(media::AlsaWrapper* wrapper, snd_pcm_t* handle) {
+int CloseDevice(AlsaWrapper* wrapper, snd_pcm_t* handle) {
std::string device_name = wrapper->PcmName(handle);
int error = wrapper->PcmClose(handle);
if (error < 0) {
@@ -92,7 +92,7 @@ int CloseDevice(media::AlsaWrapper* wrapper, snd_pcm_t* handle) {
return error;
}
-snd_pcm_t* OpenCaptureDevice(media::AlsaWrapper* wrapper,
+snd_pcm_t* OpenCaptureDevice(AlsaWrapper* wrapper,
const char* device_name,
int channels,
int sample_rate,
@@ -102,7 +102,7 @@ snd_pcm_t* OpenCaptureDevice(media::AlsaWrapper* wrapper,
sample_rate, pcm_format, latency_us);
}
-snd_pcm_t* OpenPlaybackDevice(media::AlsaWrapper* wrapper,
+snd_pcm_t* OpenPlaybackDevice(AlsaWrapper* wrapper,
const char* device_name,
int channels,
int sample_rate,
@@ -112,7 +112,7 @@ snd_pcm_t* OpenPlaybackDevice(media::AlsaWrapper* wrapper,
sample_rate, pcm_format, latency_us);
}
-snd_mixer_t* OpenMixer(media::AlsaWrapper* wrapper,
+snd_mixer_t* OpenMixer(AlsaWrapper* wrapper,
const std::string& device_name) {
snd_mixer_t* mixer = NULL;
@@ -143,7 +143,7 @@ snd_mixer_t* OpenMixer(media::AlsaWrapper* wrapper,
return mixer;
}
-void CloseMixer(media::AlsaWrapper* wrapper, snd_mixer_t* mixer,
+void CloseMixer(AlsaWrapper* wrapper, snd_mixer_t* mixer,
const std::string& device_name) {
if (!mixer)
return;
@@ -166,7 +166,7 @@ void CloseMixer(media::AlsaWrapper* wrapper, snd_mixer_t* mixer,
}
}
-snd_mixer_elem_t* LoadCaptureMixerElement(media::AlsaWrapper* wrapper,
+snd_mixer_elem_t* LoadCaptureMixerElement(AlsaWrapper* wrapper,
snd_mixer_t* mixer) {
if (!mixer)
return NULL;
diff --git a/media/audio/linux/alsa_util.h b/media/audio/linux/alsa_util.h
index 53cf80a..054d24d 100644
--- a/media/audio/linux/alsa_util.h
+++ b/media/audio/linux/alsa_util.h
@@ -8,40 +8,37 @@
#include <alsa/asoundlib.h>
#include <string>
-namespace media {
class AlsaWrapper;
-}
namespace alsa_util {
snd_pcm_format_t BitsToFormat(int bits_per_sample);
-snd_pcm_t* OpenCaptureDevice(media::AlsaWrapper* wrapper,
+snd_pcm_t* OpenCaptureDevice(AlsaWrapper* wrapper,
const char* device_name,
int channels,
int sample_rate,
snd_pcm_format_t pcm_format,
int latency_us);
-snd_pcm_t* OpenPlaybackDevice(media::AlsaWrapper* wrapper,
+snd_pcm_t* OpenPlaybackDevice(AlsaWrapper* wrapper,
const char* device_name,
int channels,
int sample_rate,
snd_pcm_format_t pcm_format,
int latency_us);
-int CloseDevice(media::AlsaWrapper* wrapper, snd_pcm_t* handle);
+int CloseDevice(AlsaWrapper* wrapper, snd_pcm_t* handle);
-snd_mixer_t* OpenMixer(media::AlsaWrapper* wrapper,
- const std::string& device_name);
+snd_mixer_t* OpenMixer(AlsaWrapper* wrapper, const std::string& device_name);
-void CloseMixer(media::AlsaWrapper* wrapper,
+void CloseMixer(AlsaWrapper* wrapper,
snd_mixer_t* mixer,
const std::string& device_name);
-snd_mixer_elem_t* LoadCaptureMixerElement(media::AlsaWrapper* wrapper,
+snd_mixer_elem_t* LoadCaptureMixerElement(AlsaWrapper* wrapper,
snd_mixer_t* mixer);
-} // namespace alsa_util
+}
#endif // MEDIA_AUDIO_LINUX_ALSA_UTIL_H_
diff --git a/media/audio/linux/alsa_wrapper.cc b/media/audio/linux/alsa_wrapper.cc
index 67331b4..9e056d8 100644
--- a/media/audio/linux/alsa_wrapper.cc
+++ b/media/audio/linux/alsa_wrapper.cc
@@ -6,8 +6,6 @@
#include <alsa/asoundlib.h>
-namespace media {
-
AlsaWrapper::AlsaWrapper() {
}
@@ -228,5 +226,3 @@ int AlsaWrapper::MixerSelemGetCaptureVolumeRange(snd_mixer_elem_t* elem,
long* min, long* max) {
return snd_mixer_selem_get_capture_volume_range(elem, min, max);
}
-
-} // namespace media
diff --git a/media/audio/linux/alsa_wrapper.h b/media/audio/linux/alsa_wrapper.h
index 30d9463..49d64b2 100644
--- a/media/audio/linux/alsa_wrapper.h
+++ b/media/audio/linux/alsa_wrapper.h
@@ -11,8 +11,6 @@
#include "base/basictypes.h"
#include "media/base/media_export.h"
-namespace media {
-
class MEDIA_EXPORT AlsaWrapper {
public:
AlsaWrapper();
@@ -77,5 +75,3 @@ class MEDIA_EXPORT AlsaWrapper {
int soft_resample, unsigned int latency);
DISALLOW_COPY_AND_ASSIGN(AlsaWrapper);
};
-
-} // namespace media
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc
index 0b34aaa..27d5749 100644
--- a/media/audio/linux/audio_manager_linux.cc
+++ b/media/audio/linux/audio_manager_linux.cc
@@ -23,8 +23,6 @@
#include "media/base/limits.h"
#include "media/base/media_switches.h"
-namespace media {
-
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 50;
@@ -311,5 +309,3 @@ AudioInputStream* AudioManagerLinux::MakeInputStream(
AudioManager* CreateAudioManager() {
return new AudioManagerLinux();
}
-
-} // namespace media
diff --git a/media/audio/linux/audio_manager_linux.h b/media/audio/linux/audio_manager_linux.h
index d62d361..81e53c4 100644
--- a/media/audio/linux/audio_manager_linux.h
+++ b/media/audio/linux/audio_manager_linux.h
@@ -11,8 +11,6 @@
#include "base/threading/thread.h"
#include "media/audio/audio_manager_base.h"
-namespace media {
-
class AlsaWrapper;
class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase {
@@ -75,6 +73,4 @@ class MEDIA_EXPORT AudioManagerLinux : public AudioManagerBase {
DISALLOW_COPY_AND_ASSIGN(AudioManagerLinux);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_LINUX_AUDIO_MANAGER_LINUX_H_
diff --git a/media/audio/mac/audio_input_mac.cc b/media/audio/mac/audio_input_mac.cc
index 2ae1651..0277a00 100644
--- a/media/audio/mac/audio_input_mac.cc
+++ b/media/audio/mac/audio_input_mac.cc
@@ -18,8 +18,6 @@ enum {
};
#endif
-namespace media {
-
PCMQueueInAudioInputStream::PCMQueueInAudioInputStream(
AudioManagerMac* manager, const AudioParameters& params)
: manager_(manager),
@@ -219,5 +217,3 @@ void PCMQueueInAudioInputStream::HandleInputBuffer(
HandleError(err);
}
}
-
-} // namespace media
diff --git a/media/audio/mac/audio_input_mac.h b/media/audio/mac/audio_input_mac.h
index d290bcb..1347871 100644
--- a/media/audio/mac/audio_input_mac.h
+++ b/media/audio/mac/audio_input_mac.h
@@ -12,8 +12,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerMac;
// Implementation of AudioInputStream for Mac OS X using the audio queue service
@@ -80,6 +78,4 @@ class PCMQueueInAudioInputStream : public AudioInputStream {
DISALLOW_COPY_AND_ASSIGN(PCMQueueInAudioInputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_MAC_AUDIO_INPUT_MAC_H_
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index dc9bd8a..075b055 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -12,8 +12,6 @@
#include "media/audio/audio_util.h"
#include "media/audio/mac/audio_manager_mac.h"
-namespace media {
-
static const int kMinIntervalBetweenVolumeUpdatesMs = 1000;
static std::ostream& operator<<(std::ostream& os,
@@ -606,5 +604,3 @@ bool AUAudioInputStream::IsVolumeSettableOnChannel(int channel) {
&is_settable);
return (result == noErr) ? is_settable : false;
}
-
-} // namespace media
diff --git a/media/audio/mac/audio_low_latency_input_mac.h b/media/audio/mac/audio_low_latency_input_mac.h
index d35e439..d1e507f 100644
--- a/media/audio/mac/audio_low_latency_input_mac.h
+++ b/media/audio/mac/audio_low_latency_input_mac.h
@@ -46,8 +46,6 @@
#include "media/audio/audio_input_stream_impl.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerMac;
class AUAudioInputStream : public AudioInputStreamImpl {
@@ -148,6 +146,4 @@ class AUAudioInputStream : public AudioInputStreamImpl {
DISALLOW_COPY_AND_ASSIGN(AUAudioInputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_INPUT_MAC_H_
diff --git a/media/audio/mac/audio_low_latency_input_mac_unittest.cc b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
index 8b6972c..139a860 100644
--- a/media/audio/mac/audio_low_latency_input_mac_unittest.cc
+++ b/media/audio/mac/audio_low_latency_input_mac_unittest.cc
@@ -20,8 +20,6 @@ using ::testing::AtLeast;
using ::testing::Ge;
using ::testing::NotNull;
-namespace media {
-
ACTION_P3(CheckCountAndPostQuitTask, count, limit, loop) {
if (++*count >= limit) {
loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
@@ -309,4 +307,3 @@ TEST_F(MacAudioInputTest, DISABLED_AUAudioInputStreamRecordToFile) {
ais->Close();
}
-} // namespace media
diff --git a/media/audio/mac/audio_low_latency_output_mac.cc b/media/audio/mac/audio_low_latency_output_mac.cc
index b1f15dd..39ebf1a 100644
--- a/media/audio/mac/audio_low_latency_output_mac.cc
+++ b/media/audio/mac/audio_low_latency_output_mac.cc
@@ -12,8 +12,6 @@
#include "media/audio/audio_util.h"
#include "media/audio/mac/audio_manager_mac.h"
-namespace media {
-
// Reorder PCM from AAC layout to Core Audio 5.1 layout.
// TODO(fbarchard): Switch layout when ffmpeg is updated.
template<class Format>
@@ -352,5 +350,3 @@ double AUAudioOutputStream::GetPlayoutLatency(
return (delay_frames + hardware_latency_frames_);
}
-
-} // namespace media
diff --git a/media/audio/mac/audio_low_latency_output_mac.h b/media/audio/mac/audio_low_latency_output_mac.h
index 45d9773..bb9ce8d 100644
--- a/media/audio/mac/audio_low_latency_output_mac.h
+++ b/media/audio/mac/audio_low_latency_output_mac.h
@@ -23,8 +23,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerMac;
// Implementation of AudioOuputStream for Mac OS X using the
@@ -101,6 +99,4 @@ class AUAudioOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(AUAudioOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_MAC_AUDIO_LOW_LATENCY_OUTPUT_MAC_H_
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 2bd8501..3b1161d 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -15,8 +15,6 @@
#include "media/audio/mac/audio_output_mac.h"
#include "media/base/limits.h"
-namespace media {
-
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 50;
@@ -295,5 +293,3 @@ AudioInputStream* AudioManagerMac::MakeLowLatencyInputStream(
AudioManager* CreateAudioManager() {
return new AudioManagerMac();
}
-
-} // namespace media
diff --git a/media/audio/mac/audio_manager_mac.h b/media/audio/mac/audio_manager_mac.h
index 54ff3a6..d54f293 100644
--- a/media/audio/mac/audio_manager_mac.h
+++ b/media/audio/mac/audio_manager_mac.h
@@ -9,8 +9,6 @@
#include "base/compiler_specific.h"
#include "media/audio/audio_manager_base.h"
-namespace media {
-
// Mac OS X implementation of the AudioManager singleton. This class is internal
// to the audio output and only internal users can call methods not exposed by
// the AudioManager class.
@@ -43,6 +41,4 @@ class MEDIA_EXPORT AudioManagerMac : public AudioManagerBase {
DISALLOW_COPY_AND_ASSIGN(AudioManagerMac);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_MAC_AUDIO_MANAGER_MAC_H_
diff --git a/media/audio/mac/audio_output_mac.cc b/media/audio/mac/audio_output_mac.cc
index 06fc26f..d2cdc57 100644
--- a/media/audio/mac/audio_output_mac.cc
+++ b/media/audio/mac/audio_output_mac.cc
@@ -13,8 +13,6 @@
#include "media/audio/audio_util.h"
#include "media/audio/mac/audio_manager_mac.h"
-namespace media {
-
// A custom data structure to store information an AudioQueue buffer.
struct AudioQueueUserData {
AudioQueueUserData() : empty_buffer(false) {}
@@ -529,5 +527,3 @@ PCMQueueOutAudioOutputStream::GetSource() {
base::AutoLock lock(source_lock_);
return source_;
}
-
-} // namespace media
diff --git a/media/audio/mac/audio_output_mac.h b/media/audio/mac/audio_output_mac.h
index 66f2941..e033fc9 100644
--- a/media/audio/mac/audio_output_mac.h
+++ b/media/audio/mac/audio_output_mac.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -14,8 +14,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerMac;
// Implementation of AudioOuputStream for Mac OS X using the audio queue service
@@ -99,6 +97,4 @@ class PCMQueueOutAudioOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(PCMQueueOutAudioOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_MAC_AUDIO_OUTPUT_MAC_H_
diff --git a/media/audio/mac/audio_output_mac_unittest.cc b/media/audio/mac/audio_output_mac_unittest.cc
index 0724883..71a7f40 100644
--- a/media/audio/mac/audio_output_mac_unittest.cc
+++ b/media/audio/mac/audio_output_mac_unittest.cc
@@ -20,8 +20,6 @@ using ::testing::NiceMock;
using ::testing::NotNull;
using ::testing::Return;
-namespace media {
-
class MockAudioSource : public AudioOutputStream::AudioSourceCallback {
public:
MOCK_METHOD4(OnMoreData, uint32(AudioOutputStream* stream, uint8* dest,
@@ -177,5 +175,3 @@ TEST(MacAudioTest, PCMWaveStreamPendingBytes) {
oas->Stop();
oas->Close();
}
-
-} // namespace media
diff --git a/media/audio/openbsd/audio_manager_openbsd.cc b/media/audio/openbsd/audio_manager_openbsd.cc
index 0f4314c..acdcea4 100644
--- a/media/audio/openbsd/audio_manager_openbsd.cc
+++ b/media/audio/openbsd/audio_manager_openbsd.cc
@@ -15,8 +15,6 @@
#include <fcntl.h>
-namespace media {
-
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 50;
@@ -105,5 +103,3 @@ AudioOutputStream* AudioManagerOpenBSD::MakeOutputStream(
AudioManager* CreateAudioManager() {
return new AudioManagerOpenBSD();
}
-
-} // namespace media
diff --git a/media/audio/openbsd/audio_manager_openbsd.h b/media/audio/openbsd/audio_manager_openbsd.h
index 1635571..86b56c0 100644
--- a/media/audio/openbsd/audio_manager_openbsd.h
+++ b/media/audio/openbsd/audio_manager_openbsd.h
@@ -10,8 +10,6 @@
#include "base/compiler_specific.h"
#include "media/audio/audio_manager_base.h"
-namespace media {
-
class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase {
public:
AudioManagerOpenBSD();
@@ -45,6 +43,4 @@ class MEDIA_EXPORT AudioManagerOpenBSD : public AudioManagerBase {
DISALLOW_COPY_AND_ASSIGN(AudioManagerOpenBSD);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_OPENBSD_AUDIO_MANAGER_OPENBSD_H_
diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc
index 651d1f7..c58d5bf 100644
--- a/media/audio/pulse/pulse_output.cc
+++ b/media/audio/pulse/pulse_output.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -16,8 +16,6 @@
#include "media/base/data_buffer.h"
#include "media/base/seekable_buffer.h"
-namespace media {
-
static pa_sample_format_t BitsToPASampleFormat(int bits_per_sample) {
switch (bits_per_sample) {
// Unsupported sample formats shown for reference. I am assuming we want
@@ -428,5 +426,3 @@ uint32 PulseAudioOutputStream::RunDataCallback(
return 0;
}
-
-} // namespace media
diff --git a/media/audio/pulse/pulse_output.h b/media/audio/pulse/pulse_output.h
index 3c1cae6..410ffb3 100644
--- a/media/audio/pulse/pulse_output.h
+++ b/media/audio/pulse/pulse_output.h
@@ -27,8 +27,8 @@
#include "media/base/channel_layout.h"
namespace media {
-
class SeekableBuffer;
+}
#if defined(OS_LINUX)
class AudioManagerLinux;
@@ -130,6 +130,4 @@ class PulseAudioOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(PulseAudioOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_PULSE_PULSE_OUTPUT_H_
diff --git a/media/audio/simple_sources.cc b/media/audio/simple_sources.cc
index 8b85961..d2dc584 100644
--- a/media/audio/simple_sources.cc
+++ b/media/audio/simple_sources.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -13,8 +13,6 @@
#include "media/audio/audio_io.h"
#include "media/base/data_buffer.h"
-namespace media {
-
//////////////////////////////////////////////////////////////////////////////
// SineWaveAudioSource implementation.
@@ -98,5 +96,3 @@ void PushSource::ClearAll() {
void PushSource::CleanUp() {
buffer_.Clear();
}
-
-} // namespace media
diff --git a/media/audio/simple_sources.h b/media/audio/simple_sources.h
index fa06857..a4373a0 100644
--- a/media/audio/simple_sources.h
+++ b/media/audio/simple_sources.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -10,8 +10,6 @@
#include "media/audio/audio_io.h"
#include "media/base/seekable_buffer.h"
-namespace media {
-
// An audio source that produces a pure sinusoidal tone.
class MEDIA_EXPORT SineWaveAudioSource
: public AudioOutputStream::AudioSourceCallback {
@@ -90,6 +88,4 @@ class MEDIA_EXPORT PushSource
media::SeekableBuffer buffer_;
};
-} // namespace media
-
#endif // MEDIA_AUDIO_SIMPLE_SOURCES_H_
diff --git a/media/audio/simple_sources_unittest.cc b/media/audio/simple_sources_unittest.cc
index 1e19fd8..384ed0b 100644
--- a/media/audio/simple_sources_unittest.cc
+++ b/media/audio/simple_sources_unittest.cc
@@ -11,8 +11,6 @@
#include "media/audio/simple_sources.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace media {
-
static void GenerateRandomData(char* buffer, uint32 len) {
static bool called = false;
if (!called) {
@@ -101,5 +99,3 @@ TEST(SimpleSources, SineWaveAudio16MonoTest) {
EXPECT_TRUE(last_buffer[half_period + 2] > last_buffer[half_period + 3]);
oas->Close();
}
-
-} // namespace media
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc
index 20fbe71..214b8bf9 100644
--- a/media/audio/win/audio_low_latency_input_win.cc
+++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -14,8 +14,6 @@
using base::win::ScopedComPtr;
using base::win::ScopedCOMInitializer;
-namespace media {
-
WASAPIAudioInputStream::WASAPIAudioInputStream(
AudioManagerWin* manager, const AudioParameters& params,
const std::string& device_id)
@@ -643,5 +641,3 @@ HRESULT WASAPIAudioInputStream::InitializeAudioEngine() {
simple_audio_volume_.ReceiveVoid());
return hr;
}
-
-} // namespace media
diff --git a/media/audio/win/audio_low_latency_input_win.h b/media/audio/win/audio_low_latency_input_win.h
index bb0f58c..d546829 100644
--- a/media/audio/win/audio_low_latency_input_win.h
+++ b/media/audio/win/audio_low_latency_input_win.h
@@ -77,8 +77,6 @@
#include "media/audio/audio_parameters.h"
#include "media/base/media_export.h"
-namespace media {
-
class AudioManagerWin;
// AudioInputStream implementation using Windows Core Audio APIs.
@@ -212,6 +210,4 @@ class MEDIA_EXPORT WASAPIAudioInputStream
DISALLOW_COPY_AND_ASSIGN(WASAPIAudioInputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_INPUT_WIN_H_
diff --git a/media/audio/win/audio_low_latency_input_win_unittest.cc b/media/audio/win/audio_low_latency_input_win_unittest.cc
index 029403f..da5acb6 100644
--- a/media/audio/win/audio_low_latency_input_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_input_win_unittest.cc
@@ -27,8 +27,6 @@ using ::testing::AtLeast;
using ::testing::Gt;
using ::testing::NotNull;
-namespace media {
-
ACTION_P3(CheckCountAndPostQuitTask, count, limit, loop) {
if (++*count >= limit) {
loop->PostTask(FROM_HERE, MessageLoop::QuitClosure());
@@ -394,5 +392,3 @@ TEST(WinAudioInputTest, DISABLED_WASAPIAudioInputStreamRecordToFile) {
LOG(INFO) << ">> Recording has stopped.";
ais->Close();
}
-
-} // namespace media
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc
index ec0fcd2..120a397 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -16,8 +16,6 @@
using base::win::ScopedComPtr;
using base::win::ScopedCOMInitializer;
-namespace media {
-
WASAPIAudioOutputStream::WASAPIAudioOutputStream(AudioManagerWin* manager,
const AudioParameters& params,
ERole device_role)
@@ -810,5 +808,3 @@ bool WASAPIAudioOutputStream::RestartRenderingUsingNewDefaultDevice() {
restart_rendering_mode_ = false;
return SUCCEEDED(hr);
}
-
-} // namespace media
diff --git a/media/audio/win/audio_low_latency_output_win.h b/media/audio/win/audio_low_latency_output_win.h
index 67a5d6c..63a1c52 100644
--- a/media/audio/win/audio_low_latency_output_win.h
+++ b/media/audio/win/audio_low_latency_output_win.h
@@ -132,8 +132,6 @@
#include "media/audio/audio_parameters.h"
#include "media/base/media_export.h"
-namespace media {
-
class AudioManagerWin;
// AudioOutputStream implementation using Windows Core Audio APIs.
@@ -309,6 +307,4 @@ class MEDIA_EXPORT WASAPIAudioOutputStream
DISALLOW_COPY_AND_ASSIGN(WASAPIAudioOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_WIN_AUDIO_LOW_LATENCY_OUTPUT_WIN_H_
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index 93dcf2f..1d19fe1 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -38,8 +38,6 @@
DEFINE_GUID(AM_KSCATEGORY_AUDIO, 0x6994ad04, 0x93ef, 0x11d0,
0xa3, 0xcc, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96);
-namespace media {
-
// Maximum number of output streams that can be open simultaneously.
static const int kMaxOutputStreams = 50;
@@ -319,5 +317,3 @@ AudioInputStream* AudioManagerWin::CreatePCMWaveInAudioInputStream(
AudioManager* CreateAudioManager() {
return new AudioManagerWin();
}
-
-} // namespace media
diff --git a/media/audio/win/audio_manager_win.h b/media/audio/win/audio_manager_win.h
index b1e2426..19742fb 100644
--- a/media/audio/win/audio_manager_win.h
+++ b/media/audio/win/audio_manager_win.h
@@ -13,8 +13,6 @@
#include "base/gtest_prod_util.h"
#include "media/audio/audio_manager_base.h"
-namespace media {
-
// Windows implementation of the AudioManager singleton. This class is internal
// to the audio output and only internal users can call methods not exposed by
// the AudioManager class.
@@ -73,6 +71,4 @@ class MEDIA_EXPORT AudioManagerWin : public AudioManagerBase {
DISALLOW_COPY_AND_ASSIGN(AudioManagerWin);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_WIN_AUDIO_MANAGER_WIN_H_
diff --git a/media/audio/win/audio_output_win_unittest.cc b/media/audio/win/audio_output_win_unittest.cc
index 11b5693..a6e240d 100644
--- a/media/audio/win/audio_output_win_unittest.cc
+++ b/media/audio/win/audio_output_win_unittest.cc
@@ -31,8 +31,6 @@ using ::testing::Return;
using base::win::ScopedCOMInitializer;
-namespace media {
-
static const wchar_t kAudioFile1_16b_m_16K[]
= L"media\\test\\data\\sweep02_16b_mono_16KHz.raw";
@@ -746,5 +744,3 @@ TEST(WinAudioTest, SyncSocketBasic) {
oas->Stop();
oas->Close();
}
-
-} // namespace media
diff --git a/media/audio/win/wavein_input_win.cc b/media/audio/win/wavein_input_win.cc
index 7eb778d..f4055db 100644
--- a/media/audio/win/wavein_input_win.cc
+++ b/media/audio/win/wavein_input_win.cc
@@ -16,7 +16,7 @@ namespace {
const int kStopInputStreamCallbackTimeout = 3000; // Three seconds.
}
-namespace media {
+using media::AudioDeviceNames;
// Our sound buffers are allocated once and kept in a linked list using the
// the WAVEHDR::dwUser variable. The last buffer points to the first buffer.
@@ -297,5 +297,3 @@ void PCMWaveInAudioInputStream::WaveCallback(HWAVEIN hwi, UINT msg,
obj->callback_->OnClose(obj);
}
}
-
-} // namespace media
diff --git a/media/audio/win/wavein_input_win.h b/media/audio/win/wavein_input_win.h
index 82f1f55..b4418d8 100644
--- a/media/audio/win/wavein_input_win.h
+++ b/media/audio/win/wavein_input_win.h
@@ -16,8 +16,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerWin;
class PCMWaveInAudioInputStream : public AudioInputStream {
@@ -119,6 +117,4 @@ class PCMWaveInAudioInputStream : public AudioInputStream {
DISALLOW_COPY_AND_ASSIGN(PCMWaveInAudioInputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_WIN_WAVEIN_INPUT_WIN_H_
diff --git a/media/audio/win/waveout_output_win.cc b/media/audio/win/waveout_output_win.cc
index 3cae68c..c8c7523 100644
--- a/media/audio/win/waveout_output_win.cc
+++ b/media/audio/win/waveout_output_win.cc
@@ -15,8 +15,6 @@
#include "media/audio/audio_util.h"
#include "media/audio/win/audio_manager_win.h"
-namespace media {
-
// Some general thoughts about the waveOut API which is badly documented :
// - We use CALLBACK_EVENT mode in which XP signals events such as buffer
// releases.
@@ -413,5 +411,3 @@ void NTAPI PCMWaveOutAudioOutputStream::BufferCallback(PVOID lpParameter,
}
}
}
-
-} // namespace media
diff --git a/media/audio/win/waveout_output_win.h b/media/audio/win/waveout_output_win.h
index bc53bb4..e7cb4ed 100644
--- a/media/audio/win/waveout_output_win.h
+++ b/media/audio/win/waveout_output_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -17,8 +17,6 @@
#include "media/audio/audio_io.h"
#include "media/audio/audio_parameters.h"
-namespace media {
-
class AudioManagerWin;
// Implements PCM audio output support for Windows using the WaveXXX API.
@@ -134,6 +132,4 @@ class PCMWaveOutAudioOutputStream : public AudioOutputStream {
DISALLOW_COPY_AND_ASSIGN(PCMWaveOutAudioOutputStream);
};
-} // namespace media
-
#endif // MEDIA_AUDIO_WIN_WAVEOUT_OUTPUT_WIN_H_
diff --git a/media/tools/player_wtl/movie.cc b/media/tools/player_wtl/movie.cc
index 781f377..4e3c9ab 100644
--- a/media/tools/player_wtl/movie.cc
+++ b/media/tools/player_wtl/movie.cc
@@ -20,6 +20,13 @@
#include "media/filters/null_audio_renderer.h"
#include "media/filters/video_renderer_base.h"
+using media::FFmpegAudioDecoder;
+using media::FFmpegDemuxer;
+using media::FFmpegVideoDecoder;
+using media::FileDataSource;
+using media::FilterCollection;
+using media::Pipeline;
+
namespace media {
Movie::Movie()
diff --git a/media/tools/player_wtl/movie.h b/media/tools/player_wtl/movie.h
index 0e04278..54ddd49 100644
--- a/media/tools/player_wtl/movie.h
+++ b/media/tools/player_wtl/movie.h
@@ -13,11 +13,11 @@
#include "base/memory/scoped_ptr.h"
#include "media/base/message_loop_factory.h"
+class AudioManager;
template <typename T> struct DefaultSingletonTraits;
namespace media {
-class AudioManager;
class Pipeline;
class VideoRendererBase;
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index ce2ff07..467d92f 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -37,7 +37,7 @@ static Display* g_display = NULL;
static Window g_window = 0;
static bool g_running = false;
-media::AudioManager* g_audio_manager = NULL;
+AudioManager* g_audio_manager = NULL;
media::VideoRendererBase* g_video_renderer = NULL;
@@ -238,7 +238,7 @@ int main(int argc, char** argv) {
return 1;
}
- scoped_ptr<media::AudioManager> audio_manager(media::AudioManager::Create());
+ scoped_ptr<AudioManager> audio_manager(AudioManager::Create());
g_audio_manager = audio_manager.get();
logging::InitLogging(