OLD | NEW |
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 #include "ppapi/proxy/audio_input_resource.h" | 5 #include "ppapi/proxy/audio_input_resource.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "ipc/ipc_platform_file.h" | 9 #include "ipc/ipc_platform_file.h" |
10 #include "media/audio/audio_parameters.h" | 10 #include "media/audio/audio_parameters.h" |
11 #include "media/audio/shared_memory_util.h" | 11 #include "media/audio/shared_memory_util.h" |
12 #include "ppapi/c/pp_errors.h" | 12 #include "ppapi/c/pp_errors.h" |
13 #include "ppapi/proxy/ppapi_messages.h" | 13 #include "ppapi/proxy/ppapi_messages.h" |
14 #include "ppapi/proxy/resource_message_params.h" | 14 #include "ppapi/proxy/resource_message_params.h" |
15 #include "ppapi/proxy/serialized_structs.h" | 15 #include "ppapi/proxy/serialized_handle.h" |
16 #include "ppapi/shared_impl/ppapi_globals.h" | 16 #include "ppapi/shared_impl/ppapi_globals.h" |
17 #include "ppapi/shared_impl/resource_tracker.h" | 17 #include "ppapi/shared_impl/resource_tracker.h" |
18 #include "ppapi/shared_impl/tracked_callback.h" | 18 #include "ppapi/shared_impl/tracked_callback.h" |
19 #include "ppapi/thunk/enter.h" | 19 #include "ppapi/thunk/enter.h" |
20 #include "ppapi/thunk/ppb_audio_config_api.h" | 20 #include "ppapi/thunk/ppb_audio_config_api.h" |
21 | 21 |
22 namespace ppapi { | 22 namespace ppapi { |
23 namespace proxy { | 23 namespace proxy { |
24 | 24 |
25 AudioInputResource::AudioInputResource( | 25 AudioInputResource::AudioInputResource( |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // While closing the stream, we may receive buffers whose size is different | 256 // While closing the stream, we may receive buffers whose size is different |
257 // from |data_buffer_size|. | 257 // from |data_buffer_size|. |
258 CHECK_LE(buffer->params.size, data_buffer_size); | 258 CHECK_LE(buffer->params.size, data_buffer_size); |
259 if (buffer->params.size > 0) | 259 if (buffer->params.size > 0) |
260 audio_input_callback_(&buffer->audio[0], buffer->params.size, user_data_); | 260 audio_input_callback_(&buffer->audio[0], buffer->params.size, user_data_); |
261 } | 261 } |
262 } | 262 } |
263 | 263 |
264 } // namespace proxy | 264 } // namespace proxy |
265 } // namespace ppapi | 265 } // namespace ppapi |
OLD | NEW |