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

Unified Diff: content/renderer/media/audio_device_factory.cc

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/audio_device_factory.h ('k') | content/renderer/media/audio_input_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/audio_device_factory.cc
diff --git a/content/renderer/media/audio_device_factory.cc b/content/renderer/media/audio_device_factory.cc
index fae521e5dd6248255888957ddde42f5aef3144ca..927a85f319a8d9fa7d316ea95a2fc1f0a0b8ab1c 100644
--- a/content/renderer/media/audio_device_factory.cc
+++ b/content/renderer/media/audio_device_factory.cc
@@ -7,8 +7,8 @@
#include "base/logging.h"
#include "content/renderer/media/audio_input_message_filter.h"
#include "content/renderer/media/audio_message_filter.h"
-#include "content/renderer/media/renderer_audio_output_device.h"
#include "media/audio/audio_input_device.h"
+#include "media/audio/audio_output_device.h"
namespace content {
@@ -16,24 +16,33 @@ namespace content {
AudioDeviceFactory* AudioDeviceFactory::factory_ = NULL;
// static
-scoped_refptr<RendererAudioOutputDevice> AudioDeviceFactory::NewOutputDevice() {
- RendererAudioOutputDevice* device = NULL;
- if (factory_)
- device = factory_->CreateOutputDevice();
-
- return device ? device : new RendererAudioOutputDevice(
- AudioMessageFilter::Get(), AudioMessageFilter::Get()->io_message_loop());
+scoped_refptr<media::AudioOutputDevice> AudioDeviceFactory::NewOutputDevice(
+ int render_view_id) {
+ if (factory_) {
+ media::AudioOutputDevice* const device =
+ factory_->CreateOutputDevice(render_view_id);
+ if (device)
+ return device;
+ }
+
+ AudioMessageFilter* const filter = AudioMessageFilter::Get();
+ return new media::AudioOutputDevice(
+ filter->CreateAudioOutputIPC(render_view_id), filter->io_message_loop());
}
// static
-scoped_refptr<media::AudioInputDevice> AudioDeviceFactory::NewInputDevice() {
- media::AudioInputDevice* device = NULL;
- if (factory_)
- device = factory_->CreateInputDevice();
-
- return device ? device : new media::AudioInputDevice(
- AudioInputMessageFilter::Get(),
- AudioInputMessageFilter::Get()->io_message_loop());
+scoped_refptr<media::AudioInputDevice> AudioDeviceFactory::NewInputDevice(
+ int render_view_id) {
+ if (factory_) {
+ media::AudioInputDevice* const device =
+ factory_->CreateInputDevice(render_view_id);
+ if (device)
+ return device;
+ }
+
+ AudioInputMessageFilter* const filter = AudioInputMessageFilter::Get();
+ return new media::AudioInputDevice(
+ filter->CreateAudioInputIPC(render_view_id), filter->io_message_loop());
}
AudioDeviceFactory::AudioDeviceFactory() {
« no previous file with comments | « content/renderer/media/audio_device_factory.h ('k') | content/renderer/media/audio_input_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698