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

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: Created 7 years, 9 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_output_device.h"
10 #include "media/audio/audio_parameters.h" 11 #include "media/audio/audio_parameters.h"
11 #include "media/base/audio_renderer_sink.h" 12 #include "media/base/audio_renderer_sink.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebAudioDevice.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebAudioDevice.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 class RendererAudioOutputDevice;
18
19 class RendererWebAudioDeviceImpl 18 class RendererWebAudioDeviceImpl
20 : public WebKit::WebAudioDevice, 19 : public WebKit::WebAudioDevice,
21 public media::AudioRendererSink::RenderCallback { 20 public media::AudioRendererSink::RenderCallback {
22 public: 21 public:
23 RendererWebAudioDeviceImpl(const media::AudioParameters& params, 22 RendererWebAudioDeviceImpl(const media::AudioParameters& params,
24 WebKit::WebAudioDevice::RenderCallback* callback); 23 WebKit::WebAudioDevice::RenderCallback* callback);
25 virtual ~RendererWebAudioDeviceImpl(); 24 virtual ~RendererWebAudioDeviceImpl();
26 25
27 // WebKit::WebAudioDevice implementation. 26 // WebKit::WebAudioDevice implementation.
28 virtual void start(); 27 virtual void start();
(...skipping 14 matching lines...) Expand all
43 const media::AudioParameters params_; 42 const media::AudioParameters params_;
44 43
45 // Weak reference to the callback into WebKit code. 44 // Weak reference to the callback into WebKit code.
46 WebKit::WebAudioDevice::RenderCallback* const client_callback_; 45 WebKit::WebAudioDevice::RenderCallback* const client_callback_;
47 46
48 // To avoid the need for locking, ensure the control methods of the 47 // To avoid the need for locking, ensure the control methods of the
49 // WebKit::WebAudioDevice implementation are called on the same thread. 48 // WebKit::WebAudioDevice implementation are called on the same thread.
50 base::ThreadChecker thread_checker_; 49 base::ThreadChecker thread_checker_;
51 50
52 // When non-NULL, we are started. When NULL, we are stopped. 51 // When non-NULL, we are started. When NULL, we are stopped.
53 scoped_refptr<RendererAudioOutputDevice> output_device_; 52 scoped_refptr<media::AudioOutputDevice> output_device_;
54 53
55 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); 54 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl);
56 }; 55 };
57 56
58 } // namespace content 57 } // namespace content
59 58
60 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 59 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698