OLD | NEW |
| (Empty) |
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 | |
3 * found in the LICENSE file. | |
4 */ | |
5 /** | |
6 * This file defines the trusted audio input interface. | |
7 */ | |
8 | |
9 label Chrome { | |
10 M17 = 0.1 | |
11 }; | |
12 | |
13 /** | |
14 * This interface is to be used by proxy implementations. All functions should | |
15 * be called from the main thread only. The resource returned is an Audio input | |
16 * resource; most of the PPB_AudioInput interface is also usable on this | |
17 * resource. | |
18 */ | |
19 [version=0.1, macro="PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE"] | |
20 interface PPB_AudioInputTrusted_Dev { | |
21 /** Returns an audio input resource. */ | |
22 PP_Resource CreateTrusted( | |
23 [in] PP_Instance instance); | |
24 | |
25 /** | |
26 * Opens a paused audio input interface, used by trusted side of proxy. | |
27 * Returns PP_ERROR_WOULD_BLOCK on success, and invokes the |create_callback| | |
28 * asynchronously to complete. As this function should always be invoked from | |
29 * the main thread, do not use the blocking variant of PP_CompletionCallback. | |
30 */ | |
31 int32_t Open( | |
32 [in] PP_Resource audio_input, | |
33 [in] PP_Resource config, | |
34 [in] PP_CompletionCallback create_callback); | |
35 | |
36 /** | |
37 * Get the sync socket. Use once Open has completed. | |
38 * Returns PP_OK on success. | |
39 */ | |
40 int32_t GetSyncSocket( | |
41 [in] PP_Resource audio_input, | |
42 [out] handle_t sync_socket); | |
43 | |
44 /** | |
45 * Get the shared memory interface. Use once Open has completed. | |
46 * Returns PP_OK on success. | |
47 */ | |
48 int32_t GetSharedMemory( | |
49 [in] PP_Resource audio_input, | |
50 [out] handle_t shm_handle, | |
51 [out] uint32_t shm_size); | |
52 }; | |
OLD | NEW |