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

Side by Side Diff: content/renderer/media/renderer_webaudiodevice_impl.h

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread_checker.h" 9 #include "base/threading/thread_checker.h"
10 #include "media/audio/audio_parameters.h" 10 #include "media/audio/audio_parameters.h"
11 #include "media/base/audio_renderer_sink.h" 11 #include "media/base/audio_renderer_sink.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebAudioDevice.h" 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebAudioDevice.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
14 14
15 namespace media {
16 class AudioOutputDevice;
17 }
18
15 namespace content { 19 namespace content {
16 20
17 class RendererAudioOutputDevice;
18
19 class RendererWebAudioDeviceImpl 21 class RendererWebAudioDeviceImpl
20 : public WebKit::WebAudioDevice, 22 : public WebKit::WebAudioDevice,
21 public media::AudioRendererSink::RenderCallback { 23 public media::AudioRendererSink::RenderCallback {
22 public: 24 public:
23 RendererWebAudioDeviceImpl(const media::AudioParameters& params, 25 RendererWebAudioDeviceImpl(const media::AudioParameters& params,
24 WebKit::WebAudioDevice::RenderCallback* callback); 26 WebKit::WebAudioDevice::RenderCallback* callback);
25 virtual ~RendererWebAudioDeviceImpl(); 27 virtual ~RendererWebAudioDeviceImpl();
26 28
27 // WebKit::WebAudioDevice implementation. 29 // WebKit::WebAudioDevice implementation.
28 virtual void start(); 30 virtual void start();
(...skipping 14 matching lines...) Expand all
43 const media::AudioParameters params_; 45 const media::AudioParameters params_;
44 46
45 // Weak reference to the callback into WebKit code. 47 // Weak reference to the callback into WebKit code.
46 WebKit::WebAudioDevice::RenderCallback* const client_callback_; 48 WebKit::WebAudioDevice::RenderCallback* const client_callback_;
47 49
48 // To avoid the need for locking, ensure the control methods of the 50 // To avoid the need for locking, ensure the control methods of the
49 // WebKit::WebAudioDevice implementation are called on the same thread. 51 // WebKit::WebAudioDevice implementation are called on the same thread.
50 base::ThreadChecker thread_checker_; 52 base::ThreadChecker thread_checker_;
51 53
52 // When non-NULL, we are started. When NULL, we are stopped. 54 // When non-NULL, we are started. When NULL, we are stopped.
53 scoped_refptr<RendererAudioOutputDevice> output_device_; 55 scoped_refptr<media::AudioOutputDevice> output_device_;
54 56
55 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); 57 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl);
56 }; 58 };
57 59
58 } // namespace content 60 } // namespace content
59 61
60 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 62 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_audio_output_device.cc ('k') | content/renderer/media/renderer_webaudiodevice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698