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

Side by Side Diff: ppapi/proxy/audio_input_resource.h

Issue 371273004: Ensures that input Pepper Flash supports the newly added AudioBus interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 5 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 PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_
6 #define PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_ 6 #define PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
13 #include "base/sync_socket.h" 13 #include "base/sync_socket.h"
14 #include "base/threading/simple_thread.h" 14 #include "base/threading/simple_thread.h"
15 #include "ppapi/proxy/device_enumeration_resource_helper.h" 15 #include "ppapi/proxy/device_enumeration_resource_helper.h"
16 #include "ppapi/proxy/plugin_resource.h" 16 #include "ppapi/proxy/plugin_resource.h"
17 #include "ppapi/shared_impl/scoped_pp_resource.h" 17 #include "ppapi/shared_impl/scoped_pp_resource.h"
18 #include "ppapi/thunk/ppb_audio_input_api.h" 18 #include "ppapi/thunk/ppb_audio_input_api.h"
19 19
20 namespace media {
21 class AudioBus;
22 }
23
20 namespace ppapi { 24 namespace ppapi {
21 namespace proxy { 25 namespace proxy {
22 26
23 class ResourceMessageReplyParams; 27 class ResourceMessageReplyParams;
24 28
25 class AudioInputResource : public PluginResource, 29 class AudioInputResource : public PluginResource,
26 public thunk::PPB_AudioInput_API, 30 public thunk::PPB_AudioInput_API,
27 public base::DelegateSimpleThread::Delegate { 31 public base::DelegateSimpleThread::Delegate {
28 public: 32 public:
29 AudioInputResource(Connection connection, PP_Instance instance); 33 AudioInputResource(Connection connection, PP_Instance instance);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Owning reference to the current config object. This isn't actually used, 130 // Owning reference to the current config object. This isn't actually used,
127 // we just dish it out as requested by the plugin. 131 // we just dish it out as requested by the plugin.
128 ScopedPPResource config_; 132 ScopedPPResource config_;
129 133
130 DeviceEnumerationResourceHelper enumeration_helper_; 134 DeviceEnumerationResourceHelper enumeration_helper_;
131 135
132 // The data size (in bytes) of one second of audio input. Used to calculate 136 // The data size (in bytes) of one second of audio input. Used to calculate
133 // latency. 137 // latency.
134 size_t bytes_per_second_; 138 size_t bytes_per_second_;
135 139
140 // AudioBus for shuttling data across the shared memory.
141 scoped_ptr<media::AudioBus> audio_bus_;
no longer working on chromium 2014/07/08 15:33:48 change the name to audio_wrapper_, and update the
henrika (OOO until Aug 14) 2014/07/09 09:39:51 I would like to keep this notation to match the co
142 int sample_frame_count_;
143
144 // Internal buffer for client's integer audio data.
145 int client_buffer_size_bytes_;
146 scoped_ptr<uint8_t[]> client_buffer_;
147
136 DISALLOW_COPY_AND_ASSIGN(AudioInputResource); 148 DISALLOW_COPY_AND_ASSIGN(AudioInputResource);
137 }; 149 };
138 150
139 } // namespace proxy 151 } // namespace proxy
140 } // namespace ppapi 152 } // namespace ppapi
141 153
142 #endif // PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_ 154 #endif // PPAPI_PROXY_AUDIO_INPUT_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698